Skip to content

Instantly share code, notes, and snippets.

View fubuloubu's full-sized avatar
💭
Wait, what did I do??

El De-dog-lo fubuloubu

💭
Wait, what did I do??
View GitHub Profile
@fubuloubu
fubuloubu / algo.py
Created February 16, 2023 20:07
algorithm for binary search of RPC to find transactions by nonce
from typing import Iterator
blockchain: tuple[list[int], ...] = ([], [0], [1, 2], [], [], [], [3, 4], [5, 6, 7], [8, 9])
def get_txns(blk):
@fubuloubu
fubuloubu / ERC4626.yaml
Last active May 9, 2022 00:32
Potential Design of ERC4626 Yield-bearing Vault Tokens Standard
# ERC4626: Yield-Bearing Vaults
# Definitions:
# - asset: The underlying token managed by the Vault.
# Has units defined by the corresponding ERC20 contract.
# - share: The token of the Vault. Has a ratio of underlying tokens
# exchanged on deposit/withdraw (defined by the vault)
# - slippage: any difference between advertised share price and economic realities of
# depositto or withdrawal from the Vault, which is not accounted by fees
# - deposit fee: fee charged on deposit to Vault
### Keybase proof
I hereby claim:
* I am fubuloubu on github.
* I am fubuloubu (https://keybase.io/fubuloubu) on keybase.
* I have a public key ASD1RVh-Qho7GFM1CZ8vK4CUq4xWYevx8hJPIUME-UjrYgo
To claim this, I am signing this object:
@fubuloubu
fubuloubu / test_pow.py
Last active June 29, 2020 00:29
Implementation of overflow-safe version of exponentiation
# Implementation of overflow-safe version of exponentiation
# Prototyped for the EVM environment of Vyper
# from https://en.wikipedia.org/wiki/Exponentiation_by_squaring
import math
import pytest
from hypothesis import given, strategies as st, settings
import random
from web3 import Web3, EthereumTesterProvider
from vyper import compile_code as compiler
from eth_tester.exceptions import TransactionFailed
w3 = Web3(EthereumTesterProvider())
max_stakers = 5