Contract
0x9fae78c4bbb649deb7b2295ddb8a03ada7eb660f
5
Contract Overview
Balance:
0 GLMR
GLMR Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x7c677af1015dab20c22dcc0541344ce5a23d697b6cd8ac1868e30daa60fb91ec | 0x617a6960 | 1071567 | 385 days 9 hrs ago | 0x745748bcfd8f9c2de519a71d789be8a63dd7d66c | IN | Create: Vyper_contract | 0 GLMR | 0.3573036 |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.1
Contract Source Code (Vyper language format)
# @version 0.3.1 """ @title StableSwap @author Curve.Fi @license Copyright (c) Curve.Fi, 2020-2021 - all rights reserved @notice 2 coin pool implementation with no lending @dev ERC20 support for return True/revert, return True/False, return None Support for positive-rebasing and fee-on-transfer tokens """ from vyper.interfaces import ERC20 interface Factory: def convert_fees() -> bool: nonpayable def get_fee_receiver(_pool: address) -> address: view def admin() -> address: view interface ERC1271: def isValidSignature(_hash: bytes32, _signature: Bytes[65]) -> bytes32: view event Transfer: sender: indexed(address) receiver: indexed(address) value: uint256 event Approval: owner: indexed(address) spender: indexed(address) value: uint256 event TokenExchange: buyer: indexed(address) sold_id: int128 tokens_sold: uint256 bought_id: int128 tokens_bought: uint256 event AddLiquidity: provider: indexed(address) token_amounts: uint256[N_COINS] fees: uint256[N_COINS] invariant: uint256 token_supply: uint256 event RemoveLiquidity: provider: indexed(address) token_amounts: uint256[N_COINS] fees: uint256[N_COINS] token_supply: uint256 event RemoveLiquidityOne: provider: indexed(address) token_amount: uint256 coin_amount: uint256 token_supply: uint256 event RemoveLiquidityImbalance: provider: indexed(address) token_amounts: uint256[N_COINS] fees: uint256[N_COINS] invariant: uint256 token_supply: uint256 event RampA: old_A: uint256 new_A: uint256 initial_time: uint256 future_time: uint256 event StopRampA: A: uint256 t: uint256 N_COINS: constant(int128) = 2 PRECISION: constant(uint256) = 10 ** 18 FEE_DENOMINATOR: constant(uint256) = 10 ** 10 ADMIN_FEE: constant(uint256) = 5000000000 A_PRECISION: constant(uint256) = 100 MAX_A: constant(uint256) = 10 ** 6 MAX_A_CHANGE: constant(uint256) = 10 MIN_RAMP_TIME: constant(uint256) = 86400 EIP712_TYPEHASH: constant(bytes32) = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") PERMIT_TYPEHASH: constant(bytes32) = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)") # keccak256("isValidSignature(bytes32,bytes)")[:4] << 224 ERC1271_MAGIC_VAL: constant(bytes32) = 0x1626ba7e00000000000000000000000000000000000000000000000000000000 VERSION: constant(String[8]) = "v5.0.0" factory: address coins: public(address[N_COINS]) admin_balances: public(uint256[N_COINS]) fee: public(uint256) # fee * 1e10 initial_A: public(uint256) future_A: public(uint256) initial_A_time: public(uint256) future_A_time: public(uint256) rate_multipliers: uint256[N_COINS] name: public(String[64]) symbol: public(String[32]) balanceOf: public(HashMap[address, uint256]) allowance: public(HashMap[address, HashMap[address, uint256]]) totalSupply: public(uint256) DOMAIN_SEPARATOR: public(bytes32) nonces: public(HashMap[address, uint256]) @external def __init__(): # we do this to prevent the implementation contract from being used as a pool self.fee = 31337 @external def initialize( _name: String[32], _symbol: String[10], _coins: address[4], _rate_multipliers: uint256[4], _A: uint256, _fee: uint256, ): """ @notice Contract constructor @param _name Name of the new pool @param _symbol Token symbol @param _coins List of all ERC20 conract addresses of coins @param _rate_multipliers List of number of decimals in coins @param _A Amplification coefficient multiplied by n ** (n - 1) @param _fee Fee to charge for exchanges """ # check if fee was already set to prevent initializing contract twice assert self.fee == 0 for i in range(N_COINS): coin: address = _coins[i] if coin == ZERO_ADDRESS: break self.coins[i] = coin self.rate_multipliers[i] = _rate_multipliers[i] A: uint256 = _A * A_PRECISION self.initial_A = A self.future_A = A self.fee = _fee self.factory = msg.sender name: String[64] = concat("Curve.fi Factory Plain Pool: ", _name) self.name = name self.symbol = concat(_symbol, "-f") self.DOMAIN_SEPARATOR = keccak256( _abi_encode(EIP712_TYPEHASH, keccak256(name), keccak256(VERSION), chain.id, self) ) # fire a transfer event so block explorers identify the contract as an ERC20 log Transfer(ZERO_ADDRESS, self, 0) ### ERC20 Functionality ### @view @external def decimals() -> uint256: """ @notice Get the number of decimals for this token @dev Implemented as a view method to reduce gas costs @return uint256 decimal places """ return 18 @internal def _transfer(_from: address, _to: address, _value: uint256): # # NOTE: vyper does not allow underflows # # so the following subtraction would revert on insufficient balance self.balanceOf[_from] -= _value self.balanceOf[_to] += _value log Transfer(_from, _to, _value) @external def transfer(_to : address, _value : uint256) -> bool: """ @dev Transfer token for a specified address @param _to The address to transfer to. @param _value The amount to be transferred. """ self._transfer(msg.sender, _to, _value) return True @external def transferFrom(_from : address, _to : address, _value : uint256) -> bool: """ @dev Transfer tokens from one address to another. @param _from address The address which you want to send tokens from @param _to address The address which you want to transfer to @param _value uint256 the amount of tokens to be transferred """ self._transfer(_from, _to, _value) _allowance: uint256 = self.allowance[_from][msg.sender] if _allowance != MAX_UINT256: self.allowance[_from][msg.sender] = _allowance - _value return True @external def approve(_spender : address, _value : uint256) -> bool: """ @notice Approve the passed address to transfer the specified amount of tokens on behalf of msg.sender @dev Beware that changing an allowance via this method brings the risk that someone may use both the old and new allowance by unfortunate transaction ordering: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will transfer the funds @param _value The amount of tokens that may be transferred @return bool success """ self.allowance[msg.sender][_spender] = _value log Approval(msg.sender, _spender, _value) return True @external def permit( _owner: address, _spender: address, _value: uint256, _deadline: uint256, _v: uint8, _r: bytes32, _s: bytes32 ) -> bool: """ @notice Approves spender by owner's signature to expend owner's tokens. See https://eips.ethereum.org/EIPS/eip-2612. @dev Inspired by https://github.com/yearn/yearn-vaults/blob/main/contracts/Vault.vy#L753-L793 @dev Supports smart contract wallets which implement ERC1271 https://eips.ethereum.org/EIPS/eip-1271 @param _owner The address which is a source of funds and has signed the Permit. @param _spender The address which is allowed to spend the funds. @param _value The amount of tokens to be spent. @param _deadline The timestamp after which the Permit is no longer valid. @param _v The bytes[64] of the valid secp256k1 signature of permit by owner @param _r The bytes[0:32] of the valid secp256k1 signature of permit by owner @param _s The bytes[32:64] of the valid secp256k1 signature of permit by owner @return True, if transaction completes successfully """ assert _owner != ZERO_ADDRESS assert block.timestamp <= _deadline nonce: uint256 = self.nonces[_owner] digest: bytes32 = keccak256( concat( b"\x19\x01", self.DOMAIN_SEPARATOR, keccak256(_abi_encode(PERMIT_TYPEHASH, _owner, _spender, _value, nonce, _deadline)) ) ) if _owner.is_contract: sig: Bytes[65] = concat(_abi_encode(_r, _s), slice(convert(_v, bytes32), 31, 1)) # reentrancy not a concern since this is a staticcall assert ERC1271(_owner).isValidSignature(digest, sig) == ERC1271_MAGIC_VAL else: assert ecrecover(digest, convert(_v, uint256), convert(_r, uint256), convert(_s, uint256)) == _owner self.allowance[_owner][_spender] = _value self.nonces[_owner] = nonce + 1 log Approval(_owner, _spender, _value) return True ### StableSwap Functionality ### @view @internal def _balances() -> uint256[N_COINS]: result: uint256[N_COINS] = empty(uint256[N_COINS]) for i in range(N_COINS): result[i] = ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i] return result @view @external def balances(i: uint256) -> uint256: """ @notice Get the current balance of a coin within the pool, less the accrued admin fees @param i Index value for the coin to query balance of @return Token balance """ return self._balances()[i] @view @external def get_balances() -> uint256[N_COINS]: return self._balances() @view @internal def _A() -> uint256: """ Handle ramping A up or down """ t1: uint256 = self.future_A_time A1: uint256 = self.future_A if block.timestamp < t1: A0: uint256 = self.initial_A t0: uint256 = self.initial_A_time # Expressions in uint256 cannot have negative numbers, thus "if" if A1 > A0: return A0 + (A1 - A0) * (block.timestamp - t0) / (t1 - t0) else: return A0 - (A0 - A1) * (block.timestamp - t0) / (t1 - t0) else: # when t1 == 0 or block.timestamp >= t1 return A1 @view @external def admin_fee() -> uint256: return ADMIN_FEE @view @external def A() -> uint256: return self._A() / A_PRECISION @view @external def A_precise() -> uint256: return self._A() @pure @internal def _xp_mem(_rates: uint256[N_COINS], _balances: uint256[N_COINS]) -> uint256[N_COINS]: result: uint256[N_COINS] = empty(uint256[N_COINS]) for i in range(N_COINS): result[i] = _rates[i] * _balances[i] / PRECISION return result @pure @internal def get_D(_xp: uint256[N_COINS], _amp: uint256) -> uint256: """ D invariant calculation in non-overflowing integer operations iteratively A * sum(x_i) * n**n + D = A * D * n**n + D**(n+1) / (n**n * prod(x_i)) Converging solution: D[j+1] = (A * n**n * sum(x_i) - D[j]**(n+1) / (n**n prod(x_i))) / (A * n**n - 1) """ S: uint256 = 0 for x in _xp: S += x if S == 0: return 0 D: uint256 = S Ann: uint256 = _amp * N_COINS for i in range(255): D_P: uint256 = D * D / _xp[0] * D / _xp[1] / (N_COINS)**2 Dprev: uint256 = D D = (Ann * S / A_PRECISION + D_P * N_COINS) * D / ((Ann - A_PRECISION) * D / A_PRECISION + (N_COINS + 1) * D_P) # Equality with the precision of 1 if D > Dprev: if D - Dprev <= 1: return D else: if Dprev - D <= 1: return D # convergence typically occurs in 4 rounds or less, this should be unreachable! # if it does happen the pool is borked and LPs can withdraw via `remove_liquidity` raise @view @internal def get_D_mem(_rates: uint256[N_COINS], _balances: uint256[N_COINS], _amp: uint256) -> uint256: xp: uint256[N_COINS] = self._xp_mem(_rates, _balances) return self.get_D(xp, _amp) @view @external def get_virtual_price() -> uint256: """ @notice The current virtual price of the pool LP token @dev Useful for calculating profits @return LP token virtual price normalized to 1e18 """ amp: uint256 = self._A() balances: uint256[N_COINS] = self._balances() xp: uint256[N_COINS] = self._xp_mem(self.rate_multipliers, balances) D: uint256 = self.get_D(xp, amp) # D is in the units similar to DAI (e.g. converted to precision 1e18) # When balanced, D = n * x_u - total virtual value of the portfolio return D * PRECISION / self.totalSupply @view @external def calc_token_amount(_amounts: uint256[N_COINS], _is_deposit: bool) -> uint256: """ @notice Calculate addition or reduction in token supply from a deposit or withdrawal @dev This calculation accounts for slippage, but not fees. Needed to prevent front-running, not for precise calculations! @param _amounts Amount of each coin being deposited @param _is_deposit set True for deposits, False for withdrawals @return Expected amount of LP tokens received """ amp: uint256 = self._A() balances: uint256[N_COINS] = self._balances() D0: uint256 = self.get_D_mem(self.rate_multipliers, balances, amp) for i in range(N_COINS): amount: uint256 = _amounts[i] if _is_deposit: balances[i] += amount else: balances[i] -= amount D1: uint256 = self.get_D_mem(self.rate_multipliers, balances, amp) diff: uint256 = 0 if _is_deposit: diff = D1 - D0 else: diff = D0 - D1 return diff * self.totalSupply / D0 @external @nonreentrant('lock') def add_liquidity( _amounts: uint256[N_COINS], _min_mint_amount: uint256, _receiver: address = msg.sender ) -> uint256: """ @notice Deposit coins into the pool @param _amounts List of amounts of coins to deposit @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit @param _receiver Address that owns the minted LP tokens @return Amount of LP tokens received by depositing """ amp: uint256 = self._A() old_balances: uint256[N_COINS] = self._balances() rates: uint256[N_COINS] = self.rate_multipliers # Initial invariant D0: uint256 = self.get_D_mem(rates, old_balances, amp) total_supply: uint256 = self.totalSupply new_balances: uint256[N_COINS] = old_balances for i in range(N_COINS): amount: uint256 = _amounts[i] if amount > 0: coin: address = self.coins[i] initial: uint256 = ERC20(coin).balanceOf(self) response: Bytes[32] = raw_call( coin, concat( method_id("transferFrom(address,address,uint256)"), convert(msg.sender, bytes32), convert(self, bytes32), convert(amount, bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) # dev: failed transfer new_balances[i] += ERC20(coin).balanceOf(self) - initial else: assert total_supply != 0 # dev: initial deposit requires all coins # Invariant after change D1: uint256 = self.get_D_mem(rates, new_balances, amp) assert D1 > D0 # We need to recalculate the invariant accounting for fees # to calculate fair user's share fees: uint256[N_COINS] = empty(uint256[N_COINS]) mint_amount: uint256 = 0 if total_supply > 0: # Only account for fees if we are not the first to deposit base_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1)) for i in range(N_COINS): ideal_balance: uint256 = D1 * old_balances[i] / D0 difference: uint256 = 0 new_balance: uint256 = new_balances[i] if ideal_balance > new_balance: difference = ideal_balance - new_balance else: difference = new_balance - ideal_balance fees[i] = base_fee * difference / FEE_DENOMINATOR self.admin_balances[i] += fees[i] * ADMIN_FEE / FEE_DENOMINATOR new_balances[i] -= fees[i] D2: uint256 = self.get_D_mem(rates, new_balances, amp) mint_amount = total_supply * (D2 - D0) / D0 else: mint_amount = D1 # Take the dust if there was any assert mint_amount >= _min_mint_amount, "Slippage screwed you" # Mint pool tokens total_supply += mint_amount self.balanceOf[_receiver] += mint_amount self.totalSupply = total_supply log Transfer(ZERO_ADDRESS, _receiver, mint_amount) log AddLiquidity(msg.sender, _amounts, fees, D1, total_supply) return mint_amount @view @internal def get_y(i: int128, j: int128, x: uint256, xp: uint256[N_COINS]) -> uint256: """ Calculate x[j] if one makes x[i] = x Done by solving quadratic equation iteratively. x_1**2 + x_1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) x_1**2 + b*x_1 = c x_1 = (x_1**2 + c) / (2*x_1 + b) """ # x in the input is converted to the same price/precision assert i != j # dev: same coin assert j >= 0 # dev: j below zero assert j < N_COINS # dev: j above N_COINS # should be unreachable, but good for safety assert i >= 0 assert i < N_COINS amp: uint256 = self._A() D: uint256 = self.get_D(xp, amp) S_: uint256 = 0 _x: uint256 = 0 y_prev: uint256 = 0 c: uint256 = D Ann: uint256 = amp * N_COINS for _i in range(N_COINS): if _i == i: _x = x elif _i != j: _x = xp[_i] else: continue S_ += _x c = c * D / (_x * N_COINS) c = c * D * A_PRECISION / (Ann * N_COINS) b: uint256 = S_ + D * A_PRECISION / Ann # - D y: uint256 = D for _i in range(255): y_prev = y y = (y*y + c) / (2 * y + b - D) # Equality with the precision of 1 if y > y_prev: if y - y_prev <= 1: return y else: if y_prev - y <= 1: return y raise @view @external def get_dy(i: int128, j: int128, dx: uint256) -> uint256: """ @notice Calculate the current output dy given input dx @dev Index values can be found via the `coins` public getter method @param i Index value for the coin to send @param j Index valie of the coin to recieve @param dx Amount of `i` being exchanged @return Amount of `j` predicted """ rates: uint256[N_COINS] = self.rate_multipliers xp: uint256[N_COINS] = self._xp_mem(rates, self._balances()) x: uint256 = xp[i] + (dx * rates[i] / PRECISION) y: uint256 = self.get_y(i, j, x, xp) dy: uint256 = xp[j] - y - 1 fee: uint256 = self.fee * dy / FEE_DENOMINATOR return (dy - fee) * PRECISION / rates[j] @external @nonreentrant('lock') def exchange( i: int128, j: int128, _dx: uint256, _min_dy: uint256, _receiver: address = msg.sender, ) -> uint256: """ @notice Perform an exchange between two coins @dev Index values can be found via the `coins` public getter method @param i Index value for the coin to send @param j Index valie of the coin to recieve @param _dx Amount of `i` being exchanged @param _min_dy Minimum amount of `j` to receive @return Actual amount of `j` received """ rates: uint256[N_COINS] = self.rate_multipliers old_balances: uint256[N_COINS] = self._balances() xp: uint256[N_COINS] = self._xp_mem(rates, old_balances) coin: address = self.coins[i] dx: uint256 = ERC20(coin).balanceOf(self) response: Bytes[32] = raw_call( coin, concat( method_id("transferFrom(address,address,uint256)"), convert(msg.sender, bytes32), convert(self, bytes32), convert(_dx, bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) dx = ERC20(coin).balanceOf(self) - dx x: uint256 = xp[i] + dx * rates[i] / PRECISION y: uint256 = self.get_y(i, j, x, xp) dy: uint256 = xp[j] - y - 1 # -1 just in case there were some rounding errors dy_fee: uint256 = dy * self.fee / FEE_DENOMINATOR # Convert all to real units dy = (dy - dy_fee) * PRECISION / rates[j] assert dy >= _min_dy, "Exchange resulted in fewer coins than expected" self.admin_balances[j] += (dy_fee * ADMIN_FEE / FEE_DENOMINATOR) * PRECISION / rates[j] response = raw_call( self.coins[j], concat( method_id("transfer(address,uint256)"), convert(_receiver, bytes32), convert(dy, bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) log TokenExchange(msg.sender, i, _dx, j, dy) return dy @external @nonreentrant('lock') def remove_liquidity( _burn_amount: uint256, _min_amounts: uint256[N_COINS], _receiver: address = msg.sender ) -> uint256[N_COINS]: """ @notice Withdraw coins from the pool @dev Withdrawal amounts are based on current deposit ratios @param _burn_amount Quantity of LP tokens to burn in the withdrawal @param _min_amounts Minimum amounts of underlying coins to receive @param _receiver Address that receives the withdrawn coins @return List of amounts of coins that were withdrawn """ total_supply: uint256 = self.totalSupply amounts: uint256[N_COINS] = empty(uint256[N_COINS]) balances: uint256[N_COINS] = self._balances() for i in range(N_COINS): value: uint256 = balances[i] * _burn_amount / total_supply assert value >= _min_amounts[i], "Withdrawal resulted in fewer coins than expected" amounts[i] = value response: Bytes[32] = raw_call( self.coins[i], concat( method_id("transfer(address,uint256)"), convert(_receiver, bytes32), convert(value, bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) total_supply -= _burn_amount self.balanceOf[msg.sender] -= _burn_amount self.totalSupply = total_supply log Transfer(msg.sender, ZERO_ADDRESS, _burn_amount) log RemoveLiquidity(msg.sender, amounts, empty(uint256[N_COINS]), total_supply) return amounts @external @nonreentrant('lock') def remove_liquidity_imbalance( _amounts: uint256[N_COINS], _max_burn_amount: uint256, _receiver: address = msg.sender ) -> uint256: """ @notice Withdraw coins from the pool in an imbalanced amount @param _amounts List of amounts of underlying coins to withdraw @param _max_burn_amount Maximum amount of LP token to burn in the withdrawal @param _receiver Address that receives the withdrawn coins @return Actual amount of the LP token burned in the withdrawal """ amp: uint256 = self._A() old_balances: uint256[N_COINS] = self._balances() rates: uint256[N_COINS] = self.rate_multipliers D0: uint256 = self.get_D_mem(rates, old_balances, amp) new_balances: uint256[N_COINS] = old_balances for i in range(N_COINS): amount: uint256 = _amounts[i] if amount != 0: new_balances[i] -= amount response: Bytes[32] = raw_call( self.coins[i], concat( method_id("transfer(address,uint256)"), convert(_receiver, bytes32), convert(amount, bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) D1: uint256 = self.get_D_mem(rates, new_balances, amp) fees: uint256[N_COINS] = empty(uint256[N_COINS]) base_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1)) for i in range(N_COINS): ideal_balance: uint256 = D1 * old_balances[i] / D0 difference: uint256 = 0 new_balance: uint256 = new_balances[i] if ideal_balance > new_balance: difference = ideal_balance - new_balance else: difference = new_balance - ideal_balance fees[i] = base_fee * difference / FEE_DENOMINATOR self.admin_balances[i] += fees[i] * ADMIN_FEE / FEE_DENOMINATOR new_balances[i] -= fees[i] D2: uint256 = self.get_D_mem(rates, new_balances, amp) total_supply: uint256 = self.totalSupply burn_amount: uint256 = ((D0 - D2) * total_supply / D0) + 1 assert burn_amount > 1 # dev: zero tokens burned assert burn_amount <= _max_burn_amount, "Slippage screwed you" total_supply -= burn_amount self.totalSupply = total_supply self.balanceOf[msg.sender] -= burn_amount log Transfer(msg.sender, ZERO_ADDRESS, burn_amount) log RemoveLiquidityImbalance(msg.sender, _amounts, fees, D1, total_supply) return burn_amount @pure @internal def get_y_D(A: uint256, i: int128, xp: uint256[N_COINS], D: uint256) -> uint256: """ Calculate x[i] if one reduces D from being calculated for xp to D Done by solving quadratic equation iteratively. x_1**2 + x_1 * (sum' - (A*n**n - 1) * D / (A * n**n)) = D ** (n + 1) / (n ** (2 * n) * prod' * A) x_1**2 + b*x_1 = c x_1 = (x_1**2 + c) / (2*x_1 + b) """ # x in the input is converted to the same price/precision assert i >= 0 # dev: i below zero assert i < N_COINS # dev: i above N_COINS S_: uint256 = 0 _x: uint256 = 0 y_prev: uint256 = 0 c: uint256 = D Ann: uint256 = A * N_COINS for _i in range(N_COINS): if _i != i: _x = xp[_i] else: continue S_ += _x c = c * D / (_x * N_COINS) c = c * D * A_PRECISION / (Ann * N_COINS) b: uint256 = S_ + D * A_PRECISION / Ann y: uint256 = D for _i in range(255): y_prev = y y = (y*y + c) / (2 * y + b - D) # Equality with the precision of 1 if y > y_prev: if y - y_prev <= 1: return y else: if y_prev - y <= 1: return y raise @view @internal def _calc_withdraw_one_coin(_burn_amount: uint256, i: int128) -> uint256[2]: # First, need to calculate # * Get current D # * Solve Eqn against y_i for D - _token_amount amp: uint256 = self._A() rates: uint256[N_COINS] = self.rate_multipliers xp: uint256[N_COINS] = self._xp_mem(rates, self._balances()) D0: uint256 = self.get_D(xp, amp) total_supply: uint256 = self.totalSupply D1: uint256 = D0 - _burn_amount * D0 / total_supply new_y: uint256 = self.get_y_D(amp, i, xp, D1) base_fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1)) xp_reduced: uint256[N_COINS] = empty(uint256[N_COINS]) for j in range(N_COINS): dx_expected: uint256 = 0 xp_j: uint256 = xp[j] if j == i: dx_expected = xp_j * D1 / D0 - new_y else: dx_expected = xp_j - xp_j * D1 / D0 xp_reduced[j] = xp_j - base_fee * dx_expected / FEE_DENOMINATOR dy: uint256 = xp_reduced[i] - self.get_y_D(amp, i, xp_reduced, D1) dy_0: uint256 = (xp[i] - new_y) * PRECISION / rates[i] # w/o fees dy = (dy - 1) * PRECISION / rates[i] # Withdraw less to account for rounding errors return [dy, dy_0 - dy] @view @external def calc_withdraw_one_coin(_burn_amount: uint256, i: int128) -> uint256: """ @notice Calculate the amount received when withdrawing a single coin @param _burn_amount Amount of LP tokens to burn in the withdrawal @param i Index value of the coin to withdraw @return Amount of coin received """ return self._calc_withdraw_one_coin(_burn_amount, i)[0] @external @nonreentrant('lock') def remove_liquidity_one_coin( _burn_amount: uint256, i: int128, _min_received: uint256, _receiver: address = msg.sender, ) -> uint256: """ @notice Withdraw a single coin from the pool @param _burn_amount Amount of LP tokens to burn in the withdrawal @param i Index value of the coin to withdraw @param _min_received Minimum amount of coin to receive @param _receiver Address that receives the withdrawn coins @return Amount of coin received """ dy: uint256[2] = self._calc_withdraw_one_coin(_burn_amount, i) assert dy[0] >= _min_received, "Not enough coins removed" self.admin_balances[i] += dy[1] * ADMIN_FEE / FEE_DENOMINATOR total_supply: uint256 = self.totalSupply - _burn_amount self.totalSupply = total_supply self.balanceOf[msg.sender] -= _burn_amount log Transfer(msg.sender, ZERO_ADDRESS, _burn_amount) response: Bytes[32] = raw_call( self.coins[i], concat( method_id("transfer(address,uint256)"), convert(_receiver, bytes32), convert(dy[0], bytes32), ), max_outsize=32, ) if len(response) > 0: assert convert(response, bool) log RemoveLiquidityOne(msg.sender, _burn_amount, dy[0], total_supply) return dy[0] @external def ramp_A(_future_A: uint256, _future_time: uint256): assert msg.sender == Factory(self.factory).admin() # dev: only owner assert block.timestamp >= self.initial_A_time + MIN_RAMP_TIME assert _future_time >= block.timestamp + MIN_RAMP_TIME # dev: insufficient time _initial_A: uint256 = self._A() _future_A_p: uint256 = _future_A * A_PRECISION assert _future_A > 0 and _future_A < MAX_A if _future_A_p < _initial_A: assert _future_A_p * MAX_A_CHANGE >= _initial_A else: assert _future_A_p <= _initial_A * MAX_A_CHANGE self.initial_A = _initial_A self.future_A = _future_A_p self.initial_A_time = block.timestamp self.future_A_time = _future_time log RampA(_initial_A, _future_A_p, block.timestamp, _future_time) @external def stop_ramp_A(): assert msg.sender == Factory(self.factory).admin() # dev: only owner current_A: uint256 = self._A() self.initial_A = current_A self.future_A = current_A self.initial_A_time = block.timestamp self.future_A_time = block.timestamp # now (block.timestamp < t1) is always False, so we return saved A log StopRampA(current_A, block.timestamp) @external def withdraw_admin_fees(): receiver: address = Factory(self.factory).get_fee_receiver(self) for i in range(N_COINS): amount: uint256 = self.admin_balances[i] if amount != 0: coin: address = self.coins[i] raw_call( coin, concat( method_id("transfer(address,uint256)"), convert(receiver, bytes32), convert(amount, bytes32) ) ) self.admin_balances[i] = 0 @pure @external def version() -> String[8]: return VERSION
[{"name":"Transfer","inputs":[{"name":"sender","type":"address","indexed":true},{"name":"receiver","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true},{"name":"spender","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"TokenExchange","inputs":[{"name":"buyer","type":"address","indexed":true},{"name":"sold_id","type":"int128","indexed":false},{"name":"tokens_sold","type":"uint256","indexed":false},{"name":"bought_id","type":"int128","indexed":false},{"name":"tokens_bought","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"AddLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"fees","type":"uint256[2]","indexed":false},{"name":"invariant","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidity","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"fees","type":"uint256[2]","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityOne","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amount","type":"uint256","indexed":false},{"name":"coin_amount","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RemoveLiquidityImbalance","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"token_amounts","type":"uint256[2]","indexed":false},{"name":"fees","type":"uint256[2]","indexed":false},{"name":"invariant","type":"uint256","indexed":false},{"name":"token_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RampA","inputs":[{"name":"old_A","type":"uint256","indexed":false},{"name":"new_A","type":"uint256","indexed":false},{"name":"initial_time","type":"uint256","indexed":false},{"name":"future_time","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"StopRampA","inputs":[{"name":"A","type":"uint256","indexed":false},{"name":"t","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_coins","type":"address[4]"},{"name":"_rate_multipliers","type":"uint256[4]"},{"name":"_A","type":"uint256"},{"name":"_fee","type":"uint256"}],"outputs":[],"gas":516829},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":390},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":79005},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":116985},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39211},{"stateMutability":"nonpayable","type":"function","name":"permit","inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_deadline","type":"uint256"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"outputs":[{"name":"","type":"bool"}],"gas":102281},{"stateMutability":"view","type":"function","name":"balances","inputs":[{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":15123},{"stateMutability":"view","type":"function","name":"get_balances","inputs":[],"outputs":[{"name":"","type":"uint256[2]"}],"gas":15168},{"stateMutability":"view","type":"function","name":"admin_fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":600},{"stateMutability":"view","type":"function","name":"A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10568},{"stateMutability":"view","type":"function","name":"A_precise","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":10568},{"stateMutability":"view","type":"function","name":"get_virtual_price","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":659650},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}],"gas":1294831},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":2169064},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_min_mint_amount","type":"uint256"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2169064},{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"dx","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":1006492},{"stateMutability":"nonpayable","type":"function","name":"exchange","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"_dx","type":"uint256"},{"name":"_min_dy","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":1132264},{"stateMutability":"nonpayable","type":"function","name":"exchange","inputs":[{"name":"i","type":"int128"},{"name":"j","type":"int128"},{"name":"_dx","type":"uint256"},{"name":"_min_dy","type":"uint256"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1132264},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[2]"}],"outputs":[{"name":"","type":"uint256[2]"}],"gas":181188},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[2]"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256[2]"}],"gas":181188},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":2159222},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[2]"},{"name":"_max_burn_amount","type":"uint256"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2159222},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":1259},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_received","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":1545693},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_burn_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_received","type":"uint256"},{"name":"_receiver","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1545693},{"stateMutability":"nonpayable","type":"function","name":"ramp_A","inputs":[{"name":"_future_A","type":"uint256"},{"name":"_future_time","type":"uint256"}],"outputs":[],"gas":161224},{"stateMutability":"nonpayable","type":"function","name":"stop_ramp_A","inputs":[],"outputs":[],"gas":157447},{"stateMutability":"nonpayable","type":"function","name":"withdraw_admin_fees","inputs":[],"outputs":[],"gas":64049},{"stateMutability":"pure","type":"function","name":"version","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":6677},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3225},{"stateMutability":"view","type":"function","name":"admin_balances","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3255},{"stateMutability":"view","type":"function","name":"fee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3240},{"stateMutability":"view","type":"function","name":"initial_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3270},{"stateMutability":"view","type":"function","name":"future_A","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3300},{"stateMutability":"view","type":"function","name":"initial_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3330},{"stateMutability":"view","type":"function","name":"future_A_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3360},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13679},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11438},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3716},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4012},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3510},{"stateMutability":"view","type":"function","name":"DOMAIN_SEPARATOR","inputs":[],"outputs":[{"name":"","type":"bytes32"}],"gas":3540},{"stateMutability":"view","type":"function","name":"nonces","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3836}]
Contract Creation Code
617a69600655613f6456600436101561000d57612fd6565b60046000601c3760005134613f555763a461b3c88118610399576004356004016020813511613f5557808035602001808260e037505050602435600401600a813511613f55578080356020018082610120375050506044358060a01c613f5557610160526064358060a01c613f5557610180526084358060a01c613f55576101a05260a4358060a01c613f55576101c052600654613f55576101e060006002818352015b6101606101e0516004811015613f5557602002015161020052610200516100d75761011e565b6102005160016101e0516002811015613f5557026002015560206101e0510260c4013560016101e0516002811015613f555702600b015581516001018083528114156100b1575b5050610144356064808202821582848304141715613f5557905090506101e0526101e0516007556101e05160085561016435600655336001556000601d610260527f43757276652e666920466163746f727920506c61696e20506f6f6c3a2000000061028052610260601d806020846102a00101826020850160045afa50508051820191505060e06020806020846102a00101826020850160045afa505080518201915050806102a0526102a09050805160200180610200828460045afa9050505061020080600d602082510160c060006003818352015b8260c051602002111561020857610227565b60c05160200285015160c05185015581516001018083528114156101f6575b5050505050506000610120600a806020846102a00101826020850160045afa5050805182019150506002610260527f2d66000000000000000000000000000000000000000000000000000000000000610280526102606002806020846102a00101826020850160045afa505080518201915050806102a0526102a09050806010602082510160c060006002818352015b8260c05160200211156102c9576102e8565b60c05160200285015160c05185015581516001018083528114156102b7575b5050505050507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61034052610200805160208201209050610360527f572f01d824885a118d5d21c74542f263b131d2897955c62a721594f1d7c3b2e261038052466103a052306103c05260a0610320526103208051602082012090506015553060007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000610260526020610260a3005b63313ce56781186103af57601260e052602060e0f35b63a9059cbb81186103f1576004358060a01c613f5557610160523360e0526101605161010052602435610120526103e4612fdc565b6001610180526020610180f35b6323b872dd81186104c5576004358060a01c613f5557610160526024358060a01c613f5557610180526101605160e052610180516101005260443561012052610438612fdc565b60136101605160a05260805260406080203360a0526080526040608020546101a0527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101a051146104b8576101a051604435808210613f55578082039050905060136101605160a05260805260406080203360a0526080526040608020555b60016101c05260206101c0f35b63095ea7b3811861053d576004358060a01c613f555760e05260243560133360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63d505accf81186108aa576004358060a01c613f555760e0526024358060a01c613f5557610100526084358060081c613f555761012052600060e05114613f55576064354211613f5557601660e05160a0526080526040608020546101405260006002610400527f1901000000000000000000000000000000000000000000000000000000000000610420526104006002806020846106000101826020850160045afa5050805182019150506015546020826106000101526020810190507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96105405260e0516105605261010051610580526044356105a052610140516105c0526064356105e05260c0610520526105208051602082012090506020826106000101526020810190508061060052610600905080516020820120905061016052600060e0513b116106be5760e0516101605161018052610120516101a052604060a46101c03760206080608061018060015afa5060805118613f555761081e565b600060a4356102205260c435610240526040610200526102006040806020846102c00101826020850160045afa505080518201915050601f60016020820661026001602082840111613f55576020806102808261012060045afa5050818152905090506001806020846102c00101826020850160045afa505080518201915050806102c0526102c09050805160200180610180828460045afa905050507f1626ba7e00000000000000000000000000000000000000000000000000000000631626ba7e610200526102208060406101605182526020820191508082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810150505050602061020060c461021c60e0515afa61080b573d600060003e3d6000fd5b601f3d1115613f55576102005118613f55575b604435601360e05160a05260805260406080206101005160a0526080526040608020556101405160018181830110613f555780820190509050601660e05160a0526080526040608020556101005160e0517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925604435610180526020610180a36001610180526020610180f35b634903b0d181186108df576108c0610180613065565b6101806004356002811015613f555760200201516101c05260206101c0f35b6314f05979811861090f576108f5610180613065565b61018080516101c05280602001516101e0525060406101c0f35b63fee3f7f981186109295764012a05f20060e052602060e0f35b63f446c1d081186109575761093f610160613119565b61016051606480820490509050610180526020610180f35b6376a2f0f0811861097c5761096d610160613119565b61016051610180526020610180f35b63bb7b8b808118610a5957610992610220613119565b61022051610200526109a5610260613065565b61026080516102205280602001516102405250600b5460e052600c5461010052610220516101205261024051610140526109e06102a0613254565b6102a0805161026052806020015161028052506102605160e05261028051610100526102005161012052610a156102c06132ec565b6102c0516102a0526102a051670de0b6b3a7640000808202821582848304141715613f555790509050601454808015613f55578204905090506102c05260206102c0f35b63ed8e84f38118610c27576044358060011c613f555761032052610a7e610360613119565b6103605161034052610a916103a0613065565b6103a080516103605280602001516103805250600b5461020052600c5461022052610360516102405261038051610260526103405161028052610ad56103c061353f565b6103c0516103a0526103c060006002818352015b60206103c05102600401356103e05261032051610b30576103606103c0516002811015613f55576020020180516103e051808210613f555780820390509050815250610b5e565b6103606103c0516002811015613f55576020020180516103e0518181830110613f5557808201905090508152505b8151600101808352811415610ae9575050600b5461020052600c5461022052610360516102405261038051610260526103405161028052610ba06103e061353f565b6103e0516103c05260006103e05261032051610bd5576103a0516103c051808210613f5557808203905090506103e052610bf0565b6103c0516103a051808210613f5557808203905090506103e0525b6103e051601454808202821582848304141715613f5557905090506103a051808015613f5557820490509050610400526020610400f35b630b4c7e4d8118610c3c573361032052610c57565b630c3e4b548118611329576064358060a01c613f5557610320525b600054613f55576001600055610c6e610360613119565b6103605161034052610c816103a0613065565b6103a080516103605280602001516103805250600b546103a052600c546103c0526103a051610200526103c05161022052610360516102405261038051610260526103405161028052610cd561040061353f565b610400516103e052601454610400526103605161042052610380516104405261046060006002818352015b60206104605102600401356104805260006104805111610d2a5760006104005114613f5557610ef8565b6001610460516002811015613f555702600201546104a0526370a082316104e052306105005260206104e060246104fc6104a0515afa610d6f573d600060003e3d6000fd5b601f3d1115613f55576104e0516104c05260006004610520527f23b872dd00000000000000000000000000000000000000000000000000000000610540526105206004806020846105600101826020850160045afa5050805182019150503360208261056001015260208101905030602082610560010152602081019050610480516020826105600101526020810190508061056052610560505060206106206105605161058060006104a0515af1610e2d573d600060003e3d6000fd5b61060060203d808211610e405781610e42565b805b9050905081528051602001806104e0828460045afa9050505060006104e0511115610e8257610500516104e05181816020036008021c9050905015613f55575b610420610460516002811015613f55576020020180516370a082316105205230610540526020610520602461053c6104a0515afa610ec5573d600060003e3d6000fd5b601f3d1115613f5557610520516104c051808210613f5557808203905090508181830110613f5557808201905090508152505b8151600101808352811415610d005750506103a051610200526103c05161022052610420516102405261044051610260526103405161028052610f3c61048061353f565b61048051610460526103e051610460511115613f55576060366104803760006104005111610f7157610460516104c0526111b9565b6006546002808202821582848304141715613f5557905090506004808204905090506104e05261050060006002818352015b61046051610360610500516002811015613f55576020020151808202821582848304141715613f5557905090506103e051808015613f555782049050905061052052600061054052610420610500516002811015613f5557602002015161056052610560516105205111611030576105605161052051808210613f5557808203905090506105405261104b565b6105205161056051808210613f555780820390509050610540525b6104e05161054051808202821582848304141715613f5557905090506402540be40080820490509050610480610500516002811015613f555760200201526001610500516002811015613f5557026004018054610480610500516002811015613f5557602002015164012a05f200808202821582848304141715613f5557905090506402540be400808204905090508181830110613f555780820190509050815550610420610500516002811015613f5557602002018051610480610500516002811015613f55576020020151808210613f5557808203905090508152508151600101808352811415610fa35750506103a051610200526103c0516102205261042051610240526104405161026052610340516102805261116d61052061353f565b610520516105005261040051610500516103e051808210613f555780820390509050808202821582848304141715613f5557905090506103e051808015613f55578204905090506104c0525b6044356104c051101561123d5760146104e0527f536c697070616765207363726577656420796f75000000000000000000000000610500526104e0506104e0518061050001818260206001820306601f82010390500336823750506308c379a06104a05260206104c0526104e05160206001820306601f82010390506044016104bcfd5b61040080516104c0518181830110613f55578082019050905081525060126103205160a052608052604060802080546104c0518181830110613f555780820190509050815550610400516014556103205160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6104c0516104e05260206104e0a3337f26f55a85081d24974e85c6c00045d0f0453991e95873f52bff0d21af4079a7686004356104e0526024356105005261048051610520526104a051610540526104605161056052610400516105805260c06104e0a26104c0516104e05260206104e06000600055f35b635e0d443f811861153c576004358060801d81607f1d18613f55576103e0526024358060801d81607f1d18613f555761040052600b5461042052600c5461044052610420516105205261044051610540526113856104a0613065565b6104a0805161056052806020015161058052506105205160e0526105405161010052610560516101205261058051610140526113c26104e0613254565b6104e0805161046052806020015161048052506104606103e0516002811015613f555760200201516044356104206103e0516002811015613f55576020020151808202821582848304141715613f555790509050670de0b6b3a7640000808204905090508181830110613f5557808201905090506104a0526103e0516102005261040051610220526104a051610240526104605161026052610480516102805261146d6104e06135a7565b6104e0516104c052610460610400516002811015613f555760200201516104c051808210613f5557808203905090506001808210613f5557808203905090506104e0526006546104e051808202821582848304141715613f5557905090506402540be40080820490509050610500526104e05161050051808210613f555780820390509050670de0b6b3a7640000808202821582848304141715613f555790509050610420610400516002811015613f55576020020151808015613f5557820490509050610520526020610520f35b633df02124811861155157336104205261156c565b63ddc1f59d8118611bac576084358060a01c613f5557610420525b6004358060801d81607f1d18613f55576103e0526024358060801d81607f1d18613f555761040052600054613f55576001600055600b5461044052600c54610460526115b96104c0613065565b6104c080516104805280602001516104a052506104405160e052610460516101005261048051610120526104a051610140526115f6610500613254565b61050080516104c05280602001516104e0525060016103e0516002811015613f55570260020154610500526370a082316105405230610560526020610540602461055c610500515afa61164e573d600060003e3d6000fd5b601f3d1115613f5557610540516105205260006004610580527f23b872dd000000000000000000000000000000000000000000000000000000006105a0526105806004806020846105c00101826020850160045afa505080518201915050336020826105c0010152602081019050306020826105c00101526020810190506044356020826105c0010152602081019050806105c0526105c0505060206106806105c0516105e06000610500515af161170b573d600060003e3d6000fd5b61066060203d80821161171e5781611720565b805b905090508152805160200180610540828460045afa90505050600061054051111561176057610560516105405181816020036008021c9050905015613f55575b6370a0823161058052306105a0526020610580602461059c610500515afa61178d573d600060003e3d6000fd5b601f3d1115613f55576105805161052051808210613f555780820390509050610520526104c06103e0516002811015613f55576020020151610520516104406103e0516002811015613f55576020020151808202821582848304141715613f555790509050670de0b6b3a7640000808204905090508181830110613f555780820190509050610580526103e05161020052610400516102205261058051610240526104c051610260526104e051610280526118496105c06135a7565b6105c0516105a0526104c0610400516002811015613f555760200201516105a051808210613f5557808203905090506001808210613f5557808203905090506105c0526105c051600654808202821582848304141715613f5557905090506402540be400808204905090506105e0526105c0516105e051808210613f555780820390509050670de0b6b3a7640000808202821582848304141715613f555790509050610440610400516002811015613f55576020020151808015613f55578204905090506105c0526064356105c05110156119ba57602e610600527f45786368616e676520726573756c74656420696e20666577657220636f696e73610620527f207468616e2065787065637465640000000000000000000000000000000000006106405261060050610600518061062001818260206001820306601f82010390500336823750506308c379a06105c05260206105e0526106005160206001820306601f82010390506044016105dcfd5b6001610400516002811015613f55570260040180546105e05164012a05f200808202821582848304141715613f5557905090506402540be40080820490509050670de0b6b3a7640000808202821582848304141715613f555790509050610440610400516002811015613f55576020020151808015613f55578204905090508181830110613f55578082019050905081555060006004610600527fa9059cbb00000000000000000000000000000000000000000000000000000000610620526106006004806020846106400101826020850160045afa505080518201915050610420516020826106400101526020810190506105c0516020826106400101526020810190508061064052610640505060206106e06106405161066060006001610400516002811015613f555702600201545af1611afc573d600060003e3d6000fd5b6106c060203d808211611b0f5781611b11565b805b905090508152805160200180610540828460045afa905050506000610540511115611b5157610560516105405181816020036008021c9050905015613f55575b337f8b3e96f2b889fa771c53c981b40daf005f63f637f1869f707052d15a3dd971406103e051610600526044356106205261040051610640526105c051610660526080610600a26105c0516106005260206106006000600055f35b635b36389c8118611bc1573361018052611bdc565b633eb1719f8118611f19576064358060a01c613f5557610180525b600054613f555760016000556014546101a0526040366101c037611c01610240613065565b6102408051610200528060200151610220525061024060006002818352015b610200610240516002811015613f55576020020151600435808202821582848304141715613f5557905090506101a051808015613f5557820490509050610260526020610240510260240135610260511015611d12576030610280527f5769746864726177616c20726573756c74656420696e20666577657220636f696102a0527f6e73207468616e206578706563746564000000000000000000000000000000006102c0526102805061028051806102a001818260206001820306601f82010390500336823750506308c379a0610240526020610260526102805160206001820306601f820103905060440161025cfd5b610260516101c0610240516002811015613f55576020020152600060046102c0527fa9059cbb000000000000000000000000000000000000000000000000000000006102e0526102c06004806020846103000101826020850160045afa50508051820191505061018051602082610300010152602081019050610260516020826103000101526020810190508061030052610300505060206103a06103005161032060006001610240516002811015613f555702600201545af1611ddb573d600060003e3d6000fd5b61038060203d808211611dee5781611df0565b805b905090508152805160200180610280828460045afa905050506000610280511115611e30576102a0516102805181816020036008021c9050905015613f55575b8151600101808352811415611c205750506101a08051600435808210613f55578082039050905081525060123360a05260805260406080208054600435808210613f5557808203905090508155506101a0516014556000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610240526020610240a3337f7c363854ccf79623411f8995b362bce5eddff18c927edc6f5dbbb5e05819a82c6101c051610240526101e05161026052604036610280376101a0516102c05260a0610240a26101c051610240526101e0516102605260406102406000600055f35b63e31032738118611f2e573361032052611f49565b6352d2cfdd811861255a576064358060a01c613f5557610320525b600054613f55576001600055611f60610360613119565b6103605161034052611f736103a0613065565b6103a080516103605280602001516103805250600b546103a052600c546103c0526103a051610200526103c05161022052610360516102405261038051610260526103405161028052611fc761040061353f565b610400516103e0526103605161040052610380516104205261044060006002818352015b6020610440510260040135610460526000610460511461213557610400610440516002811015613f555760200201805161046051808210613f555780820390509050815250600060046104c0527fa9059cbb000000000000000000000000000000000000000000000000000000006104e0526104c06004806020846105000101826020850160045afa50508051820191505061032051602082610500010152602081019050610460516020826105000101526020810190508061050052610500505060206105a06105005161052060006001610440516002811015613f555702600201545af16120e0573d600060003e3d6000fd5b61058060203d8082116120f357816120f5565b805b905090508152805160200180610480828460045afa905050506000610480511115612135576104a0516104805181816020036008021c9050905015613f55575b8151600101808352811415611feb5750506103a051610200526103c0516102205261040051610240526104205161026052610340516102805261217961046061353f565b6104605161044052604036610460376006546002808202821582848304141715613f5557905090506004808204905090506104a0526104c060006002818352015b610440516103606104c0516002811015613f55576020020151808202821582848304141715613f5557905090506103e051808015613f55578204905090506104e0526000610500526104006104c0516002811015613f5557602002015161052052610520516104e0511161224757610520516104e051808210613f55578082039050905061050052612262565b6104e05161052051808210613f555780820390509050610500525b6104a05161050051808202821582848304141715613f5557905090506402540be400808204905090506104606104c0516002811015613f5557602002015260016104c0516002811015613f55570260040180546104606104c0516002811015613f5557602002015164012a05f200808202821582848304141715613f5557905090506402540be400808204905090508181830110613f5557808201905090508155506104006104c0516002811015613f55576020020180516104606104c0516002811015613f55576020020151808210613f55578082039050905081525081516001018083528114156121ba5750506103a051610200526103c051610220526104005161024052610420516102605261034051610280526123846104e061353f565b6104e0516104c0526014546104e0526103e0516104c051808210613f5557808203905090506104e051808202821582848304141715613f5557905090506103e051808015613f555782049050905060018181830110613f555780820190509050610500526001610500511115613f5557604435610500511115612478576014610520527f536c697070616765207363726577656420796f750000000000000000000000006105405261052050610520518061054001818260206001820306601f82010390500336823750506308c379a06104e0526020610500526105205160206001820306601f82010390506044016104fcfd5b6104e0805161050051808210613f5557808203905090508152506104e05160145560123360a0526080526040608020805461050051808210613f5557808203905090508155506000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61050051610520526020610520a3337f2b5508378d7e19e0d5fa338419034731416c4f5b219a10379956f764317fd47e600435610520526024356105405261046051610560526104805161058052610440516105a0526104e0516105c05260c0610520a2610500516105205260206105206000600055f35b63cc2b27d781186125a2576024358060801d81607f1d18613f55576104a052600435610280526104a0516102a0526125936104c0613b87565b6104c051610500526020610500f35b631a4d01d281186125b757336104c0526125d2565b63081579a581186128c2576064358060a01c613f55576104c0525b6024358060801d81607f1d18613f55576104a052600054613f55576001600055600435610280526104a0516102a05261260c610520613b87565b61052080516104e052806020015161050052506044356104e05110156126a3576018610520527f4e6f7420656e6f75676820636f696e732072656d6f76656400000000000000006105405261052050610520518061054001818260206001820306601f82010390500336823750506308c379a06104e0526020610500526105205160206001820306601f82010390506044016104fcfd5b60016104a0516002811015613f55570260040180546105005164012a05f200808202821582848304141715613f5557905090506402540be400808204905090508181830110613f555780820190509050815550601454600435808210613f555780820390509050610520526105205160145560123360a05260805260406080208054600435808210613f5557808203905090508155506000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610540526020610540a360006004610580527fa9059cbb000000000000000000000000000000000000000000000000000000006105a0526105806004806020846105c00101826020850160045afa5050805182019150506104c0516020826105c00101526020810190506104e0516020826105c0010152602081019050806105c0526105c0505060206106606105c0516105e0600060016104a0516002811015613f555702600201545af161281a573d600060003e3d6000fd5b61064060203d80821161282d578161282f565b805b905090508152805160200180610540828460045afa90505050600061054051111561286f57610560516105405181816020036008021c9050905015613f55575b337f5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a0600435610580526104e0516105a052610520516105c0526060610580a26104e0516105805260206105806000600055f35b633c157e648118612a465763f851a440610160526020610160600461017c6001545afa6128f4573d600060003e3d6000fd5b601f3d1115613f5557610160513318613f5557600954620151808181830110613f5557808201905090504210613f555742620151808181830110613f55578082019050905060243510613f555761294c610180613119565b61018051610160526004356064808202821582848304141715613f5557905090506101805260006004351161298257600061298b565b620f4240600435105b15613f55576101605161018051106129c55761016051600a808202821582848304141715613f5557905090506101805111613f55576129e9565b6101605161018051600a808202821582848304141715613f55579050905010613f55575b610160516007556101805160085542600955602435600a557fa2b71ec6df949300b59aab36b55e189697b750119dd349fcfa8c0f779e83c254610160516101a052610180516101c052426101e0526024356102005260806101a0a1005b63551a65888118612aea5763f851a440610160526020610160600461017c6001545afa612a78573d600060003e3d6000fd5b601f3d1115613f5557610160513318613f5557612a96610180613119565b610180516101605261016051600755610160516008554260095542600a557f46e22fb3709ad289f62ce63d469248536dbc78d82b84a3d7e74ad606dc2019386101605161018052426101a0526040610180a1005b6330c540858118612c485763154aa8f56101005230610120526020610100602461011c6001545afa612b21573d600060003e3d6000fd5b601f3d1115613f5557610100518060a01c613f555760e05261010060006002818352015b6001610100516002811015613f555702600401546101205260006101205114612c35576001610100516002811015613f555702600201546101405260006004610160527fa9059cbb00000000000000000000000000000000000000000000000000000000610180526101606004806020846101a00101826020850160045afa50508051820191505060e0516020826101a0010152602081019050610120516020826101a0010152602081019050806101a0526101a05050600060006101a0516101c06000610140515af1612c1e573d600060003e3d6000fd5b60006001610100516002811015613f555702600401555b8151600101808352811415612b45575050005b6354fd4d508118612ce257610120806020808252600660e0527f76352e302e3000000000000000000000000000000000000000000000000000006101005260e0818401808280516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905090508101905090509050610120f35b63c66106578118612d095760016004356002811015613f5557026002015460e052602060e0f35b63e2e7d2648118612d305760016004356002811015613f5557026004015460e052602060e0f35b63ddca3f438118612d475760065460e052602060e0f35b635409491a8118612d5e5760075460e052602060e0f35b63b4b577ad8118612d755760085460e052602060e0f35b632081066c8118612d8c5760095460e052602060e0f35b63140522888118612da357600a5460e052602060e0f35b6306fdde038118612e465760e080602080825280830180600d8082602082540160c060006003818352015b8260c0516020021115612de057612dff565b60c05185015460c0516020028501528151600101808352811415612dce575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118612ee95760e08060208082528083018060108082602082540160c060006002818352015b8260c0516020021115612e8357612ea2565b60c05185015460c0516020028501528151600101808352811415612e71575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6370a082318118612f1e576004358060a01c613f555760e052601260e05160a052608052604060802054610100526020610100f35b63dd62ed3e8118612f71576004358060a01c613f555760e0526024358060a01c613f555761010052601360e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b6318160ddd8118612f885760145460e052602060e0f35b633644e5158118612f9f5760155460e052602060e0f35b637ecebe008118612fd4576004358060a01c613f555760e052601660e05160a052608052604060802054610100526020610100f35b505b60006000fd5b601260e05160a0526080526040608020805461012051808210613f55578082039050905081555060126101005160a05260805260406080208054610120518181830110613f5557808201905090508155506101005160e0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61012051610140526020610140a3565b60403660e03761012060006002818352015b6370a082316101405230610160526020610140602461015c6001610120516002811015613f555702600201545afa6130b4573d600060003e3d6000fd5b601f3d1115613f5557610140516001610120516002811015613f55570260040154808210613f55578082039050905060e0610120516002811015613f55576020020152815160010180835281141561307757505060e051815261010051816020015250565b600a5460e0526008546101005260e051421061313f576101005181525061325256613252565b60075461012052600954610140526101205161010051116131d757610120516101205161010051808210613f5557808203905090504261014051808210613f555780820390509050808202821582848304141715613f55579050905060e05161014051808210613f555780820390509050808015613f5557820490509050808210613f55578082039050905081525061325256613252565b610120516101005161012051808210613f5557808203905090504261014051808210613f555780820390509050808202821582848304141715613f55579050905060e05161014051808210613f555780820390509050808015613f55578204905090508181830110613f555780820190509050815250613252565b565b604036610160376101a060006002818352015b60e06101a0516002811015613f555760200201516101206101a0516002811015613f55576020020151808202821582848304141715613f555790509050670de0b6b3a7640000808204905090506101606101a0516002811015613f55576020020152815160010180835281141561326757505061016051815261018051816020015250565b60006101405261018060006002818352015b6020610180510260e00151610160526101408051610160518181830110613f55578082019050905081525081516001018083528114156132fe5750506101405161334c57600081525061353d565b6101405161016052610120516002808202821582848304141715613f555790509050610180526101a0600060ff818352015b6101605161016051808202821582848304141715613f55579050905060e051808015613f555782049050905061016051808202821582848304141715613f55579050905061010051808015613f55578204905090506004808204905090506101c052610160516101e0526101805161014051808202821582848304141715613f5557905090506064808204905090506101c0516002808202821582848304141715613f5557905090508181830110613f55578082019050905061016051808202821582848304141715613f555790509050610180516064808210613f55578082039050905061016051808202821582848304141715613f55579050905060648082049050905060036101c051808202821582848304141715613f5557905090508181830110613f555780820190509050808015613f5557820490509050610160526101e05161016051116134fb5760016101e05161016051808210613f555780820390509050116135265750506101605181525061353d56613526565b6001610160516101e051808210613f555780820390509050116135265750506101605181525061353d565b815160010180835281141561337e57505060006000fd5b565b6102005160e0526102205161010052610240516101205261026051610140526135696102e0613254565b6102e080516102a05280602001516102c052506102a05160e0526102c05161010052610280516101205261359e6102e06132ec565b6102e051815250565b610220516102005114613f555760006102205112613f55576002610220511215613f555760006102005112613f55576002610200511215613f55576135ed6102c0613119565b6102c0516102a0526102605160e05261028051610100526102a051610120526136176102e06132ec565b6102e0516102c0526060366102e0376102c051610340526102a0516002808202821582848304141715613f5557905090506103605261038060006002818352015b6102005161038051186136725761024051610300526136a3565b6102205161038051141561368957613707566136a3565b610260610380516002811015613f55576020020151610300525b6102e08051610300518181830110613f555780820190509050815250610340516102c051808202821582848304141715613f555790509050610300516002808202821582848304141715613f555790509050808015613f5557820490509050610340525b8151600101808352811415613658575050610340516102c051808202821582848304141715613f5557905090506064808202821582848304141715613f555790509050610360516002808202821582848304141715613f555790509050808015613f5557820490509050610340526102e0516102c0516064808202821582848304141715613f55579050905061036051808015613f55578204905090508181830110613f555780820190509050610380526102c0516103a0526103c0600060ff818352015b6103a051610320526103a0516103a051808202821582848304141715613f555790509050610340518181830110613f55578082019050905060026103a051808202821582848304141715613f555790509050610380518181830110613f5557808201905090506102c051808210613f555780820390509050808015613f55578204905090506103a052610320516103a05111613891576001610320516103a051808210613f555780820390509050116138bc5750506103a0518152506138d3566138bc565b60016103a05161032051808210613f555780820390509050116138bc5750506103a0518152506138d3565b81516001018083528114156137cc57505060006000fd5b565b60006101005112613f55576002610100511215613f555760603661018037610160516101e05260e0516002808202821582848304141715613f5557905090506102005261022060006002818352015b6101005161022051141561393b576139b956613955565b610120610220516002811015613f555760200201516101a0525b61018080516101a0518181830110613f5557808201905090508152506101e05161016051808202821582848304141715613f5557905090506101a0516002808202821582848304141715613f555790509050808015613f55578204905090506101e0525b81516001018083528114156139245750506101e05161016051808202821582848304141715613f5557905090506064808202821582848304141715613f555790509050610200516002808202821582848304141715613f555790509050808015613f55578204905090506101e05261018051610160516064808202821582848304141715613f55579050905061020051808015613f55578204905090508181830110613f555780820190509050610220526101605161024052610260600060ff818352015b610240516101c0526102405161024051808202821582848304141715613f5557905090506101e0518181830110613f555780820190509050600261024051808202821582848304141715613f555790509050610220518181830110613f55578082019050905061016051808210613f555780820390509050808015613f5557820490509050610240526101c0516102405111613b435760016101c05161024051808210613f55578082039050905011613b6e57505061024051815250613b8556613b6e565b6001610240516101c051808210613f55578082039050905011613b6e57505061024051815250613b85565b8151600101808352811415613a7e57505060006000fd5b565b613b926102e0613119565b6102e0516102c052600b546102e052600c54610300526102e0516103e0526103005161040052613bc3610360613065565b610360805161042052806020015161044052506103e05160e052610400516101005261042051610120526104405161014052613c006103a0613254565b6103a0805161032052806020015161034052506103205160e05261034051610100526102c05161012052613c356103806132ec565b610380516103605260145461038052610360516102805161036051808202821582848304141715613f55579050905061038051808015613f5557820490509050808210613f5557808203905090506103a0526102c05160e0526102a05161010052610320516101205261034051610140526103a05161016052613cb96103e06138d5565b6103e0516103c0526006546002808202821582848304141715613f5557905090506004808204905090506103e0526040366104003761044060006002818352015b600061046052610320610440516002811015613f55576020020151610480526102a0516104405118613d6e57610480516103a051808202821582848304141715613f55579050905061036051808015613f55578204905090506103c051808210613f55578082039050905061046052613db2565b61048051610480516103a051808202821582848304141715613f55579050905061036051808015613f5557820490509050808210613f555780820390509050610460525b610480516103e05161046051808202821582848304141715613f5557905090506402540be40080820490509050808210613f555780820390509050610400610440516002811015613f555760200201528151600101808352811415613cfa5750506104006102a0516002811015613f555760200201516102c05160e0526102a05161010052610400516101205261042051610140526103a05161016052613e5a6104606138d5565b61046051808210613f555780820390509050610440526103206102a0516002811015613f555760200201516103c051808210613f555780820390509050670de0b6b3a7640000808202821582848304141715613f5557905090506102e06102a0516002811015613f55576020020151808015613f555782049050905061046052610440516001808210613f555780820390509050670de0b6b3a7640000808202821582848304141715613f5557905090506102e06102a0516002811015613f55576020020151808015613f5557820490509050610440526104405181526104605161044051808210613f555780820390509050816020015250565b600080fd5b61000a613f640361000a60003961000a613f64036000f3
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.