[ { "name": "TokenExchange", "inputs": [ { "name": "buyer", "type": "address", "indexed": true }, { "name": "sold_id", "type": "uint256", "indexed": false }, { "name": "tokens_sold", "type": "uint256", "indexed": false }, { "name": "bought_id", "type": "uint256", "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[3]", "indexed": false }, { "name": "fee", "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[3]", "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_index", "type": "uint256", "indexed": false }, { "name": "coin_amount", "type": "uint256", "indexed": false } ], "anonymous": false, "type": "event" }, { "name": "CommitNewAdmin", "inputs": [ { "name": "deadline", "type": "uint256", "indexed": true }, { "name": "admin", "type": "address", "indexed": true } ], "anonymous": false, "type": "event" }, { "name": "NewAdmin", "inputs": [ { "name": "admin", "type": "address", "indexed": true } ], "anonymous": false, "type": "event" }, { "name": "CommitNewParameters", "inputs": [ { "name": "deadline", "type": "uint256", "indexed": true }, { "name": "admin_fee", "type": "uint256", "indexed": false }, { "name": "mid_fee", "type": "uint256", "indexed": false }, { "name": "out_fee", "type": "uint256", "indexed": false }, { "name": "fee_gamma", "type": "uint256", "indexed": false }, { "name": "allowed_extra_profit", "type": "uint256", "indexed": false }, { "name": "adjustment_step", "type": "uint256", "indexed": false }, { "name": "ma_half_time", "type": "uint256", "indexed": false } ], "anonymous": false, "type": "event" }, { "name": "NewParameters", "inputs": [ { "name": "admin_fee", "type": "uint256", "indexed": false }, { "name": "mid_fee", "type": "uint256", "indexed": false }, { "name": "out_fee", "type": "uint256", "indexed": false }, { "name": "fee_gamma", "type": "uint256", "indexed": false }, { "name": "allowed_extra_profit", "type": "uint256", "indexed": false }, { "name": "adjustment_step", "type": "uint256", "indexed": false }, { "name": "ma_half_time", "type": "uint256", "indexed": false } ], "anonymous": false, "type": "event" }, { "name": "RampAgamma", "inputs": [ { "name": "initial_A", "type": "uint256", "indexed": false }, { "name": "future_A", "type": "uint256", "indexed": false }, { "name": "initial_gamma", "type": "uint256", "indexed": false }, { "name": "future_gamma", "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": "current_A", "type": "uint256", "indexed": false }, { "name": "current_gamma", "type": "uint256", "indexed": false }, { "name": "time", "type": "uint256", "indexed": false } ], "anonymous": false, "type": "event" }, { "name": "ClaimAdminFee", "inputs": [ { "name": "admin", "type": "address", "indexed": true }, { "name": "tokens", "type": "uint256", "indexed": false } ], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [ { "name": "owner", "type": "address" }, { "name": "admin_fee_receiver", "type": "address" }, { "name": "A", "type": "uint256" }, { "name": "gamma", "type": "uint256" }, { "name": "mid_fee", "type": "uint256" }, { "name": "out_fee", "type": "uint256" }, { "name": "allowed_extra_profit", "type": "uint256" }, { "name": "fee_gamma", "type": "uint256" }, { "name": "adjustment_step", "type": "uint256" }, { "name": "admin_fee", "type": "uint256" }, { "name": "ma_half_time", "type": "uint256" }, { "name": "initial_prices", "type": "uint256[2]" } ], "outputs": [] }, { "stateMutability": "payable", "type": "fallback" }, { "stateMutability": "view", "type": "function", "name": "price_oracle", "inputs": [ { "name": "k", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3361 }, { "stateMutability": "view", "type": "function", "name": "price_scale", "inputs": [ { "name": "k", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3391 }, { "stateMutability": "view", "type": "function", "name": "last_prices", "inputs": [ { "name": "k", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3421 }, { "stateMutability": "view", "type": "function", "name": "token", "inputs": [], "outputs": [ { "name": "", "type": "address" } ], "gas": 468 }, { "stateMutability": "view", "type": "function", "name": "coins", "inputs": [ { "name": "i", "type": "uint256" } ], "outputs": [ { "name": "", "type": "address" } ], "gas": 582 }, { "stateMutability": "view", "type": "function", "name": "A", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 597 }, { "stateMutability": "view", "type": "function", "name": "gamma", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 11991 }, { "stateMutability": "view", "type": "function", "name": "fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 21673 }, { "stateMutability": "view", "type": "function", "name": "fee_calc", "inputs": [ { "name": "xp", "type": "uint256[3]" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 11096 }, { "stateMutability": "view", "type": "function", "name": "get_virtual_price", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 11582 }, { "stateMutability": "payable", "type": "function", "name": "exchange", "inputs": [ { "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "dx", "type": "uint256" }, { "name": "min_dy", "type": "uint256" } ], "outputs": [] }, { "stateMutability": "payable", "type": "function", "name": "exchange", "inputs": [ { "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "dx", "type": "uint256" }, { "name": "min_dy", "type": "uint256" }, { "name": "use_eth", "type": "bool" } ], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "get_dy", "inputs": [ { "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "dx", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3122 }, { "stateMutability": "view", "type": "function", "name": "calc_token_fee", "inputs": [ { "name": "amounts", "type": "uint256[3]" }, { "name": "xp", "type": "uint256[3]" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 26582 }, { "stateMutability": "nonpayable", "type": "function", "name": "add_liquidity", "inputs": [ { "name": "amounts", "type": "uint256[3]" }, { "name": "min_mint_amount", "type": "uint256" } ], "outputs": [], "gas": 738687 }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_liquidity", "inputs": [ { "name": "_amount", "type": "uint256" }, { "name": "min_amounts", "type": "uint256[3]" } ], "outputs": [], "gas": 233981 }, { "stateMutability": "view", "type": "function", "name": "calc_token_amount", "inputs": [ { "name": "amounts", "type": "uint256[3]" }, { "name": "deposit", "type": "bool" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3429 }, { "stateMutability": "view", "type": "function", "name": "calc_withdraw_one_coin", "inputs": [ { "name": "token_amount", "type": "uint256" }, { "name": "i", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 13432 }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_liquidity_one_coin", "inputs": [ { "name": "token_amount", "type": "uint256" }, { "name": "i", "type": "uint256" }, { "name": "min_amount", "type": "uint256" } ], "outputs": [], "gas": 648579 }, { "stateMutability": "nonpayable", "type": "function", "name": "claim_admin_fees", "inputs": [], "outputs": [], "gas": 389808 }, { "stateMutability": "nonpayable", "type": "function", "name": "ramp_A_gamma", "inputs": [ { "name": "future_A", "type": "uint256" }, { "name": "future_gamma", "type": "uint256" }, { "name": "future_time", "type": "uint256" } ], "outputs": [], "gas": 163102 }, { "stateMutability": "nonpayable", "type": "function", "name": "stop_ramp_A_gamma", "inputs": [], "outputs": [], "gas": 157247 }, { "stateMutability": "nonpayable", "type": "function", "name": "commit_new_parameters", "inputs": [ { "name": "_new_mid_fee", "type": "uint256" }, { "name": "_new_out_fee", "type": "uint256" }, { "name": "_new_admin_fee", "type": "uint256" }, { "name": "_new_fee_gamma", "type": "uint256" }, { "name": "_new_allowed_extra_profit", "type": "uint256" }, { "name": "_new_adjustment_step", "type": "uint256" }, { "name": "_new_ma_half_time", "type": "uint256" } ], "outputs": [], "gas": 306190 }, { "stateMutability": "nonpayable", "type": "function", "name": "apply_new_parameters", "inputs": [], "outputs": [], "gas": 683438 }, { "stateMutability": "nonpayable", "type": "function", "name": "revert_new_parameters", "inputs": [], "outputs": [], "gas": 23222 }, { "stateMutability": "nonpayable", "type": "function", "name": "commit_transfer_ownership", "inputs": [ { "name": "_owner", "type": "address" } ], "outputs": [], "gas": 77260 }, { "stateMutability": "nonpayable", "type": "function", "name": "apply_transfer_ownership", "inputs": [], "outputs": [], "gas": 65937 }, { "stateMutability": "nonpayable", "type": "function", "name": "revert_transfer_ownership", "inputs": [], "outputs": [], "gas": 23312 }, { "stateMutability": "nonpayable", "type": "function", "name": "kill_me", "inputs": [], "outputs": [], "gas": 40535 }, { "stateMutability": "nonpayable", "type": "function", "name": "unkill_me", "inputs": [], "outputs": [], "gas": 23372 }, { "stateMutability": "nonpayable", "type": "function", "name": "set_admin_fee_receiver", "inputs": [ { "name": "_admin_fee_receiver", "type": "address" } ], "outputs": [], "gas": 38505 }, { "stateMutability": "view", "type": "function", "name": "last_prices_timestamp", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3378 }, { "stateMutability": "view", "type": "function", "name": "initial_A_gamma", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3408 }, { "stateMutability": "view", "type": "function", "name": "future_A_gamma", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3438 }, { "stateMutability": "view", "type": "function", "name": "initial_A_gamma_time", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3468 }, { "stateMutability": "view", "type": "function", "name": "future_A_gamma_time", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3498 }, { "stateMutability": "view", "type": "function", "name": "allowed_extra_profit", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3528 }, { "stateMutability": "view", "type": "function", "name": "future_allowed_extra_profit", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3558 }, { "stateMutability": "view", "type": "function", "name": "fee_gamma", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3588 }, { "stateMutability": "view", "type": "function", "name": "future_fee_gamma", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3618 }, { "stateMutability": "view", "type": "function", "name": "adjustment_step", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3648 }, { "stateMutability": "view", "type": "function", "name": "future_adjustment_step", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3678 }, { "stateMutability": "view", "type": "function", "name": "ma_half_time", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3708 }, { "stateMutability": "view", "type": "function", "name": "future_ma_half_time", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3738 }, { "stateMutability": "view", "type": "function", "name": "mid_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3768 }, { "stateMutability": "view", "type": "function", "name": "out_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3798 }, { "stateMutability": "view", "type": "function", "name": "admin_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3828 }, { "stateMutability": "view", "type": "function", "name": "future_mid_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3858 }, { "stateMutability": "view", "type": "function", "name": "future_out_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3888 }, { "stateMutability": "view", "type": "function", "name": "future_admin_fee", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3918 }, { "stateMutability": "view", "type": "function", "name": "balances", "inputs": [ { "name": "arg0", "type": "uint256" } ], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4057 }, { "stateMutability": "view", "type": "function", "name": "D", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 3978 }, { "stateMutability": "view", "type": "function", "name": "owner", "inputs": [], "outputs": [ { "name": "", "type": "address" } ], "gas": 4008 }, { "stateMutability": "view", "type": "function", "name": "future_owner", "inputs": [], "outputs": [ { "name": "", "type": "address" } ], "gas": 4038 }, { "stateMutability": "view", "type": "function", "name": "xcp_profit", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4068 }, { "stateMutability": "view", "type": "function", "name": "xcp_profit_a", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4098 }, { "stateMutability": "view", "type": "function", "name": "virtual_price", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4128 }, { "stateMutability": "view", "type": "function", "name": "is_killed", "inputs": [], "outputs": [ { "name": "", "type": "bool" } ], "gas": 4158 }, { "stateMutability": "view", "type": "function", "name": "kill_deadline", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4188 }, { "stateMutability": "view", "type": "function", "name": "transfer_ownership_deadline", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4218 }, { "stateMutability": "view", "type": "function", "name": "admin_actions_deadline", "inputs": [], "outputs": [ { "name": "", "type": "uint256" } ], "gas": 4248 }, { "stateMutability": "view", "type": "function", "name": "admin_fee_receiver", "inputs": [], "outputs": [ { "name": "", "type": "address" } ], "gas": 4278 } ]