[
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "buyer",
                "type": "address"
            },
            {
                "indexed": false,
                "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"
            }
        ],
        "name": "TokenExchange",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "provider",
                "type": "address"
            },
            {
                "indexed": false,
                "name": "amount",
                "type": "uint256"
            },
            {
                "indexed": false,
                "name": "n1",
                "type": "int256"
            },
            {
                "indexed": false,
                "name": "n2",
                "type": "int256"
            }
        ],
        "name": "Deposit",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "provider",
                "type": "address"
            },
            {
                "indexed": false,
                "name": "amount_borrowed",
                "type": "uint256"
            },
            {
                "indexed": false,
                "name": "amount_collateral",
                "type": "uint256"
            }
        ],
        "name": "Withdraw",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "name": "rate",
                "type": "uint256"
            },
            {
                "indexed": false,
                "name": "rate_mul",
                "type": "uint256"
            },
            {
                "indexed": false,
                "name": "time",
                "type": "uint256"
            }
        ],
        "name": "SetRate",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "name": "fee",
                "type": "uint256"
            }
        ],
        "name": "SetFee",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "name": "fee",
                "type": "uint256"
            }
        ],
        "name": "SetAdminFee",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": false,
                "name": "price_oracle",
                "type": "address"
            }
        ],
        "name": "SetPriceOracle",
        "type": "event"
    },
    {
        "inputs": [
            {
                "name": "_borrowed_token",
                "type": "address"
            },
            {
                "name": "_borrowed_precision",
                "type": "uint256"
            },
            {
                "name": "_collateral_token",
                "type": "address"
            },
            {
                "name": "_collateral_precision",
                "type": "uint256"
            },
            {
                "name": "_A",
                "type": "uint256"
            },
            {
                "name": "_sqrt_band_ratio",
                "type": "uint256"
            },
            {
                "name": "_log_A_ratio",
                "type": "int256"
            },
            {
                "name": "_base_price",
                "type": "uint256"
            },
            {
                "name": "fee",
                "type": "uint256"
            },
            {
                "name": "admin_fee",
                "type": "uint256"
            },
            {
                "name": "_price_oracle_contract",
                "type": "address"
            }
        ],
        "name": "constructor",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "constructor"
    },
    {
        "inputs": [
            {
                "name": "_admin",
                "type": "address"
            }
        ],
        "name": "set_admin",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            }
        ],
        "name": "coins",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "pure",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "price_oracle",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "dynamic_fee",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "get_rate_mul",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "get_base_price",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "n",
                "type": "int256"
            }
        ],
        "name": "p_current_up",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "n",
                "type": "int256"
            }
        ],
        "name": "p_current_down",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "n",
                "type": "int256"
            }
        ],
        "name": "p_oracle_up",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "n",
                "type": "int256"
            }
        ],
        "name": "p_oracle_down",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "get_p",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "read_user_tick_numbers",
        "outputs": [
            {
                "name": "",
                "type": "int256[2]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "n_end",
                "type": "int256"
            }
        ],
        "name": "can_skip_bands",
        "outputs": [
            {
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "active_band_with_skip",
        "outputs": [
            {
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "has_liquidity",
        "outputs": [
            {
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            },
            {
                "name": "amount",
                "type": "uint256"
            },
            {
                "name": "n1",
                "type": "int256"
            },
            {
                "name": "n2",
                "type": "int256"
            }
        ],
        "name": "deposit_range",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            },
            {
                "name": "frac",
                "type": "uint256"
            }
        ],
        "name": "withdraw",
        "outputs": [
            {
                "name": "",
                "type": "uint256[2]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "in_amount",
                "type": "uint256"
            }
        ],
        "name": "get_dy",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "in_amount",
                "type": "uint256"
            }
        ],
        "name": "get_dxdy",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            },
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "out_amount",
                "type": "uint256"
            }
        ],
        "name": "get_dx",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "out_amount",
                "type": "uint256"
            }
        ],
        "name": "get_dydx",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            },
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "in_amount",
                "type": "uint256"
            },
            {
                "name": "min_amount",
                "type": "uint256"
            }
        ],
        "name": "exchange",
        "outputs": [
            {
                "name": "",
                "type": "uint256[2]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "out_amount",
                "type": "uint256"
            },
            {
                "name": "max_amount",
                "type": "uint256"
            }
        ],
        "name": "exchange_dy",
        "outputs": [
            {
                "name": "",
                "type": "uint256[2]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "i",
                "type": "uint256"
            },
            {
                "name": "j",
                "type": "uint256"
            },
            {
                "name": "out_amount",
                "type": "uint256"
            },
            {
                "name": "max_amount",
                "type": "uint256"
            },
            {
                "name": "_for",
                "type": "address"
            }
        ],
        "name": "exchange_dy",
        "outputs": [
            {
                "name": "",
                "type": "uint256[2]"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "get_y_up",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "get_x_down",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "get_sum_xy",
        "outputs": [
            {
                "name": "",
                "type": "uint256[2]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "user",
                "type": "address"
            }
        ],
        "name": "get_xy",
        "outputs": [
            {
                "name": "",
                "type": "uint256[][2]"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "p",
                "type": "uint256"
            }
        ],
        "name": "get_amount_for_price",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            },
            {
                "name": "",
                "type": "bool"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "rate",
                "type": "uint256"
            }
        ],
        "name": "set_rate",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "fee",
                "type": "uint256"
            }
        ],
        "name": "set_fee",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "fee",
                "type": "uint256"
            }
        ],
        "name": "set_admin_fee",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "reset_admin_fees",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "liquidity_mining_callback",
                "type": "address"
            }
        ],
        "name": "set_callback",
        "outputs": [],
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "admin",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "A",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "fee",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "admin_fee",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "rate",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "active_band",
        "outputs": [
            {
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "min_band",
        "outputs": [
            {
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "max_band",
        "outputs": [
            {
                "name": "",
                "type": "int256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "admin_fees_x",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "admin_fees_y",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "price_oracle_contract",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "arg0",
                "type": "int256"
            }
        ],
        "name": "bands_x",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "arg0",
                "type": "int256"
            }
        ],
        "name": "bands_y",
        "outputs": [
            {
                "name": "",
                "type": "uint256"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    },
    {
        "inputs": [],
        "name": "liquidity_mining_callback",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "stateMutability": "view",
        "type": "function"
    }
]
