{
  "contractName": "CollateralizedToken",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "minter",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "tokenAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "kTokenAmount",
          "type": "uint256"
        }
      ],
      "name": "Mint",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "redeemer",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "tokenAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "kTokenAmount",
          "type": "uint256"
        }
      ],
      "name": "Redeem",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "internalType": "uint8",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "subtractedValue",
          "type": "uint256"
        }
      ],
      "name": "decreaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "addedValue",
          "type": "uint256"
        }
      ],
      "name": "increaseAllowance",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "kTokenAmount",
          "type": "uint256"
        }
      ],
      "name": "redeem",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "tokenAmount",
          "type": "uint256"
        }
      ],
      "name": "redeemUnderlying",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "nativeAmount",
          "type": "uint256"
        }
      ],
      "name": "nativeAmountToUnderlyingAmount",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "underlyingAmount",
          "type": "uint256"
        },
        {
          "internalType": "bool",
          "name": "ceil",
          "type": "bool"
        }
      ],
      "name": "underlyingAmountToNativeAmount",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isUnderlyingEther",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalReserve",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "balanceOfUnderlying",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "underlying",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isUnderlyingEther\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeAmount\",\"type\":\"uint256\"}],\"name\":\"nativeAmountToUnderlyingAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReserve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"underlyingAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"ceil\",\"type\":\"bool\"}],\"name\":\"underlyingAmountToNativeAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/token/CollateralizedToken.sol\":\"CollateralizedToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExtendedMath.sol\":{\"keccak256\":\"0x5ced249631b5dfe431f449d725d9f318b01ab0785306ca5e73cdf43760ab271a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3f3aef65abfcc02e451ad27a849caba0e6375abb26e28e7605928d19d561c3dd\",\"dweb:/ipfs/QmY5zMeH5x3QMS5xkxkY3DH4SDPWLGJyfPk1R8wPJXH9vr\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/token/CollateralizedToken.sol\":{\"keccak256\":\"0xfaaaa4324c6cc78d9d1268426eb04fe41d8584ade05bbf22eac4875ecdf174d7\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1e4149a0ecd14003c261b2243adfc19d7a009c83c32341ebdd6a8929c0bdd14d\",\"dweb:/ipfs/QmQbySda22WBU4oycYfrTye1RsJuz1Ub74ksoST7PeegHW\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/token/UnlimitedApprovalErc20.sol\":{\"keccak256\":\"0x407178fcd78f0a19d705e64aaaa26ae997d228f077f3cf6833f9f3eb31c72308\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://097906cbe6f8f35ba1763bd122d551ec302f45cf677021bbcdb8a55c706940d9\",\"dweb:/ipfs/QmVh7kcUWsXt3QApppB1njhGHfzdP813KSTUF6bh3VCmMM\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x910a2e625b71168563edf9eeef55a50d6d699acfe27ceba3921f291829a8f938\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://248246ac66e6479dce1ad7d4945ec5540c98ceb09881e93c93f7c48d5772925c\",\"dweb:/ipfs/QmXr8tmUiZgEYid6ixeeBRmTdUnASWjKzhP3KRxMPy8fRt\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xba96bc371ba999f452985a98717cca1e4c4abb598dc038a9a9c3db08129b1ba4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26e50e3f7b6482fb6f598f2e006994a74aa492687daa4b3eee7fd4fb5398ce7f\",\"dweb:/ipfs/QmZudqoPSkA4USLMFsBBmt19dDPZFS8aaAmL5R7pECXu6t\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x482b6d82ba1c9c73758ae15068a438361d4187b7a4e342db17ef0f828cb5e21a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://89725e56bc9c6cfb69521ceaa4a489561b928e930b71e30db85b24024c1c2c03\",\"dweb:/ipfs/QmNvpotZA1Fe48msV6TShSTVxeQ2dkaDS9MTKP4bNxyUG3\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xbd74f587ab9b9711801baf667db1426e4a03fd2d7f15af33e0e0d0394e7cef76\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2d0913dfbfce90d170df0d496ad7596c0778518e5fa7aba6c32562522546f66b\",\"dweb:/ipfs/QmR6B8nLj2PJf5e1JWD9Nk7ErkAwkqUwadCnvE82FJr1RU\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://002b4e5c26a2a069ba42486b83bf9c4b5461f3d5def32f9ef52b0aef8905d6d2\",\"dweb:/ipfs/QmPG44XDF4npiqRzzGvqJroDtUKfcR78wcreQ9bXa6guW6\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "/*\n\n    Copyright 2020 Kollateral LLC.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n*/\n\n// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport \"../common/utils/ExtendedMath.sol\";\nimport \"./UnlimitedApprovalErc20.sol\";\n\nabstract contract CollateralizedToken is\n    UnlimitedApprovalErc20,\n    ReentrancyGuard,\n    ExtendedMath\n{\n    using SafeMath for uint256;\n\n    event Mint(address minter, uint256 tokenAmount, uint256 kTokenAmount);\n    event Redeem(address redeemer, uint256 tokenAmount, uint256 kTokenAmount);\n\n    address internal _underlying;\n\n    constructor(address underlying) {\n        _underlying = underlying;\n    }\n\n    /*\n     * BALANCE UPDATE\n     */\n\n    function redeem(uint256 kTokenAmount) external returns (bool) {\n        require(totalSupply() > 0, \"CollateralizedToken: no supply\");\n        return\n            redeemInternal(\n                nativeAmountToUnderlyingAmount(kTokenAmount),\n                kTokenAmount\n            );\n    }\n\n    function redeemUnderlying(uint256 tokenAmount) external returns (bool) {\n        require(totalReserve() > 0, \"CollateralizedToken: no reserve\");\n        return\n            redeemInternal(\n                tokenAmount,\n                underlyingAmountToNativeAmountInternal(tokenAmount, true, false)\n            );\n    }\n\n    function mintInternal(uint256 amount) internal nonReentrant returns (bool) {\n        uint256 kTokenAmount;\n        if (totalReserve().sub(amount) > 0) {\n            kTokenAmount = underlyingAmountToNativeAmountInternal(\n                amount,\n                false,\n                true\n            );\n        } else {\n            kTokenAmount = amount;\n        }\n        _mint(msg.sender, kTokenAmount);\n        emit Mint(msg.sender, amount, kTokenAmount);\n\n        return true;\n    }\n\n    function redeemInternal(uint256 tokenAmount, uint256 kTokenAmount)\n        internal\n        nonReentrant\n        returns (bool)\n    {\n        _burn(msg.sender, kTokenAmount);\n        require(\n            transferUnderlying(msg.sender, tokenAmount),\n            \"CollateralizedToken: token transfer failed\"\n        );\n        emit Redeem(msg.sender, tokenAmount, kTokenAmount);\n\n        return true;\n    }\n\n    function transferUnderlying(address to, uint256 amount)\n        internal\n        virtual\n        returns (bool);\n\n    /*\n     * VIEWS\n     */\n\n    function nativeAmountToUnderlyingAmount(uint256 nativeAmount)\n        public\n        view\n        returns (uint256)\n    {\n        if (totalSupply() == 0) {\n            return 0;\n        }\n\n        return nativeAmount.mul(totalReserve()).div(totalSupply());\n    }\n\n    function underlyingAmountToNativeAmount(uint256 underlyingAmount, bool ceil)\n        public\n        view\n        returns (uint256)\n    {\n        return\n            underlyingAmountToNativeAmountInternal(\n                underlyingAmount,\n                ceil,\n                false\n            );\n    }\n\n    function underlyingAmountToNativeAmountInternal(\n        uint256 underlyingAmount,\n        bool ceil,\n        bool subtractDeposit\n    ) internal view returns (uint256) {\n        if (totalReserve() == 0) {\n            return 0;\n        }\n\n        /* mint() pulls in funds before calling mintInternal() - normalize for pre-funding amount */\n        uint256 adjustedTotalReserve = subtractDeposit\n            ? totalReserve().sub(underlyingAmount)\n            : totalReserve();\n\n        /* round mint() down and redeemUnderlying() up to avoid over-ownership exploits */\n        return\n            divAndRound(\n                underlyingAmount.mul(totalSupply()),\n                adjustedTotalReserve,\n                ceil\n            );\n    }\n\n    function isUnderlyingEther() public view virtual returns (bool);\n\n    function totalReserve() public view virtual returns (uint256);\n\n    function balanceOfUnderlying(address owner) public view returns (uint256) {\n        return nativeAmountToUnderlyingAmount(balanceOf(owner));\n    }\n\n    function underlying() public view returns (address) {\n        return _underlying;\n    }\n}\n",
  "sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/token/CollateralizedToken.sol",
  "ast": {
    "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/token/CollateralizedToken.sol",
    "exportedSymbols": {
      "CollateralizedToken": [
        5197
      ],
      "Context": [
        5279
      ],
      "ERC20": [
        6087
      ],
      "ExtendedMath": [
        1506
      ],
      "IERC20": [
        6165
      ],
      "ReentrancyGuard": [
        6295
      ],
      "SafeMath": [
        5584
      ],
      "UnlimitedApprovalErc20": [
        5256
      ]
    },
    "id": 5198,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4896,
        "literals": [
          "solidity",
          "^",
          "0.7",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "640:23:36"
      },
      {
        "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
        "file": "@openzeppelin/contracts/math/SafeMath.sol",
        "id": 4897,
        "nodeType": "ImportDirective",
        "scope": 5198,
        "sourceUnit": 5585,
        "src": "665:51:36",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
        "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
        "id": 4898,
        "nodeType": "ImportDirective",
        "scope": 5198,
        "sourceUnit": 6296,
        "src": "717:59:36",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExtendedMath.sol",
        "file": "../common/utils/ExtendedMath.sol",
        "id": 4899,
        "nodeType": "ImportDirective",
        "scope": 5198,
        "sourceUnit": 1507,
        "src": "777:42:36",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/token/UnlimitedApprovalErc20.sol",
        "file": "./UnlimitedApprovalErc20.sol",
        "id": 4900,
        "nodeType": "ImportDirective",
        "scope": 5198,
        "sourceUnit": 5257,
        "src": "820:38:36",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 4901,
              "name": "UnlimitedApprovalErc20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 5256,
              "src": "905:22:36",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_UnlimitedApprovalErc20_$5256",
                "typeString": "contract UnlimitedApprovalErc20"
              }
            },
            "id": 4902,
            "nodeType": "InheritanceSpecifier",
            "src": "905:22:36"
          },
          {
            "baseName": {
              "id": 4903,
              "name": "ReentrancyGuard",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6295,
              "src": "933:15:36",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ReentrancyGuard_$6295",
                "typeString": "contract ReentrancyGuard"
              }
            },
            "id": 4904,
            "nodeType": "InheritanceSpecifier",
            "src": "933:15:36"
          },
          {
            "baseName": {
              "id": 4905,
              "name": "ExtendedMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1506,
              "src": "954:12:36",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ExtendedMath_$1506",
                "typeString": "contract ExtendedMath"
              }
            },
            "id": 4906,
            "nodeType": "InheritanceSpecifier",
            "src": "954:12:36"
          }
        ],
        "contractDependencies": [
          1506,
          5256,
          5279,
          6087,
          6165,
          6295
        ],
        "contractKind": "contract",
        "fullyImplemented": false,
        "id": 5197,
        "linearizedBaseContracts": [
          5197,
          1506,
          6295,
          5256,
          6087,
          6165,
          5279
        ],
        "name": "CollateralizedToken",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 4909,
            "libraryName": {
              "id": 4907,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 5584,
              "src": "979:8:36",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$5584",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "973:27:36",
            "typeName": {
              "id": 4908,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "992:7:36",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "anonymous": false,
            "id": 4917,
            "name": "Mint",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 4916,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4911,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "minter",
                  "nodeType": "VariableDeclaration",
                  "scope": 4917,
                  "src": "1017:14:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 4910,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1017:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4913,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "tokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4917,
                  "src": "1033:19:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4912,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1033:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4915,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "kTokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4917,
                  "src": "1054:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4914,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1054:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1016:59:36"
            },
            "src": "1006:70:36"
          },
          {
            "anonymous": false,
            "id": 4925,
            "name": "Redeem",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 4924,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4919,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "redeemer",
                  "nodeType": "VariableDeclaration",
                  "scope": 4925,
                  "src": "1094:16:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 4918,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1094:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4921,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "tokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4925,
                  "src": "1112:19:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4920,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1112:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4923,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "kTokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4925,
                  "src": "1133:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4922,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1133:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1093:61:36"
            },
            "src": "1081:74:36"
          },
          {
            "constant": false,
            "id": 4927,
            "mutability": "mutable",
            "name": "_underlying",
            "nodeType": "VariableDeclaration",
            "scope": 5197,
            "src": "1161:28:36",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 4926,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "1161:7:36",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4936,
              "nodeType": "Block",
              "src": "1228:41:36",
              "statements": [
                {
                  "expression": {
                    "id": 4934,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 4932,
                      "name": "_underlying",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4927,
                      "src": "1238:11:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 4933,
                      "name": "underlying",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4929,
                      "src": "1252:10:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1238:24:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 4935,
                  "nodeType": "ExpressionStatement",
                  "src": "1238:24:36"
                }
              ]
            },
            "id": 4937,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4930,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4929,
                  "mutability": "mutable",
                  "name": "underlying",
                  "nodeType": "VariableDeclaration",
                  "scope": 4937,
                  "src": "1208:18:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 4928,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1208:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1207:20:36"
            },
            "returnParameters": {
              "id": 4931,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1228:0:36"
            },
            "scope": 5197,
            "src": "1196:73:36",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4959,
              "nodeType": "Block",
              "src": "1375:226:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4948,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 4945,
                            "name": "totalSupply",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5673,
                            "src": "1393:11:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 4946,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1393:13:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 4947,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1409:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1393:17:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "436f6c6c61746572616c697a6564546f6b656e3a206e6f20737570706c79",
                        "id": 4949,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1412:32:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_772cc97f39593e560676bdf1c5edd13e2266c876d2b90f9f9b1c71a1f64f4b51",
                          "typeString": "literal_string \"CollateralizedToken: no supply\""
                        },
                        "value": "CollateralizedToken: no supply"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_772cc97f39593e560676bdf1c5edd13e2266c876d2b90f9f9b1c71a1f64f4b51",
                          "typeString": "literal_string \"CollateralizedToken: no supply\""
                        }
                      ],
                      "id": 4944,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1385:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 4950,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1385:60:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 4951,
                  "nodeType": "ExpressionStatement",
                  "src": "1385:60:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 4954,
                            "name": "kTokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4939,
                            "src": "1537:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 4953,
                          "name": "nativeAmountToUnderlyingAmount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5106,
                          "src": "1506:30:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256) view returns (uint256)"
                          }
                        },
                        "id": 4955,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1506:44:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 4956,
                        "name": "kTokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4939,
                        "src": "1568:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4952,
                      "name": "redeemInternal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5071,
                      "src": "1474:14:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (uint256,uint256) returns (bool)"
                      }
                    },
                    "id": 4957,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1474:120:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4943,
                  "id": 4958,
                  "nodeType": "Return",
                  "src": "1455:139:36"
                }
              ]
            },
            "functionSelector": "db006a75",
            "id": 4960,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "redeem",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4940,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4939,
                  "mutability": "mutable",
                  "name": "kTokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4960,
                  "src": "1329:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4938,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1329:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1328:22:36"
            },
            "returnParameters": {
              "id": 4943,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4942,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4960,
                  "src": "1369:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4941,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1369:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1368:6:36"
            },
            "scope": 5197,
            "src": "1313:288:36",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 4984,
              "nodeType": "Block",
              "src": "1678:247:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4971,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 4968,
                            "name": "totalReserve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5174,
                            "src": "1696:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 4969,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1696:14:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 4970,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1713:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "1696:18:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "436f6c6c61746572616c697a6564546f6b656e3a206e6f2072657365727665",
                        "id": 4972,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1716:33:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_de92c9ca2eb28189407b08cab1fb8687a4a63a4eb2362306403a677bebff248e",
                          "typeString": "literal_string \"CollateralizedToken: no reserve\""
                        },
                        "value": "CollateralizedToken: no reserve"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_de92c9ca2eb28189407b08cab1fb8687a4a63a4eb2362306403a677bebff248e",
                          "typeString": "literal_string \"CollateralizedToken: no reserve\""
                        }
                      ],
                      "id": 4967,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1688:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 4973,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1688:62:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 4974,
                  "nodeType": "ExpressionStatement",
                  "src": "1688:62:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 4976,
                        "name": "tokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4962,
                        "src": "1811:11:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 4978,
                            "name": "tokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4962,
                            "src": "1879:11:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          {
                            "hexValue": "74727565",
                            "id": 4979,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1892:4:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          {
                            "hexValue": "66616c7365",
                            "id": 4980,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1898:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "false"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "id": 4977,
                          "name": "underlyingAmountToNativeAmountInternal",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5164,
                          "src": "1840:38:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_bool_$_t_bool_$returns$_t_uint256_$",
                            "typeString": "function (uint256,bool,bool) view returns (uint256)"
                          }
                        },
                        "id": 4981,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1840:64:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4975,
                      "name": "redeemInternal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5071,
                      "src": "1779:14:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (uint256,uint256) returns (bool)"
                      }
                    },
                    "id": 4982,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1779:139:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 4966,
                  "id": 4983,
                  "nodeType": "Return",
                  "src": "1760:158:36"
                }
              ]
            },
            "functionSelector": "852a12e3",
            "id": 4985,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "redeemUnderlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4963,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4962,
                  "mutability": "mutable",
                  "name": "tokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 4985,
                  "src": "1633:19:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4961,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1633:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1632:21:36"
            },
            "returnParameters": {
              "id": 4966,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4965,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4985,
                  "src": "1672:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4964,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1672:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1671:6:36"
            },
            "scope": 5197,
            "src": "1607:318:36",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 5034,
              "nodeType": "Block",
              "src": "2006:411:36",
              "statements": [
                {
                  "assignments": [
                    4995
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4995,
                      "mutability": "mutable",
                      "name": "kTokenAmount",
                      "nodeType": "VariableDeclaration",
                      "scope": 5034,
                      "src": "2016:20:36",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4994,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2016:7:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 4996,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2016:20:36"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5003,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "arguments": [
                        {
                          "id": 5000,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4987,
                          "src": "2069:6:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 4997,
                            "name": "totalReserve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5174,
                            "src": "2050:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 4998,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2050:14:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4999,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5434,
                        "src": "2050:18:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 5001,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2050:26:36",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 5002,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2079:1:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "2050:30:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 5017,
                    "nodeType": "Block",
                    "src": "2249:46:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 5015,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5013,
                            "name": "kTokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4995,
                            "src": "2263:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 5014,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4987,
                            "src": "2278:6:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2263:21:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5016,
                        "nodeType": "ExpressionStatement",
                        "src": "2263:21:36"
                      }
                    ]
                  },
                  "id": 5018,
                  "nodeType": "IfStatement",
                  "src": "2046:249:36",
                  "trueBody": {
                    "id": 5012,
                    "nodeType": "Block",
                    "src": "2082:161:36",
                    "statements": [
                      {
                        "expression": {
                          "id": 5010,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5004,
                            "name": "kTokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4995,
                            "src": "2096:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "id": 5006,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4987,
                                "src": "2167:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "hexValue": "66616c7365",
                                "id": 5007,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2191:5:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "false"
                              },
                              {
                                "hexValue": "74727565",
                                "id": 5008,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "bool",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2214:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                "value": "true"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "id": 5005,
                              "name": "underlyingAmountToNativeAmountInternal",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5164,
                              "src": "2111:38:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_bool_$_t_bool_$returns$_t_uint256_$",
                                "typeString": "function (uint256,bool,bool) view returns (uint256)"
                              }
                            },
                            "id": 5009,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2111:121:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2096:136:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5011,
                        "nodeType": "ExpressionStatement",
                        "src": "2096:136:36"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "id": 5020,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2310:3:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 5021,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2310:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "id": 5022,
                        "name": "kTokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4995,
                        "src": "2322:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5019,
                      "name": "_mint",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5963,
                      "src": "2304:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 5023,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2304:31:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5024,
                  "nodeType": "ExpressionStatement",
                  "src": "2304:31:36"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "expression": {
                          "id": 5026,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2355:3:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 5027,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2355:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "id": 5028,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4987,
                        "src": "2367:6:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5029,
                        "name": "kTokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4995,
                        "src": "2375:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5025,
                      "name": "Mint",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4917,
                      "src": "2350:4:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256)"
                      }
                    },
                    "id": 5030,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2350:38:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5031,
                  "nodeType": "EmitStatement",
                  "src": "2345:43:36"
                },
                {
                  "expression": {
                    "hexValue": "74727565",
                    "id": 5032,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2406:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 4993,
                  "id": 5033,
                  "nodeType": "Return",
                  "src": "2399:11:36"
                }
              ]
            },
            "id": 5035,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 4990,
                "modifierName": {
                  "id": 4989,
                  "name": "nonReentrant",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 6294,
                  "src": "1978:12:36",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1978:12:36"
              }
            ],
            "name": "mintInternal",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4987,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5035,
                  "src": "1953:14:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4986,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1953:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1952:16:36"
            },
            "returnParameters": {
              "id": 4993,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4992,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5035,
                  "src": "2000:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 4991,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2000:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1999:6:36"
            },
            "scope": 5197,
            "src": "1931:486:36",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5070,
              "nodeType": "Block",
              "src": "2555:272:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "expression": {
                          "id": 5047,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2571:3:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 5048,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2571:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "id": 5049,
                        "name": "kTokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5039,
                        "src": "2583:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5046,
                      "name": "_burn",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6019,
                      "src": "2565:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 5050,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2565:31:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5051,
                  "nodeType": "ExpressionStatement",
                  "src": "2565:31:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "expression": {
                              "id": 5054,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "2646:3:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 5055,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "src": "2646:10:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "id": 5056,
                            "name": "tokenAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5037,
                            "src": "2658:11:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 5053,
                          "name": "transferUnderlying",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5080,
                          "src": "2627:18:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) returns (bool)"
                          }
                        },
                        "id": 5057,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2627:43:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "436f6c6c61746572616c697a6564546f6b656e3a20746f6b656e207472616e73666572206661696c6564",
                        "id": 5058,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2684:44:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ba5dc3bcd7c8a78e1cb8730f0d2b0bc7d9ed609f47c57e23a9104c5aa5fe5e6c",
                          "typeString": "literal_string \"CollateralizedToken: token transfer failed\""
                        },
                        "value": "CollateralizedToken: token transfer failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ba5dc3bcd7c8a78e1cb8730f0d2b0bc7d9ed609f47c57e23a9104c5aa5fe5e6c",
                          "typeString": "literal_string \"CollateralizedToken: token transfer failed\""
                        }
                      ],
                      "id": 5052,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2606:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 5059,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2606:132:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5060,
                  "nodeType": "ExpressionStatement",
                  "src": "2606:132:36"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "expression": {
                          "id": 5062,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2760:3:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 5063,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2760:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "id": 5064,
                        "name": "tokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5037,
                        "src": "2772:11:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5065,
                        "name": "kTokenAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5039,
                        "src": "2785:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5061,
                      "name": "Redeem",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4925,
                      "src": "2753:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256)"
                      }
                    },
                    "id": 5066,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2753:45:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 5067,
                  "nodeType": "EmitStatement",
                  "src": "2748:50:36"
                },
                {
                  "expression": {
                    "hexValue": "74727565",
                    "id": 5068,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "2816:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 5045,
                  "id": 5069,
                  "nodeType": "Return",
                  "src": "2809:11:36"
                }
              ]
            },
            "id": 5071,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 5042,
                "modifierName": {
                  "id": 5041,
                  "name": "nonReentrant",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 6294,
                  "src": "2515:12:36",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2515:12:36"
              }
            ],
            "name": "redeemInternal",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5040,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5037,
                  "mutability": "mutable",
                  "name": "tokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5071,
                  "src": "2447:19:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5036,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2447:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5039,
                  "mutability": "mutable",
                  "name": "kTokenAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5071,
                  "src": "2468:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5038,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2468:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2446:43:36"
            },
            "returnParameters": {
              "id": 5045,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5044,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5071,
                  "src": "2545:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5043,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2545:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2544:6:36"
            },
            "scope": 5197,
            "src": "2423:404:36",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "id": 5080,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transferUnderlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5076,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5073,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "scope": 5080,
                  "src": "2861:10:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5072,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2861:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5075,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5080,
                  "src": "2873:14:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5074,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2873:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2860:28:36"
            },
            "returnParameters": {
              "id": 5079,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5078,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5080,
                  "src": "2939:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5077,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2939:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2938:6:36"
            },
            "scope": 5197,
            "src": "2833:112:36",
            "stateMutability": "nonpayable",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5105,
              "nodeType": "Block",
              "src": "3100:142:36",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5090,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "id": 5087,
                        "name": "totalSupply",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5673,
                        "src": "3114:11:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                          "typeString": "function () view returns (uint256)"
                        }
                      },
                      "id": 5088,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3114:13:36",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 5089,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3131:1:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3114:18:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5094,
                  "nodeType": "IfStatement",
                  "src": "3110:57:36",
                  "trueBody": {
                    "id": 5093,
                    "nodeType": "Block",
                    "src": "3134:33:36",
                    "statements": [
                      {
                        "expression": {
                          "hexValue": "30",
                          "id": 5091,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3155:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 5086,
                        "id": 5092,
                        "nodeType": "Return",
                        "src": "3148:8:36"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 5101,
                          "name": "totalSupply",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5673,
                          "src": "3221:11:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 5102,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3221:13:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "arguments": [
                          {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 5097,
                              "name": "totalReserve",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5174,
                              "src": "3201:12:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 5098,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3201:14:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "id": 5095,
                            "name": "nativeAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5082,
                            "src": "3184:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 5096,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "mul",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5497,
                          "src": "3184:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 5099,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3184:32:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 5100,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "div",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5514,
                      "src": "3184:36:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 5103,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3184:51:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5086,
                  "id": 5104,
                  "nodeType": "Return",
                  "src": "3177:58:36"
                }
              ]
            },
            "functionSelector": "b15287db",
            "id": 5106,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "nativeAmountToUnderlyingAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5083,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5082,
                  "mutability": "mutable",
                  "name": "nativeAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5106,
                  "src": "3020:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5081,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3020:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3019:22:36"
            },
            "returnParameters": {
              "id": 5086,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5085,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5106,
                  "src": "3087:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5084,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3087:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3086:9:36"
            },
            "scope": 5197,
            "src": "2980:262:36",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 5121,
              "nodeType": "Block",
              "src": "3383:167:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 5116,
                        "name": "underlyingAmount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5108,
                        "src": "3468:16:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5117,
                        "name": "ceil",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5110,
                        "src": "3502:4:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "66616c7365",
                        "id": 5118,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "bool",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3524:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "value": "false"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 5115,
                      "name": "underlyingAmountToNativeAmountInternal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5164,
                      "src": "3412:38:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_bool_$_t_bool_$returns$_t_uint256_$",
                        "typeString": "function (uint256,bool,bool) view returns (uint256)"
                      }
                    },
                    "id": 5119,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3412:131:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5114,
                  "id": 5120,
                  "nodeType": "Return",
                  "src": "3393:150:36"
                }
              ]
            },
            "functionSelector": "807b9d42",
            "id": 5122,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "underlyingAmountToNativeAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5111,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5108,
                  "mutability": "mutable",
                  "name": "underlyingAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5122,
                  "src": "3288:24:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5107,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3288:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5110,
                  "mutability": "mutable",
                  "name": "ceil",
                  "nodeType": "VariableDeclaration",
                  "scope": 5122,
                  "src": "3314:9:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5109,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3314:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3287:37:36"
            },
            "returnParameters": {
              "id": 5114,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5113,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5122,
                  "src": "3370:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5112,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3370:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3369:9:36"
            },
            "scope": 5197,
            "src": "3248:302:36",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 5163,
              "nodeType": "Block",
              "src": "3725:571:36",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5136,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "id": 5133,
                        "name": "totalReserve",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5174,
                        "src": "3739:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                          "typeString": "function () view returns (uint256)"
                        }
                      },
                      "id": 5134,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3739:14:36",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 5135,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3757:1:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3739:19:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5140,
                  "nodeType": "IfStatement",
                  "src": "3735:58:36",
                  "trueBody": {
                    "id": 5139,
                    "nodeType": "Block",
                    "src": "3760:33:36",
                    "statements": [
                      {
                        "expression": {
                          "hexValue": "30",
                          "id": 5137,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "3781:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "functionReturnParameters": 5132,
                        "id": 5138,
                        "nodeType": "Return",
                        "src": "3774:8:36"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    5142
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5142,
                      "mutability": "mutable",
                      "name": "adjustedTotalReserve",
                      "nodeType": "VariableDeclaration",
                      "scope": 5163,
                      "src": "3904:28:36",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5141,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "3904:7:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 5152,
                  "initialValue": {
                    "condition": {
                      "id": 5143,
                      "name": "subtractDeposit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5128,
                      "src": "3935:15:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseExpression": {
                      "arguments": [],
                      "expression": {
                        "argumentTypes": [],
                        "id": 5149,
                        "name": "totalReserve",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5174,
                        "src": "4016:12:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                          "typeString": "function () view returns (uint256)"
                        }
                      },
                      "id": 5150,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4016:14:36",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 5151,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "Conditional",
                    "src": "3935:95:36",
                    "trueExpression": {
                      "arguments": [
                        {
                          "id": 5147,
                          "name": "underlyingAmount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5124,
                          "src": "3984:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 5144,
                            "name": "totalReserve",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5174,
                            "src": "3965:12:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                              "typeString": "function () view returns (uint256)"
                            }
                          },
                          "id": 5145,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3965:14:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5146,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5434,
                        "src": "3965:18:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 5148,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3965:36:36",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3904:126:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 5156,
                              "name": "totalSupply",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5673,
                              "src": "4201:11:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                "typeString": "function () view returns (uint256)"
                              }
                            },
                            "id": 5157,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4201:13:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "id": 5154,
                            "name": "underlyingAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5124,
                            "src": "4180:16:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 5155,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "mul",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5497,
                          "src": "4180:20:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 5158,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4180:35:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5159,
                        "name": "adjustedTotalReserve",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5142,
                        "src": "4233:20:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 5160,
                        "name": "ceil",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5126,
                        "src": "4271:4:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 5153,
                      "name": "divAndRound",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1505,
                      "src": "4151:11:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_bool_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256,bool) pure returns (uint256)"
                      }
                    },
                    "id": 5161,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4151:138:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5132,
                  "id": 5162,
                  "nodeType": "Return",
                  "src": "4132:157:36"
                }
              ]
            },
            "id": 5164,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "underlyingAmountToNativeAmountInternal",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5129,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5124,
                  "mutability": "mutable",
                  "name": "underlyingAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 5164,
                  "src": "3613:24:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5123,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3613:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5126,
                  "mutability": "mutable",
                  "name": "ceil",
                  "nodeType": "VariableDeclaration",
                  "scope": 5164,
                  "src": "3647:9:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5125,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3647:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5128,
                  "mutability": "mutable",
                  "name": "subtractDeposit",
                  "nodeType": "VariableDeclaration",
                  "scope": 5164,
                  "src": "3666:20:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5127,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3666:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3603:89:36"
            },
            "returnParameters": {
              "id": 5132,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5131,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5164,
                  "src": "3716:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5130,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3716:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3715:9:36"
            },
            "scope": 5197,
            "src": "3556:740:36",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "functionSelector": "56c04b3b",
            "id": 5169,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "isUnderlyingEther",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5165,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4328:2:36"
            },
            "returnParameters": {
              "id": 5168,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5167,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5169,
                  "src": "4360:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 5166,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4360:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4359:6:36"
            },
            "scope": 5197,
            "src": "4302:64:36",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "functionSelector": "4c68df67",
            "id": 5174,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "totalReserve",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5170,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4393:2:36"
            },
            "returnParameters": {
              "id": 5173,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5172,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5174,
                  "src": "4425:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5171,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4425:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4424:9:36"
            },
            "scope": 5197,
            "src": "4372:62:36",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "public"
          },
          {
            "body": {
              "id": 5187,
              "nodeType": "Block",
              "src": "4514:72:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 5183,
                            "name": "owner",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5176,
                            "src": "4572:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 5182,
                          "name": "balanceOf",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5687,
                          "src": "4562:9:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$",
                            "typeString": "function (address) view returns (uint256)"
                          }
                        },
                        "id": 5184,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4562:16:36",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5181,
                      "name": "nativeAmountToUnderlyingAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5106,
                      "src": "4531:30:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) view returns (uint256)"
                      }
                    },
                    "id": 5185,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4531:48:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 5180,
                  "id": 5186,
                  "nodeType": "Return",
                  "src": "4524:55:36"
                }
              ]
            },
            "functionSelector": "3af9e669",
            "id": 5188,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "balanceOfUnderlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5177,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5176,
                  "mutability": "mutable",
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 5188,
                  "src": "4469:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5175,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4469:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4468:15:36"
            },
            "returnParameters": {
              "id": 5180,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5179,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5188,
                  "src": "4505:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5178,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4505:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4504:9:36"
            },
            "scope": 5197,
            "src": "4440:146:36",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 5195,
              "nodeType": "Block",
              "src": "4644:35:36",
              "statements": [
                {
                  "expression": {
                    "id": 5193,
                    "name": "_underlying",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4927,
                    "src": "4661:11:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 5192,
                  "id": 5194,
                  "nodeType": "Return",
                  "src": "4654:18:36"
                }
              ]
            },
            "functionSelector": "6f307dc3",
            "id": 5196,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "underlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5189,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4611:2:36"
            },
            "returnParameters": {
              "id": 5192,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5191,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5196,
                  "src": "4635:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 5190,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4635:7:36",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4634:9:36"
            },
            "scope": 5197,
            "src": "4592:87:36",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 5198,
        "src": "860:3821:36"
      }
    ],
    "src": "640:4042:36"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/token/CollateralizedToken.sol",
      "exportedSymbols": {
        "CollateralizedToken": [
          5197
        ],
        "Context": [
          5279
        ],
        "ERC20": [
          6087
        ],
        "ExtendedMath": [
          1506
        ],
        "IERC20": [
          6165
        ],
        "ReentrancyGuard": [
          6295
        ],
        "SafeMath": [
          5584
        ],
        "UnlimitedApprovalErc20": [
          5256
        ]
      },
      "license": "Apache-2.0"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.7",
            ".0"
          ]
        },
        "id": 4896,
        "name": "PragmaDirective",
        "src": "640:23:36"
      },
      {
        "attributes": {
          "SourceUnit": 5585,
          "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
          "file": "@openzeppelin/contracts/math/SafeMath.sol",
          "scope": 5198,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 4897,
        "name": "ImportDirective",
        "src": "665:51:36"
      },
      {
        "attributes": {
          "SourceUnit": 6296,
          "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
          "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol",
          "scope": 5198,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 4898,
        "name": "ImportDirective",
        "src": "717:59:36"
      },
      {
        "attributes": {
          "SourceUnit": 1507,
          "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExtendedMath.sol",
          "file": "../common/utils/ExtendedMath.sol",
          "scope": 5198,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 4899,
        "name": "ImportDirective",
        "src": "777:42:36"
      },
      {
        "attributes": {
          "SourceUnit": 5257,
          "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/token/UnlimitedApprovalErc20.sol",
          "file": "./UnlimitedApprovalErc20.sol",
          "scope": 5198,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 4900,
        "name": "ImportDirective",
        "src": "820:38:36"
      },
      {
        "attributes": {
          "abstract": true,
          "contractDependencies": [
            1506,
            5256,
            5279,
            6087,
            6165,
            6295
          ],
          "contractKind": "contract",
          "fullyImplemented": false,
          "linearizedBaseContracts": [
            5197,
            1506,
            6295,
            5256,
            6087,
            6165,
            5279
          ],
          "name": "CollateralizedToken",
          "scope": 5198
        },
        "children": [
          {
            "attributes": {},
            "children": [
              {
                "attributes": {
                  "name": "UnlimitedApprovalErc20",
                  "referencedDeclaration": 5256,
                  "type": "contract UnlimitedApprovalErc20"
                },
                "id": 4901,
                "name": "UserDefinedTypeName",
                "src": "905:22:36"
              }
            ],
            "id": 4902,
            "name": "InheritanceSpecifier",
            "src": "905:22:36"
          },
          {
            "attributes": {},
            "children": [
              {
                "attributes": {
                  "name": "ReentrancyGuard",
                  "referencedDeclaration": 6295,
                  "type": "contract ReentrancyGuard"
                },
                "id": 4903,
                "name": "UserDefinedTypeName",
                "src": "933:15:36"
              }
            ],
            "id": 4904,
            "name": "InheritanceSpecifier",
            "src": "933:15:36"
          },
          {
            "attributes": {},
            "children": [
              {
                "attributes": {
                  "name": "ExtendedMath",
                  "referencedDeclaration": 1506,
                  "type": "contract ExtendedMath"
                },
                "id": 4905,
                "name": "UserDefinedTypeName",
                "src": "954:12:36"
              }
            ],
            "id": 4906,
            "name": "InheritanceSpecifier",
            "src": "954:12:36"
          },
          {
            "children": [
              {
                "attributes": {
                  "name": "SafeMath",
                  "referencedDeclaration": 5584,
                  "type": "library SafeMath"
                },
                "id": 4907,
                "name": "UserDefinedTypeName",
                "src": "979:8:36"
              },
              {
                "attributes": {
                  "name": "uint256",
                  "type": "uint256"
                },
                "id": 4908,
                "name": "ElementaryTypeName",
                "src": "992:7:36"
              }
            ],
            "id": 4909,
            "name": "UsingForDirective",
            "src": "973:27:36"
          },
          {
            "attributes": {
              "anonymous": false,
              "name": "Mint"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "minter",
                      "scope": 4917,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 4910,
                        "name": "ElementaryTypeName",
                        "src": "1017:7:36"
                      }
                    ],
                    "id": 4911,
                    "name": "VariableDeclaration",
                    "src": "1017:14:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "tokenAmount",
                      "scope": 4917,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4912,
                        "name": "ElementaryTypeName",
                        "src": "1033:7:36"
                      }
                    ],
                    "id": 4913,
                    "name": "VariableDeclaration",
                    "src": "1033:19:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "kTokenAmount",
                      "scope": 4917,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4914,
                        "name": "ElementaryTypeName",
                        "src": "1054:7:36"
                      }
                    ],
                    "id": 4915,
                    "name": "VariableDeclaration",
                    "src": "1054:20:36"
                  }
                ],
                "id": 4916,
                "name": "ParameterList",
                "src": "1016:59:36"
              }
            ],
            "id": 4917,
            "name": "EventDefinition",
            "src": "1006:70:36"
          },
          {
            "attributes": {
              "anonymous": false,
              "name": "Redeem"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "redeemer",
                      "scope": 4925,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 4918,
                        "name": "ElementaryTypeName",
                        "src": "1094:7:36"
                      }
                    ],
                    "id": 4919,
                    "name": "VariableDeclaration",
                    "src": "1094:16:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "tokenAmount",
                      "scope": 4925,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4920,
                        "name": "ElementaryTypeName",
                        "src": "1112:7:36"
                      }
                    ],
                    "id": 4921,
                    "name": "VariableDeclaration",
                    "src": "1112:19:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "indexed": false,
                      "mutability": "mutable",
                      "name": "kTokenAmount",
                      "scope": 4925,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4922,
                        "name": "ElementaryTypeName",
                        "src": "1133:7:36"
                      }
                    ],
                    "id": 4923,
                    "name": "VariableDeclaration",
                    "src": "1133:20:36"
                  }
                ],
                "id": 4924,
                "name": "ParameterList",
                "src": "1093:61:36"
              }
            ],
            "id": 4925,
            "name": "EventDefinition",
            "src": "1081:74:36"
          },
          {
            "attributes": {
              "constant": false,
              "mutability": "mutable",
              "name": "_underlying",
              "scope": 5197,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "stateMutability": "nonpayable",
                  "type": "address"
                },
                "id": 4926,
                "name": "ElementaryTypeName",
                "src": "1161:7:36"
              }
            ],
            "id": 4927,
            "name": "VariableDeclaration",
            "src": "1161:28:36"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "modifiers": [
                null
              ],
              "name": "",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "underlying",
                      "scope": 4937,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 4928,
                        "name": "ElementaryTypeName",
                        "src": "1208:7:36"
                      }
                    ],
                    "id": 4929,
                    "name": "VariableDeclaration",
                    "src": "1208:18:36"
                  }
                ],
                "id": 4930,
                "name": "ParameterList",
                "src": "1207:20:36"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 4931,
                "name": "ParameterList",
                "src": "1228:0:36"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4927,
                              "type": "address",
                              "value": "_underlying"
                            },
                            "id": 4932,
                            "name": "Identifier",
                            "src": "1238:11:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4929,
                              "type": "address",
                              "value": "underlying"
                            },
                            "id": 4933,
                            "name": "Identifier",
                            "src": "1252:10:36"
                          }
                        ],
                        "id": 4934,
                        "name": "Assignment",
                        "src": "1238:24:36"
                      }
                    ],
                    "id": 4935,
                    "name": "ExpressionStatement",
                    "src": "1238:24:36"
                  }
                ],
                "id": 4936,
                "name": "Block",
                "src": "1228:41:36"
              }
            ],
            "id": 4937,
            "name": "FunctionDefinition",
            "src": "1196:73:36"
          },
          {
            "attributes": {
              "functionSelector": "db006a75",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "redeem",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "kTokenAmount",
                      "scope": 4960,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4938,
                        "name": "ElementaryTypeName",
                        "src": "1329:7:36"
                      }
                    ],
                    "id": 4939,
                    "name": "VariableDeclaration",
                    "src": "1329:20:36"
                  }
                ],
                "id": 4940,
                "name": "ParameterList",
                "src": "1328:22:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 4960,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 4941,
                        "name": "ElementaryTypeName",
                        "src": "1369:4:36"
                      }
                    ],
                    "id": 4942,
                    "name": "VariableDeclaration",
                    "src": "1369:4:36"
                  }
                ],
                "id": 4943,
                "name": "ParameterList",
                "src": "1368:6:36"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_772cc97f39593e560676bdf1c5edd13e2266c876d2b90f9f9b1c71a1f64f4b51",
                                  "typeString": "literal_string \"CollateralizedToken: no supply\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 4944,
                            "name": "Identifier",
                            "src": "1385:7:36"
                          },
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": ">",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 5673,
                                      "type": "function () view returns (uint256)",
                                      "value": "totalSupply"
                                    },
                                    "id": 4945,
                                    "name": "Identifier",
                                    "src": "1393:11:36"
                                  }
                                ],
                                "id": 4946,
                                "name": "FunctionCall",
                                "src": "1393:13:36"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 4947,
                                "name": "Literal",
                                "src": "1409:1:36"
                              }
                            ],
                            "id": 4948,
                            "name": "BinaryOperation",
                            "src": "1393:17:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "436f6c6c61746572616c697a6564546f6b656e3a206e6f20737570706c79",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "string",
                              "type": "literal_string \"CollateralizedToken: no supply\"",
                              "value": "CollateralizedToken: no supply"
                            },
                            "id": 4949,
                            "name": "Literal",
                            "src": "1412:32:36"
                          }
                        ],
                        "id": 4950,
                        "name": "FunctionCall",
                        "src": "1385:60:36"
                      }
                    ],
                    "id": 4951,
                    "name": "ExpressionStatement",
                    "src": "1385:60:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 4943
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5071,
                              "type": "function (uint256,uint256) returns (bool)",
                              "value": "redeemInternal"
                            },
                            "id": 4952,
                            "name": "Identifier",
                            "src": "1474:14:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5106,
                                  "type": "function (uint256) view returns (uint256)",
                                  "value": "nativeAmountToUnderlyingAmount"
                                },
                                "id": 4953,
                                "name": "Identifier",
                                "src": "1506:30:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 4939,
                                  "type": "uint256",
                                  "value": "kTokenAmount"
                                },
                                "id": 4954,
                                "name": "Identifier",
                                "src": "1537:12:36"
                              }
                            ],
                            "id": 4955,
                            "name": "FunctionCall",
                            "src": "1506:44:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4939,
                              "type": "uint256",
                              "value": "kTokenAmount"
                            },
                            "id": 4956,
                            "name": "Identifier",
                            "src": "1568:12:36"
                          }
                        ],
                        "id": 4957,
                        "name": "FunctionCall",
                        "src": "1474:120:36"
                      }
                    ],
                    "id": 4958,
                    "name": "Return",
                    "src": "1455:139:36"
                  }
                ],
                "id": 4959,
                "name": "Block",
                "src": "1375:226:36"
              }
            ],
            "id": 4960,
            "name": "FunctionDefinition",
            "src": "1313:288:36"
          },
          {
            "attributes": {
              "functionSelector": "852a12e3",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "redeemUnderlying",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "tokenAmount",
                      "scope": 4985,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4961,
                        "name": "ElementaryTypeName",
                        "src": "1633:7:36"
                      }
                    ],
                    "id": 4962,
                    "name": "VariableDeclaration",
                    "src": "1633:19:36"
                  }
                ],
                "id": 4963,
                "name": "ParameterList",
                "src": "1632:21:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 4985,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 4964,
                        "name": "ElementaryTypeName",
                        "src": "1672:4:36"
                      }
                    ],
                    "id": 4965,
                    "name": "VariableDeclaration",
                    "src": "1672:4:36"
                  }
                ],
                "id": 4966,
                "name": "ParameterList",
                "src": "1671:6:36"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_de92c9ca2eb28189407b08cab1fb8687a4a63a4eb2362306403a677bebff248e",
                                  "typeString": "literal_string \"CollateralizedToken: no reserve\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 4967,
                            "name": "Identifier",
                            "src": "1688:7:36"
                          },
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": ">",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 5174,
                                      "type": "function () view returns (uint256)",
                                      "value": "totalReserve"
                                    },
                                    "id": 4968,
                                    "name": "Identifier",
                                    "src": "1696:12:36"
                                  }
                                ],
                                "id": 4969,
                                "name": "FunctionCall",
                                "src": "1696:14:36"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 4970,
                                "name": "Literal",
                                "src": "1713:1:36"
                              }
                            ],
                            "id": 4971,
                            "name": "BinaryOperation",
                            "src": "1696:18:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "436f6c6c61746572616c697a6564546f6b656e3a206e6f2072657365727665",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "string",
                              "type": "literal_string \"CollateralizedToken: no reserve\"",
                              "value": "CollateralizedToken: no reserve"
                            },
                            "id": 4972,
                            "name": "Literal",
                            "src": "1716:33:36"
                          }
                        ],
                        "id": 4973,
                        "name": "FunctionCall",
                        "src": "1688:62:36"
                      }
                    ],
                    "id": 4974,
                    "name": "ExpressionStatement",
                    "src": "1688:62:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 4966
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "bool",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5071,
                              "type": "function (uint256,uint256) returns (bool)",
                              "value": "redeemInternal"
                            },
                            "id": 4975,
                            "name": "Identifier",
                            "src": "1779:14:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4962,
                              "type": "uint256",
                              "value": "tokenAmount"
                            },
                            "id": 4976,
                            "name": "Identifier",
                            "src": "1811:11:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    },
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5164,
                                  "type": "function (uint256,bool,bool) view returns (uint256)",
                                  "value": "underlyingAmountToNativeAmountInternal"
                                },
                                "id": 4977,
                                "name": "Identifier",
                                "src": "1840:38:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 4962,
                                  "type": "uint256",
                                  "value": "tokenAmount"
                                },
                                "id": 4978,
                                "name": "Identifier",
                                "src": "1879:11:36"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "74727565",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "true"
                                },
                                "id": 4979,
                                "name": "Literal",
                                "src": "1892:4:36"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "66616c7365",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "bool",
                                  "type": "bool",
                                  "value": "false"
                                },
                                "id": 4980,
                                "name": "Literal",
                                "src": "1898:5:36"
                              }
                            ],
                            "id": 4981,
                            "name": "FunctionCall",
                            "src": "1840:64:36"
                          }
                        ],
                        "id": 4982,
                        "name": "FunctionCall",
                        "src": "1779:139:36"
                      }
                    ],
                    "id": 4983,
                    "name": "Return",
                    "src": "1760:158:36"
                  }
                ],
                "id": 4984,
                "name": "Block",
                "src": "1678:247:36"
              }
            ],
            "id": 4985,
            "name": "FunctionDefinition",
            "src": "1607:318:36"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "name": "mintInternal",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amount",
                      "scope": 5035,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 4986,
                        "name": "ElementaryTypeName",
                        "src": "1953:7:36"
                      }
                    ],
                    "id": 4987,
                    "name": "VariableDeclaration",
                    "src": "1953:14:36"
                  }
                ],
                "id": 4988,
                "name": "ParameterList",
                "src": "1952:16:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5035,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 4991,
                        "name": "ElementaryTypeName",
                        "src": "2000:4:36"
                      }
                    ],
                    "id": 4992,
                    "name": "VariableDeclaration",
                    "src": "2000:4:36"
                  }
                ],
                "id": 4993,
                "name": "ParameterList",
                "src": "1999:6:36"
              },
              {
                "attributes": {},
                "children": [
                  {
                    "attributes": {
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 6294,
                      "type": "modifier ()",
                      "value": "nonReentrant"
                    },
                    "id": 4989,
                    "name": "Identifier",
                    "src": "1978:12:36"
                  }
                ],
                "id": 4990,
                "name": "ModifierInvocation",
                "src": "1978:12:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        4995
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "kTokenAmount",
                          "scope": 5034,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 4994,
                            "name": "ElementaryTypeName",
                            "src": "2016:7:36"
                          }
                        ],
                        "id": 4995,
                        "name": "VariableDeclaration",
                        "src": "2016:20:36"
                      }
                    ],
                    "id": 4996,
                    "name": "VariableDeclarationStatement",
                    "src": "2016:20:36"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "sub",
                                  "referencedDeclaration": 5434,
                                  "type": "function (uint256,uint256) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 5174,
                                          "type": "function () view returns (uint256)",
                                          "value": "totalReserve"
                                        },
                                        "id": 4997,
                                        "name": "Identifier",
                                        "src": "2050:12:36"
                                      }
                                    ],
                                    "id": 4998,
                                    "name": "FunctionCall",
                                    "src": "2050:14:36"
                                  }
                                ],
                                "id": 4999,
                                "name": "MemberAccess",
                                "src": "2050:18:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 4987,
                                  "type": "uint256",
                                  "value": "amount"
                                },
                                "id": 5000,
                                "name": "Identifier",
                                "src": "2069:6:36"
                              }
                            ],
                            "id": 5001,
                            "name": "FunctionCall",
                            "src": "2050:26:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 5002,
                            "name": "Literal",
                            "src": "2079:1:36"
                          }
                        ],
                        "id": 5003,
                        "name": "BinaryOperation",
                        "src": "2050:30:36"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 4995,
                                      "type": "uint256",
                                      "value": "kTokenAmount"
                                    },
                                    "id": 5004,
                                    "name": "Identifier",
                                    "src": "2096:12:36"
                                  },
                                  {
                                    "attributes": {
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            },
                                            {
                                              "typeIdentifier": "t_bool",
                                              "typeString": "bool"
                                            }
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 5164,
                                          "type": "function (uint256,bool,bool) view returns (uint256)",
                                          "value": "underlyingAmountToNativeAmountInternal"
                                        },
                                        "id": 5005,
                                        "name": "Identifier",
                                        "src": "2111:38:36"
                                      },
                                      {
                                        "attributes": {
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 4987,
                                          "type": "uint256",
                                          "value": "amount"
                                        },
                                        "id": 5006,
                                        "name": "Identifier",
                                        "src": "2167:6:36"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "66616c7365",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "bool",
                                          "type": "bool",
                                          "value": "false"
                                        },
                                        "id": 5007,
                                        "name": "Literal",
                                        "src": "2191:5:36"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "74727565",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "bool",
                                          "type": "bool",
                                          "value": "true"
                                        },
                                        "id": 5008,
                                        "name": "Literal",
                                        "src": "2214:4:36"
                                      }
                                    ],
                                    "id": 5009,
                                    "name": "FunctionCall",
                                    "src": "2111:121:36"
                                  }
                                ],
                                "id": 5010,
                                "name": "Assignment",
                                "src": "2096:136:36"
                              }
                            ],
                            "id": 5011,
                            "name": "ExpressionStatement",
                            "src": "2096:136:36"
                          }
                        ],
                        "id": 5012,
                        "name": "Block",
                        "src": "2082:161:36"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 4995,
                                      "type": "uint256",
                                      "value": "kTokenAmount"
                                    },
                                    "id": 5013,
                                    "name": "Identifier",
                                    "src": "2263:12:36"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 4987,
                                      "type": "uint256",
                                      "value": "amount"
                                    },
                                    "id": 5014,
                                    "name": "Identifier",
                                    "src": "2278:6:36"
                                  }
                                ],
                                "id": 5015,
                                "name": "Assignment",
                                "src": "2263:21:36"
                              }
                            ],
                            "id": 5016,
                            "name": "ExpressionStatement",
                            "src": "2263:21:36"
                          }
                        ],
                        "id": 5017,
                        "name": "Block",
                        "src": "2249:46:36"
                      }
                    ],
                    "id": 5018,
                    "name": "IfStatement",
                    "src": "2046:249:36"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5963,
                              "type": "function (address,uint256)",
                              "value": "_mint"
                            },
                            "id": 5019,
                            "name": "Identifier",
                            "src": "2304:5:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "type": "address payable"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": -15,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 5020,
                                "name": "Identifier",
                                "src": "2310:3:36"
                              }
                            ],
                            "id": 5021,
                            "name": "MemberAccess",
                            "src": "2310:10:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4995,
                              "type": "uint256",
                              "value": "kTokenAmount"
                            },
                            "id": 5022,
                            "name": "Identifier",
                            "src": "2322:12:36"
                          }
                        ],
                        "id": 5023,
                        "name": "FunctionCall",
                        "src": "2304:31:36"
                      }
                    ],
                    "id": 5024,
                    "name": "ExpressionStatement",
                    "src": "2304:31:36"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4917,
                              "type": "function (address,uint256,uint256)",
                              "value": "Mint"
                            },
                            "id": 5025,
                            "name": "Identifier",
                            "src": "2350:4:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "type": "address payable"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": -15,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 5026,
                                "name": "Identifier",
                                "src": "2355:3:36"
                              }
                            ],
                            "id": 5027,
                            "name": "MemberAccess",
                            "src": "2355:10:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4987,
                              "type": "uint256",
                              "value": "amount"
                            },
                            "id": 5028,
                            "name": "Identifier",
                            "src": "2367:6:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4995,
                              "type": "uint256",
                              "value": "kTokenAmount"
                            },
                            "id": 5029,
                            "name": "Identifier",
                            "src": "2375:12:36"
                          }
                        ],
                        "id": 5030,
                        "name": "FunctionCall",
                        "src": "2350:38:36"
                      }
                    ],
                    "id": 5031,
                    "name": "EmitStatement",
                    "src": "2345:43:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 4993
                    },
                    "children": [
                      {
                        "attributes": {
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 5032,
                        "name": "Literal",
                        "src": "2406:4:36"
                      }
                    ],
                    "id": 5033,
                    "name": "Return",
                    "src": "2399:11:36"
                  }
                ],
                "id": 5034,
                "name": "Block",
                "src": "2006:411:36"
              }
            ],
            "id": 5035,
            "name": "FunctionDefinition",
            "src": "1931:486:36"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "name": "redeemInternal",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "tokenAmount",
                      "scope": 5071,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5036,
                        "name": "ElementaryTypeName",
                        "src": "2447:7:36"
                      }
                    ],
                    "id": 5037,
                    "name": "VariableDeclaration",
                    "src": "2447:19:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "kTokenAmount",
                      "scope": 5071,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5038,
                        "name": "ElementaryTypeName",
                        "src": "2468:7:36"
                      }
                    ],
                    "id": 5039,
                    "name": "VariableDeclaration",
                    "src": "2468:20:36"
                  }
                ],
                "id": 5040,
                "name": "ParameterList",
                "src": "2446:43:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5071,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5043,
                        "name": "ElementaryTypeName",
                        "src": "2545:4:36"
                      }
                    ],
                    "id": 5044,
                    "name": "VariableDeclaration",
                    "src": "2545:4:36"
                  }
                ],
                "id": 5045,
                "name": "ParameterList",
                "src": "2544:6:36"
              },
              {
                "attributes": {},
                "children": [
                  {
                    "attributes": {
                      "overloadedDeclarations": [
                        null
                      ],
                      "referencedDeclaration": 6294,
                      "type": "modifier ()",
                      "value": "nonReentrant"
                    },
                    "id": 5041,
                    "name": "Identifier",
                    "src": "2515:12:36"
                  }
                ],
                "id": 5042,
                "name": "ModifierInvocation",
                "src": "2515:12:36"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6019,
                              "type": "function (address,uint256)",
                              "value": "_burn"
                            },
                            "id": 5046,
                            "name": "Identifier",
                            "src": "2565:5:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "type": "address payable"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": -15,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 5047,
                                "name": "Identifier",
                                "src": "2571:3:36"
                              }
                            ],
                            "id": 5048,
                            "name": "MemberAccess",
                            "src": "2571:10:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5039,
                              "type": "uint256",
                              "value": "kTokenAmount"
                            },
                            "id": 5049,
                            "name": "Identifier",
                            "src": "2583:12:36"
                          }
                        ],
                        "id": 5050,
                        "name": "FunctionCall",
                        "src": "2565:31:36"
                      }
                    ],
                    "id": 5051,
                    "name": "ExpressionStatement",
                    "src": "2565:31:36"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_ba5dc3bcd7c8a78e1cb8730f0d2b0bc7d9ed609f47c57e23a9104c5aa5fe5e6c",
                                  "typeString": "literal_string \"CollateralizedToken: token transfer failed\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 5052,
                            "name": "Identifier",
                            "src": "2606:7:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "bool",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5080,
                                  "type": "function (address,uint256) returns (bool)",
                                  "value": "transferUnderlying"
                                },
                                "id": 5053,
                                "name": "Identifier",
                                "src": "2627:18:36"
                              },
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "sender",
                                  "type": "address payable"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": -15,
                                      "type": "msg",
                                      "value": "msg"
                                    },
                                    "id": 5054,
                                    "name": "Identifier",
                                    "src": "2646:3:36"
                                  }
                                ],
                                "id": 5055,
                                "name": "MemberAccess",
                                "src": "2646:10:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5037,
                                  "type": "uint256",
                                  "value": "tokenAmount"
                                },
                                "id": 5056,
                                "name": "Identifier",
                                "src": "2658:11:36"
                              }
                            ],
                            "id": 5057,
                            "name": "FunctionCall",
                            "src": "2627:43:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "436f6c6c61746572616c697a6564546f6b656e3a20746f6b656e207472616e73666572206661696c6564",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "string",
                              "type": "literal_string \"CollateralizedToken: token transfer failed\"",
                              "value": "CollateralizedToken: token transfer failed"
                            },
                            "id": 5058,
                            "name": "Literal",
                            "src": "2684:44:36"
                          }
                        ],
                        "id": 5059,
                        "name": "FunctionCall",
                        "src": "2606:132:36"
                      }
                    ],
                    "id": 5060,
                    "name": "ExpressionStatement",
                    "src": "2606:132:36"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 4925,
                              "type": "function (address,uint256,uint256)",
                              "value": "Redeem"
                            },
                            "id": 5061,
                            "name": "Identifier",
                            "src": "2753:6:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sender",
                              "type": "address payable"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": -15,
                                  "type": "msg",
                                  "value": "msg"
                                },
                                "id": 5062,
                                "name": "Identifier",
                                "src": "2760:3:36"
                              }
                            ],
                            "id": 5063,
                            "name": "MemberAccess",
                            "src": "2760:10:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5037,
                              "type": "uint256",
                              "value": "tokenAmount"
                            },
                            "id": 5064,
                            "name": "Identifier",
                            "src": "2772:11:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5039,
                              "type": "uint256",
                              "value": "kTokenAmount"
                            },
                            "id": 5065,
                            "name": "Identifier",
                            "src": "2785:12:36"
                          }
                        ],
                        "id": 5066,
                        "name": "FunctionCall",
                        "src": "2753:45:36"
                      }
                    ],
                    "id": 5067,
                    "name": "EmitStatement",
                    "src": "2748:50:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 5045
                    },
                    "children": [
                      {
                        "attributes": {
                          "hexvalue": "74727565",
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "token": "bool",
                          "type": "bool",
                          "value": "true"
                        },
                        "id": 5068,
                        "name": "Literal",
                        "src": "2816:4:36"
                      }
                    ],
                    "id": 5069,
                    "name": "Return",
                    "src": "2809:11:36"
                  }
                ],
                "id": 5070,
                "name": "Block",
                "src": "2555:272:36"
              }
            ],
            "id": 5071,
            "name": "FunctionDefinition",
            "src": "2423:404:36"
          },
          {
            "attributes": {
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "transferUnderlying",
              "scope": 5197,
              "stateMutability": "nonpayable",
              "virtual": true,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "to",
                      "scope": 5080,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 5072,
                        "name": "ElementaryTypeName",
                        "src": "2861:7:36"
                      }
                    ],
                    "id": 5073,
                    "name": "VariableDeclaration",
                    "src": "2861:10:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amount",
                      "scope": 5080,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5074,
                        "name": "ElementaryTypeName",
                        "src": "2873:7:36"
                      }
                    ],
                    "id": 5075,
                    "name": "VariableDeclaration",
                    "src": "2873:14:36"
                  }
                ],
                "id": 5076,
                "name": "ParameterList",
                "src": "2860:28:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5080,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5077,
                        "name": "ElementaryTypeName",
                        "src": "2939:4:36"
                      }
                    ],
                    "id": 5078,
                    "name": "VariableDeclaration",
                    "src": "2939:4:36"
                  }
                ],
                "id": 5079,
                "name": "ParameterList",
                "src": "2938:6:36"
              }
            ],
            "id": 5080,
            "name": "FunctionDefinition",
            "src": "2833:112:36"
          },
          {
            "attributes": {
              "functionSelector": "b15287db",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "nativeAmountToUnderlyingAmount",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "nativeAmount",
                      "scope": 5106,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5081,
                        "name": "ElementaryTypeName",
                        "src": "3020:7:36"
                      }
                    ],
                    "id": 5082,
                    "name": "VariableDeclaration",
                    "src": "3020:20:36"
                  }
                ],
                "id": 5083,
                "name": "ParameterList",
                "src": "3019:22:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5106,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5084,
                        "name": "ElementaryTypeName",
                        "src": "3087:7:36"
                      }
                    ],
                    "id": 5085,
                    "name": "VariableDeclaration",
                    "src": "3087:7:36"
                  }
                ],
                "id": 5086,
                "name": "ParameterList",
                "src": "3086:9:36"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5673,
                                  "type": "function () view returns (uint256)",
                                  "value": "totalSupply"
                                },
                                "id": 5087,
                                "name": "Identifier",
                                "src": "3114:11:36"
                              }
                            ],
                            "id": 5088,
                            "name": "FunctionCall",
                            "src": "3114:13:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 5089,
                            "name": "Literal",
                            "src": "3131:1:36"
                          }
                        ],
                        "id": 5090,
                        "name": "BinaryOperation",
                        "src": "3114:18:36"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 5086
                            },
                            "children": [
                              {
                                "attributes": {
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 5091,
                                "name": "Literal",
                                "src": "3155:1:36"
                              }
                            ],
                            "id": 5092,
                            "name": "Return",
                            "src": "3148:8:36"
                          }
                        ],
                        "id": 5093,
                        "name": "Block",
                        "src": "3134:33:36"
                      }
                    ],
                    "id": 5094,
                    "name": "IfStatement",
                    "src": "3110:57:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 5086
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "div",
                              "referencedDeclaration": 5514,
                              "type": "function (uint256,uint256) pure returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "mul",
                                      "referencedDeclaration": 5497,
                                      "type": "function (uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 5082,
                                          "type": "uint256",
                                          "value": "nativeAmount"
                                        },
                                        "id": 5095,
                                        "name": "Identifier",
                                        "src": "3184:12:36"
                                      }
                                    ],
                                    "id": 5096,
                                    "name": "MemberAccess",
                                    "src": "3184:16:36"
                                  },
                                  {
                                    "attributes": {
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 5174,
                                          "type": "function () view returns (uint256)",
                                          "value": "totalReserve"
                                        },
                                        "id": 5097,
                                        "name": "Identifier",
                                        "src": "3201:12:36"
                                      }
                                    ],
                                    "id": 5098,
                                    "name": "FunctionCall",
                                    "src": "3201:14:36"
                                  }
                                ],
                                "id": 5099,
                                "name": "FunctionCall",
                                "src": "3184:32:36"
                              }
                            ],
                            "id": 5100,
                            "name": "MemberAccess",
                            "src": "3184:36:36"
                          },
                          {
                            "attributes": {
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5673,
                                  "type": "function () view returns (uint256)",
                                  "value": "totalSupply"
                                },
                                "id": 5101,
                                "name": "Identifier",
                                "src": "3221:11:36"
                              }
                            ],
                            "id": 5102,
                            "name": "FunctionCall",
                            "src": "3221:13:36"
                          }
                        ],
                        "id": 5103,
                        "name": "FunctionCall",
                        "src": "3184:51:36"
                      }
                    ],
                    "id": 5104,
                    "name": "Return",
                    "src": "3177:58:36"
                  }
                ],
                "id": 5105,
                "name": "Block",
                "src": "3100:142:36"
              }
            ],
            "id": 5106,
            "name": "FunctionDefinition",
            "src": "2980:262:36"
          },
          {
            "attributes": {
              "functionSelector": "807b9d42",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "underlyingAmountToNativeAmount",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "underlyingAmount",
                      "scope": 5122,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5107,
                        "name": "ElementaryTypeName",
                        "src": "3288:7:36"
                      }
                    ],
                    "id": 5108,
                    "name": "VariableDeclaration",
                    "src": "3288:24:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "ceil",
                      "scope": 5122,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5109,
                        "name": "ElementaryTypeName",
                        "src": "3314:4:36"
                      }
                    ],
                    "id": 5110,
                    "name": "VariableDeclaration",
                    "src": "3314:9:36"
                  }
                ],
                "id": 5111,
                "name": "ParameterList",
                "src": "3287:37:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5122,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5112,
                        "name": "ElementaryTypeName",
                        "src": "3370:7:36"
                      }
                    ],
                    "id": 5113,
                    "name": "VariableDeclaration",
                    "src": "3370:7:36"
                  }
                ],
                "id": 5114,
                "name": "ParameterList",
                "src": "3369:9:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 5114
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5164,
                              "type": "function (uint256,bool,bool) view returns (uint256)",
                              "value": "underlyingAmountToNativeAmountInternal"
                            },
                            "id": 5115,
                            "name": "Identifier",
                            "src": "3412:38:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5108,
                              "type": "uint256",
                              "value": "underlyingAmount"
                            },
                            "id": 5116,
                            "name": "Identifier",
                            "src": "3468:16:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5110,
                              "type": "bool",
                              "value": "ceil"
                            },
                            "id": 5117,
                            "name": "Identifier",
                            "src": "3502:4:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "66616c7365",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "bool",
                              "type": "bool",
                              "value": "false"
                            },
                            "id": 5118,
                            "name": "Literal",
                            "src": "3524:5:36"
                          }
                        ],
                        "id": 5119,
                        "name": "FunctionCall",
                        "src": "3412:131:36"
                      }
                    ],
                    "id": 5120,
                    "name": "Return",
                    "src": "3393:150:36"
                  }
                ],
                "id": 5121,
                "name": "Block",
                "src": "3383:167:36"
              }
            ],
            "id": 5122,
            "name": "FunctionDefinition",
            "src": "3248:302:36"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "underlyingAmountToNativeAmountInternal",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "underlyingAmount",
                      "scope": 5164,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5123,
                        "name": "ElementaryTypeName",
                        "src": "3613:7:36"
                      }
                    ],
                    "id": 5124,
                    "name": "VariableDeclaration",
                    "src": "3613:24:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "ceil",
                      "scope": 5164,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5125,
                        "name": "ElementaryTypeName",
                        "src": "3647:4:36"
                      }
                    ],
                    "id": 5126,
                    "name": "VariableDeclaration",
                    "src": "3647:9:36"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "subtractDeposit",
                      "scope": 5164,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5127,
                        "name": "ElementaryTypeName",
                        "src": "3666:4:36"
                      }
                    ],
                    "id": 5128,
                    "name": "VariableDeclaration",
                    "src": "3666:20:36"
                  }
                ],
                "id": 5129,
                "name": "ParameterList",
                "src": "3603:89:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5164,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5130,
                        "name": "ElementaryTypeName",
                        "src": "3716:7:36"
                      }
                    ],
                    "id": 5131,
                    "name": "VariableDeclaration",
                    "src": "3716:7:36"
                  }
                ],
                "id": 5132,
                "name": "ParameterList",
                "src": "3715:9:36"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5174,
                                  "type": "function () view returns (uint256)",
                                  "value": "totalReserve"
                                },
                                "id": 5133,
                                "name": "Identifier",
                                "src": "3739:12:36"
                              }
                            ],
                            "id": 5134,
                            "name": "FunctionCall",
                            "src": "3739:14:36"
                          },
                          {
                            "attributes": {
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 5135,
                            "name": "Literal",
                            "src": "3757:1:36"
                          }
                        ],
                        "id": 5136,
                        "name": "BinaryOperation",
                        "src": "3739:19:36"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 5132
                            },
                            "children": [
                              {
                                "attributes": {
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 5137,
                                "name": "Literal",
                                "src": "3781:1:36"
                              }
                            ],
                            "id": 5138,
                            "name": "Return",
                            "src": "3774:8:36"
                          }
                        ],
                        "id": 5139,
                        "name": "Block",
                        "src": "3760:33:36"
                      }
                    ],
                    "id": 5140,
                    "name": "IfStatement",
                    "src": "3735:58:36"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        5142
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "adjustedTotalReserve",
                          "scope": 5163,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 5141,
                            "name": "ElementaryTypeName",
                            "src": "3904:7:36"
                          }
                        ],
                        "id": 5142,
                        "name": "VariableDeclaration",
                        "src": "3904:28:36"
                      },
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5128,
                              "type": "bool",
                              "value": "subtractDeposit"
                            },
                            "id": 5143,
                            "name": "Identifier",
                            "src": "3935:15:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "sub",
                                  "referencedDeclaration": 5434,
                                  "type": "function (uint256,uint256) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 5174,
                                          "type": "function () view returns (uint256)",
                                          "value": "totalReserve"
                                        },
                                        "id": 5144,
                                        "name": "Identifier",
                                        "src": "3965:12:36"
                                      }
                                    ],
                                    "id": 5145,
                                    "name": "FunctionCall",
                                    "src": "3965:14:36"
                                  }
                                ],
                                "id": 5146,
                                "name": "MemberAccess",
                                "src": "3965:18:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5124,
                                  "type": "uint256",
                                  "value": "underlyingAmount"
                                },
                                "id": 5147,
                                "name": "Identifier",
                                "src": "3984:16:36"
                              }
                            ],
                            "id": 5148,
                            "name": "FunctionCall",
                            "src": "3965:36:36"
                          },
                          {
                            "attributes": {
                              "arguments": [
                                null
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    null
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5174,
                                  "type": "function () view returns (uint256)",
                                  "value": "totalReserve"
                                },
                                "id": 5149,
                                "name": "Identifier",
                                "src": "4016:12:36"
                              }
                            ],
                            "id": 5150,
                            "name": "FunctionCall",
                            "src": "4016:14:36"
                          }
                        ],
                        "id": 5151,
                        "name": "Conditional",
                        "src": "3935:95:36"
                      }
                    ],
                    "id": 5152,
                    "name": "VariableDeclarationStatement",
                    "src": "3904:126:36"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 5132
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1505,
                              "type": "function (uint256,uint256,bool) pure returns (uint256)",
                              "value": "divAndRound"
                            },
                            "id": 5153,
                            "name": "Identifier",
                            "src": "4151:11:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "mul",
                                  "referencedDeclaration": 5497,
                                  "type": "function (uint256,uint256) pure returns (uint256)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 5124,
                                      "type": "uint256",
                                      "value": "underlyingAmount"
                                    },
                                    "id": 5154,
                                    "name": "Identifier",
                                    "src": "4180:16:36"
                                  }
                                ],
                                "id": 5155,
                                "name": "MemberAccess",
                                "src": "4180:20:36"
                              },
                              {
                                "attributes": {
                                  "arguments": [
                                    null
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        null
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 5673,
                                      "type": "function () view returns (uint256)",
                                      "value": "totalSupply"
                                    },
                                    "id": 5156,
                                    "name": "Identifier",
                                    "src": "4201:11:36"
                                  }
                                ],
                                "id": 5157,
                                "name": "FunctionCall",
                                "src": "4201:13:36"
                              }
                            ],
                            "id": 5158,
                            "name": "FunctionCall",
                            "src": "4180:35:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5142,
                              "type": "uint256",
                              "value": "adjustedTotalReserve"
                            },
                            "id": 5159,
                            "name": "Identifier",
                            "src": "4233:20:36"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5126,
                              "type": "bool",
                              "value": "ceil"
                            },
                            "id": 5160,
                            "name": "Identifier",
                            "src": "4271:4:36"
                          }
                        ],
                        "id": 5161,
                        "name": "FunctionCall",
                        "src": "4151:138:36"
                      }
                    ],
                    "id": 5162,
                    "name": "Return",
                    "src": "4132:157:36"
                  }
                ],
                "id": 5163,
                "name": "Block",
                "src": "3725:571:36"
              }
            ],
            "id": 5164,
            "name": "FunctionDefinition",
            "src": "3556:740:36"
          },
          {
            "attributes": {
              "functionSelector": "56c04b3b",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "isUnderlyingEther",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": true,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 5165,
                "name": "ParameterList",
                "src": "4328:2:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5169,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bool",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bool",
                          "type": "bool"
                        },
                        "id": 5166,
                        "name": "ElementaryTypeName",
                        "src": "4360:4:36"
                      }
                    ],
                    "id": 5167,
                    "name": "VariableDeclaration",
                    "src": "4360:4:36"
                  }
                ],
                "id": 5168,
                "name": "ParameterList",
                "src": "4359:6:36"
              }
            ],
            "id": 5169,
            "name": "FunctionDefinition",
            "src": "4302:64:36"
          },
          {
            "attributes": {
              "functionSelector": "4c68df67",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "totalReserve",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": true,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 5170,
                "name": "ParameterList",
                "src": "4393:2:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5174,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5171,
                        "name": "ElementaryTypeName",
                        "src": "4425:7:36"
                      }
                    ],
                    "id": 5172,
                    "name": "VariableDeclaration",
                    "src": "4425:7:36"
                  }
                ],
                "id": 5173,
                "name": "ParameterList",
                "src": "4424:9:36"
              }
            ],
            "id": 5174,
            "name": "FunctionDefinition",
            "src": "4372:62:36"
          },
          {
            "attributes": {
              "functionSelector": "3af9e669",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "balanceOfUnderlying",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "owner",
                      "scope": 5188,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 5175,
                        "name": "ElementaryTypeName",
                        "src": "4469:7:36"
                      }
                    ],
                    "id": 5176,
                    "name": "VariableDeclaration",
                    "src": "4469:13:36"
                  }
                ],
                "id": 5177,
                "name": "ParameterList",
                "src": "4468:15:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5188,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 5178,
                        "name": "ElementaryTypeName",
                        "src": "4505:7:36"
                      }
                    ],
                    "id": 5179,
                    "name": "VariableDeclaration",
                    "src": "4505:7:36"
                  }
                ],
                "id": 5180,
                "name": "ParameterList",
                "src": "4504:9:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 5180
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 5106,
                              "type": "function (uint256) view returns (uint256)",
                              "value": "nativeAmountToUnderlyingAmount"
                            },
                            "id": 5181,
                            "name": "Identifier",
                            "src": "4531:30:36"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "uint256",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5687,
                                  "type": "function (address) view returns (uint256)",
                                  "value": "balanceOf"
                                },
                                "id": 5182,
                                "name": "Identifier",
                                "src": "4562:9:36"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 5176,
                                  "type": "address",
                                  "value": "owner"
                                },
                                "id": 5183,
                                "name": "Identifier",
                                "src": "4572:5:36"
                              }
                            ],
                            "id": 5184,
                            "name": "FunctionCall",
                            "src": "4562:16:36"
                          }
                        ],
                        "id": 5185,
                        "name": "FunctionCall",
                        "src": "4531:48:36"
                      }
                    ],
                    "id": 5186,
                    "name": "Return",
                    "src": "4524:55:36"
                  }
                ],
                "id": 5187,
                "name": "Block",
                "src": "4514:72:36"
              }
            ],
            "id": 5188,
            "name": "FunctionDefinition",
            "src": "4440:146:36"
          },
          {
            "attributes": {
              "functionSelector": "6f307dc3",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "underlying",
              "scope": 5197,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 5189,
                "name": "ParameterList",
                "src": "4611:2:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 5196,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 5190,
                        "name": "ElementaryTypeName",
                        "src": "4635:7:36"
                      }
                    ],
                    "id": 5191,
                    "name": "VariableDeclaration",
                    "src": "4635:7:36"
                  }
                ],
                "id": 5192,
                "name": "ParameterList",
                "src": "4634:9:36"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 5192
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 4927,
                          "type": "address",
                          "value": "_underlying"
                        },
                        "id": 5193,
                        "name": "Identifier",
                        "src": "4661:11:36"
                      }
                    ],
                    "id": 5194,
                    "name": "Return",
                    "src": "4654:18:36"
                  }
                ],
                "id": 5195,
                "name": "Block",
                "src": "4644:35:36"
              }
            ],
            "id": 5196,
            "name": "FunctionDefinition",
            "src": "4592:87:36"
          }
        ],
        "id": 5197,
        "name": "ContractDefinition",
        "src": "860:3821:36"
      }
    ],
    "id": 5198,
    "name": "SourceUnit",
    "src": "640:4042:36"
  },
  "compiler": {
    "name": "solc",
    "version": "0.7.3+commit.9bfce1f6.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.3",
  "updatedAt": "2021-02-01T23:13:33.270Z",
  "devdoc": {
    "kind": "dev",
    "methods": {
      "allowance(address,address)": {
        "details": "See {IERC20-allowance}."
      },
      "approve(address,uint256)": {
        "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."
      },
      "balanceOf(address)": {
        "details": "See {IERC20-balanceOf}."
      },
      "decimals()": {
        "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
      },
      "decreaseAllowance(address,uint256)": {
        "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
      },
      "increaseAllowance(address,uint256)": {
        "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
      },
      "name()": {
        "details": "Returns the name of the token."
      },
      "symbol()": {
        "details": "Returns the symbol of the token, usually a shorter version of the name."
      },
      "totalSupply()": {
        "details": "See {IERC20-totalSupply}."
      },
      "transfer(address,uint256)": {
        "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."
      },
      "transferFrom(address,address,uint256)": {
        "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}