{
  "contractName": "cERC20",
  "abi": [
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "mintAmount",
          "type": "uint256"
        }
      ],
      "name": "mint",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "mintAmount",
          "type": "uint256"
        }
      ],
      "name": "redeemUnderlying",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "exchangeRateCurrent",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "exchangeRateStored",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "addr",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/SimpleDAIStaking.sol\":\"cERC20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/DSMath.sol\":{\"keccak256\":\"0x59fb5b1c4c3f68c1694f6ff5698016ac8ee9401b61e87473113dc103b7a6b0ff\",\"urls\":[\"bzz-raw://7410f43989dea44e64bed870958ce9199606dd8a9783e79fe8deca7b544164af\",\"dweb:/ipfs/QmPrrdvp2ErwL6SJSveB3JANo7ivadSMnk9gpWZD8nR7hy\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/FeelessScheme.sol\":{\"keccak256\":\"0x7c542d44cbd864ee0ddecbc5016d9d7eb9ce65ab463fdd9f21eb8ce3c6ffc8ea\",\"urls\":[\"bzz-raw://4753dd823c0b0cbe7d7d02e1df64ace07d7a163af3aaff12697aee70a1b45f2f\",\"dweb:/ipfs/QmPkKeH88M3f6UbHphayUbjEBNV4rmoogtDmVundzBKbFK\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/SchemeGuard.sol\":{\"keccak256\":\"0x32e1b2a172e2c22a6aa757bfcb0722cc67f64c5c2e48df3dec2737903516d565\",\"urls\":[\"bzz-raw://bee57a8eba08348e93a0c18f3ab534e67865c0fa27afe27f5cf234bd5f248915\",\"dweb:/ipfs/Qmd8aveHWcUkYWMyJrJRZPyVXj8MAMBfpBFo6g4Z2VJeo3\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/Identity.sol\":{\"keccak256\":\"0x282184478f1d618d3523b28a84a7f7003dfdc99cad120e5e358d2cce1f5fb491\",\"urls\":[\"bzz-raw://67e17ecb57b24c4fb801abc2c52c3148af3b967e28da4fb7e074d18efb7a57c1\",\"dweb:/ipfs/QmfZ8jXhdTHtxr3gfByRj4HnXnGynX7SLZWWGR8k768aGB\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityAdminRole.sol\":{\"keccak256\":\"0x8e82c45eefe0da77d017144dfad12602c68124297035937901cdd08ce48c57ff\",\"urls\":[\"bzz-raw://e20e606342b3b35f41a081294cf3f716fe7e27e81d3090daa37c5208f4ef4bc3\",\"dweb:/ipfs/QmVEhHpiwVsksnPyHkfNa5LpTBLxoP9kj5NRZUBv456ewK\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/IdentityGuard.sol\":{\"keccak256\":\"0xcc395c0e8f812201b5ed1f45e7272120ee5ffe73bfe13e325dfd872aef235b22\",\"urls\":[\"bzz-raw://58f93e4b9f48ec31ac151208e4f9e6b356cc23dfc9585d846bc09bf35d6ff7be\",\"dweb:/ipfs/QmdxJHUCaFx8N66kkDhYdA4k6d2V91yBRG6sombuPxBq7X\"]},\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/SimpleDAIStaking.sol\":{\"keccak256\":\"0x245246632bb2a59a67277107f64975487806db57f8ad49d14e9626d8d72cd186\",\"urls\":[\"bzz-raw://e767763526d6b497514991f02db1a3da9c925ce32e522213f943cd2b8305cf12\",\"dweb:/ipfs/QmfUjN8Z59ZZNb3vkChmjoTGrpxwrNKNxzjML2pmrhWD2T\"]},\"@daostack/arc/contracts/controller/Avatar.sol\":{\"keccak256\":\"0x4e4fb9d3bc21f42fbfc6a01e9f8aa483a59e9f447b0d604f55b587a81ec09ef4\",\"urls\":[\"bzz-raw://9d3c1c7575cf6075ea1d89921f09b9b8e322b208dacaf0446cd4f64506c999f0\",\"dweb:/ipfs/QmVGDDHAR2ByuQpbgV7BBKXGEAcbaWvejpEZYzHgaagBFK\"]},\"@daostack/arc/contracts/controller/ControllerInterface.sol\":{\"keccak256\":\"0x933e92612c90f292c7b59908958b003f1a13d90b97bed0572b566353c20974dc\",\"urls\":[\"bzz-raw://ce1fcf85b744fcce2dbd4205e3943e9b4ec36a5f0330d4bbf61e65f1a3e0e470\",\"dweb:/ipfs/QmUWiLkBDdekhpy93nTzBtxDHL6yNh6sTUM9G8VbsHcBzy\"]},\"@daostack/arc/contracts/controller/DAOToken.sol\":{\"keccak256\":\"0x9b213e4e3ceeffcfc1c962a43b70b8d763d8091a2dd713fc1989b97bb68786e6\",\"urls\":[\"bzz-raw://51d1d6e85fd90f45395a16b7a3c703c4636e836041f2a13f806e4222ef2e59c1\",\"dweb:/ipfs/QmQjeCeFf7TJzsYjT5scyZUDDixBA8Yy8YppgBuxcKPDnP\"]},\"@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol\":{\"keccak256\":\"0xc006c4591ec10b845a56e13f6791db2c428610953034686d52b2a934b6c8f36f\",\"urls\":[\"bzz-raw://19495cd88280e54d7ddcd043ffeff75e6d3777a0c42debcd61cae448e9497ea0\",\"dweb:/ipfs/QmYxWz7CgFmmddrcVXJKfob5Ktwykc2imNVUwLSR5WR8bJ\"]},\"@daostack/arc/contracts/libs/SafeERC20.sol\":{\"keccak256\":\"0xf6727d432f67046145b078f40c1cc4f6be7b0d12a6678ecaf457edf7550d244c\",\"urls\":[\"bzz-raw://5dba7734c4fed446c084a707761cbc66ba22b8b93ef53c8d4a22a76b6e271690\",\"dweb:/ipfs/QmP2VpPKUqLh4ZZs6LaxHVpCN1zCmiorygL9bMub4mbYCw\"]},\"@daostack/infra/contracts/Reputation.sol\":{\"keccak256\":\"0x3d226dac0fe7d758f0287fb28bc25fcec1f69d19888ae3a550fa49856d61c482\",\"urls\":[\"bzz-raw://8856852c8fe0ba1c9aab326f0a9a6e7f31a238de2778fa5188e6fc399f7eb352\",\"dweb:/ipfs/QmVH4ppR9Dk7v8yxaSgeArdMv9gBBVoQxEf4E3UsqQ4rY2\"]},\"openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzz-raw://4ca6617349a9b36fd82e9442a8e445ce9021a174e4399d1457ddc894ee3f5df3\",\"dweb:/ipfs/QmcmyB4cNazZ1sw963Afaijt67M9bDgwmGXCgQajGTD4tm\"]},\"openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0x6506133e295a7199df2ac5dfc52853d9d767f68450b6d0193e9d8056b164ce86\",\"urls\":[\"bzz-raw://9c03592a9e6b1377e401b74eccf175a250232b5a341347d3fc5cb50e9bc86ba2\",\"dweb:/ipfs/QmYAr1yXT89hNUMJ37aiBpD9HtYfBDqmueVCzphRuuU7oZ\"]},\"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x3b0ed31deeba7e3c6cfbbe8092a6b427084ee390800a06acdea5c17c8185d606\",\"urls\":[\"bzz-raw://bbdbf9d3754fcdcc85aec0432fabcec914317b1c2081b43753442ed53853a34a\",\"dweb:/ipfs/QmVHWQBn5xQkQEHhyGNEeS5gjjALZEk5ZfcjFt7kL6MoLy\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzz-raw://1eb493553b27efd46c231a836a83ce50d215639feb97b4aac9f301d0fd034ff5\",\"dweb:/ipfs/QmbMdvSXcqGKxeeYvzF3VrWpoHQyVzMXBhzhAokF2Gdymv\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzz-raw://f07a2c393caa85f62f0aaa461e3edd50aa59371d4209778ba0558d7f8b4b856c\",\"dweb:/ipfs/QmeN3ZiYGSjCnQFeYaJNgoXjF9eDue1g3e9pqManRkeBtV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzz-raw://f40c91ca270bdc9b156f339081a0fc2bbcf73cf5f62b8c73ba555df753ff6619\",\"dweb:/ipfs/QmT8y2VVjGaFdGphpcXrgvdPi2EgF9LuCDgJiJ89LvpFRV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa3e68fd7f987c8fbdaf4867d428a69a15f3cf2f69709a5b0a0fbef750b0e6fbc\",\"urls\":[\"bzz-raw://50b1ff986d3b2793850a66c8429d9886fdfb134b1509b3e98714e3e2a71e24f5\",\"dweb:/ipfs/QmSQBYPeY9tbR3ciGRNQqvcWKnNiuxtVMq2MsPWpLwuGGm\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzz-raw://ee762ff5b7746e41d27dcbcea00c7a3034b58adb1b45ddadddb5b721aff450df\",\"dweb:/ipfs/QmdxqtgEFZjHCoiYyz6pUAQ5iBm7As25jcyEbZoTaAgyDa\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0x5c731061b804fa256fc8c05150eafe5d20b6bb94541a8f187912bf84f7033f34\",\"urls\":[\"bzz-raw://a3c2d9f046beebab7fb41b1b124a6a124a36f510f7c67365861402ac831bdc71\",\"dweb:/ipfs/QmUtASRgitregbKH83anopLtF9vFQe3BKeAjhUa6F7t9YV\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "pragma solidity >0.5.4;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/lifecycle/Pausable.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"@daostack/arc/contracts/controller/Avatar.sol\";\nimport \"../../contracts/dao/schemes/FeelessScheme.sol\";\nimport \"../../contracts/identity/Identity.sol\";\nimport \"../../contracts/DSMath.sol\";\n\ninterface cERC20 {\n    function mint(uint256 mintAmount) external returns (uint256);\n\n    function redeemUnderlying(uint256 mintAmount) external returns (uint256);\n\n    function exchangeRateCurrent() external returns (uint256);\n\n    function exchangeRateStored() external view returns (uint256);\n\n    function balanceOf(address addr) external view returns (uint256);\n\n    function transfer(address to, uint256 amount) external returns (bool);\n}\n\n/**\n * @title Staking contract that donates earned interest to the DAO\n * allowing stakers to deposit DAI or withdraw their stake in DAI.\n * The contract buys cDAI and can transfer the daily interest to the DAO\n */\ncontract SimpleDAIStaking is DSMath, Pausable, FeelessScheme {\n    using SafeMath for uint256;\n\n    // Entity that holds a staker info\n    struct Staker {\n        // The staked DAI amount\n        uint256 stakedDAI;\n        // The latest block number which the\n        // staker has staked tokens\n        uint256 lastStake;\n    }\n\n    // The map which holds the stakers entities\n    mapping(address => Staker) public stakers;\n\n    // Emits when new DAI tokens have been staked\n    event DAIStaked(\n        // The staker address\n        address indexed staker,\n        // How many tokens have been staked\n        uint256 daiValue\n    );\n\n    // Emits when DAI tokens are being withdrawn\n    event DAIStakeWithdraw(\n        // The staker that initiate the action\n        address indexed staker,\n        // The initial DAI value that was staked\n        uint256 daiValue,\n        // The current DAI value that was staked\n        uint256 daiActual\n    );\n\n    // Emits when the interest is collected\n    event InterestCollected(\n        // Who is receives the interest\n        address recipient,\n        // How many cDAI tokens have been transferred\n        uint256 cdaiValue,\n        // The worth of the transferred tokens in DAI\n        uint256 daiValue,\n        // Lost amount. A result of different precisions\n        uint256 daiPrecisionLoss\n    );\n\n    // DAI token address\n    ERC20 public dai;\n\n    // cDAI token address\n    cERC20 public cDai;\n\n    // The block interval defines the number of\n    // blocks that shall be passed before the\n    // next execution of `collectUBIInterest`\n    uint256 public blockInterval;\n\n    // The last block number which\n    // `collectUBIInterest` has been executed in\n    uint256 public lastUBICollection;\n\n    // The total staked DAI amount in the contract\n    uint256 public totalStaked = 0;\n\n    // How much of the generated interest is donated,\n    // meaning no GD is expected in compensation, 1 in mil precision.\n    // 100% for phase0 POC\n    uint32 public avgInterestDonatedRatio = 1e6;\n\n    // The address of the fund manager contract\n    address public fundManager;\n\n    modifier onlyFundManager {\n        require(msg.sender == fundManager, \"Only FundManager can call this method\");\n        _;\n    }\n\n    /**\n     * @dev Constructor\n     * @param _dai The address of DAI\n     * @param _cDai The address of cDAI\n     * @param _fundManager The address of the fund manager contract\n     * @param _blockInterval How many blocks should be passed before the next execution of `collectUBIInterest`\n     * @param _avatar The avatar of the DAO\n     * @param _identity The identity contract\n     */\n    constructor(\n        address _dai,\n        address _cDai,\n        address _fundManager,\n        uint256 _blockInterval,\n        Avatar _avatar,\n        Identity _identity\n    ) public FeelessScheme(_identity, _avatar) {\n        dai = ERC20(_dai);\n        cDai = cERC20(_cDai);\n        blockInterval = _blockInterval;\n        lastUBICollection = block.number.div(blockInterval);\n        fundManager = _fundManager;\n\n        // Adds the avatar as a pauser of this contract\n        addPauser(address(avatar));\n    }\n\n    /**\n     * @dev Allows the DAO to change the fund manager contract address\n     * @param _fundManager Address of the new contract\n     */\n    function setFundManager(address _fundManager) public onlyAvatar {\n        fundManager = _fundManager;\n    }\n\n    /**\n     * @dev Allows a staker to deposit DAI tokens. Notice that `approve` is\n     * needed to be executed before the execution of this method.\n     * Can be executed only when the contract is not paused.\n     * @param _amount The amount of DAI to stake\n     */\n    function stakeDAI(uint256 _amount) public whenNotPaused {\n        require(_amount > 0, \"You need to stake a positive token amount\");\n        require(\n            dai.transferFrom(msg.sender, address(this), _amount) == true,\n            \"transferFrom failed, make sure you approved DAI transfer\"\n        );\n\n        // approve the transfer to cDAI\n        dai.approve(address(cDai), _amount);\n\n        // mint ctokens\n        uint256 res = cDai.mint(_amount);\n\n        // cDAI returns >0 if error happened while minting.\n        // Makes sure that there are no errors. If an error\n        // has occurred, DAI funds shall be returned.\n        if (res > 0) {\n            require(res == 0, \"Minting cDai failed, funds returned\");\n        }\n\n        // updated the staker entity\n        Staker storage staker = stakers[msg.sender];\n        staker.stakedDAI = staker.stakedDAI.add(_amount);\n        staker.lastStake = block.number;\n\n        // adds the staked amount to the total staked\n        totalStaked = totalStaked.add(_amount);\n\n        emit DAIStaked(msg.sender, _amount);\n    }\n\n    /**\n     * @dev Withdraws the sender staked DAI.\n     */\n    function withdrawStake() public {\n        Staker storage staker = stakers[msg.sender];\n        require(staker.stakedDAI > 0, \"No DAI staked\");\n        require(cDai.redeemUnderlying(staker.stakedDAI) == 0, \"Failed to redeem cDai\");\n        uint256 daiWithdraw = staker.stakedDAI;\n\n        // updates balance before transfer to prevent re-entry\n        staker.stakedDAI = 0;\n\n        totalStaked = totalStaked.sub(daiWithdraw);\n\n        //redeeming in compound may result in a tiny fraction of precission error\n        //so if we redeem 100 DAI we might get something like 99.9999999999\n        uint256 daiActual = dai.balanceOf(address(this));\n        if (daiActual < daiWithdraw) {\n            daiWithdraw = daiActual;\n        }\n        require(dai.transfer(msg.sender, daiWithdraw), \"withdraw transfer failed\");\n        emit DAIStakeWithdraw(msg.sender, daiWithdraw, daiActual);\n    }\n\n    /**\n     * @dev Calculates the worth of the staked cDAI tokens in DAI.\n     * @return (uint256) The worth in DAI\n     */\n    function currentDAIWorth() public view returns (uint256) {\n        uint256 er = cDai.exchangeRateStored();\n\n        //TODO: why 1e10? cDai is e8 so we should convert it to e28 like exchange rate\n        uint256 daiBalance = rmul(cDai.balanceOf(address(this)).mul(1e10), er).div(10);\n        return daiBalance;\n    }\n\n    /**\n     * @dev Calculates the current interest that was gained.\n     * @return (uint256, uint256, uint256) The interest in cDAI, the interest in DAI,\n     * the amount which is not covered by precision of DAI\n     */\n    function currentUBIInterest()\n        public\n        view\n        returns (\n            uint256,\n            uint256,\n            uint256\n        )\n    {\n        uint256 er = cDai.exchangeRateStored();\n        uint256 daiWorth = currentDAIWorth();\n        if (daiWorth <= totalStaked) {\n            return (0, 0, 0);\n        }\n        uint256 daiGains = daiWorth.sub(totalStaked);\n        // mul by 1e10 to equalize precision otherwise since exchangerate\n        // is very big, dividing by it would result in 0.\n        uint256 cdaiGains = rdiv(daiGains.mul(1e10), er);\n        // gets right most bits not covered by precision of cdai which is\n        // only 8 decimals while RAY is 27\n        uint256 precisionLossCDaiRay = cdaiGains.mod(1e19);\n        // lower back to 8 decimals\n        cdaiGains = cdaiGains.div(1e19);\n        //div by 1e10 to get results in dai precision 1e18\n        uint256 precisionLossDai = rmul(precisionLossCDaiRay, er).div(1e10);\n        return (cdaiGains, daiGains, precisionLossDai);\n    }\n\n    /**\n     * @dev Collects gained interest by fundmanager. Can be collected only once\n     * in an interval which is defined above.\n     * @param _recipient The recipient of cDAI gains\n     * @return (uint256, uint256, uint256, uint32) The interest in cDAI, the interest in DAI,\n     * the amount which is not covered by precision of DAI, how much of the generated interest is donated\n     */\n    function collectUBIInterest(address _recipient)\n        public\n        onlyFundManager\n        returns (\n            uint256,\n            uint256,\n            uint256,\n            uint32\n        )\n    {\n        // otherwise fund manager has to wait for the next interval\n        require(_recipient != address(this), \"Recipient cannot be the staking contract\");\n\n        require(canCollect(), \"Need to wait for the next interval\");\n\n        (\n            uint256 cdaiGains,\n            uint256 daiGains,\n            uint256 precisionLossDai\n        ) = currentUBIInterest();\n        lastUBICollection = block.number.div(blockInterval);\n        if (cdaiGains > 0)\n            require(cDai.transfer(_recipient, cdaiGains), \"collect transfer failed\");\n        emit InterestCollected(_recipient, cdaiGains, daiGains, precisionLossDai);\n        return (cdaiGains, daiGains, precisionLossDai, avgInterestDonatedRatio);\n    }\n\n    /**\n     * @dev Checks if enough blocks have passed so it would be possible to\n     * execute `collectUBIInterest` according to the length of `blockInterval`\n     * @return (bool) True if enough blocks have passed\n     */\n    function canCollect() public view returns (bool) {\n        return block.number.div(blockInterval) > lastUBICollection;\n    }\n\n    /**\n     * @dev Start function. Adds this contract to identity as a feeless scheme.\n     * Can only be called if scheme is registered\n     */\n    function start() public onlyRegistered {\n        addRights();\n    }\n\n    /**\n     * @dev making the contract inactive\n     * NOTICE: this could theoretically result in future interest earned in cdai to remain locked\n     * but we dont expect any other stakers but us in SimpleDAIStaking\n     */\n    function end() public onlyAvatar {\n        pause();\n        removeRights();\n    }\n\n    /**\n     * @dev method to recover any stuck erc20 tokens (ie  compound COMP)\n     * @param _token the ERC20 token to recover\n     */\n    function recover(ERC20 _token) public onlyAvatar {\n        uint256 toWithdraw = _token.balanceOf(address(this));\n\n        // recover left cDai(stakers token) only when all stakes have been withdrawn\n        if (address(_token) == address(cDai)) {\n            require(\n                totalStaked == 0 && paused(),\n                \"can recover cDai only when stakes have been withdrawn\"\n            );\n        }\n        require(_token.transfer(address(avatar), toWithdraw), \"recover transfer failed\");\n    }\n}\n",
  "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/SimpleDAIStaking.sol",
  "ast": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/SimpleDAIStaking.sol",
    "exportedSymbols": {
      "SimpleDAIStaking": [
        9740
      ],
      "cERC20": [
        9160
      ]
    },
    "id": 9741,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 9112,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:29"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "id": 9113,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21309,
        "src": "25:59:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
        "file": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
        "id": 9114,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21112,
        "src": "85:64:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 9115,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21850,
        "src": "150:63:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 9116,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 12706,
        "src": "214:55:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/FeelessScheme.sol",
        "file": "../../contracts/dao/schemes/FeelessScheme.sol",
        "id": 9117,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 1228,
        "src": "270:55:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/Identity.sol",
        "file": "../../contracts/identity/Identity.sol",
        "id": 9118,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 2381,
        "src": "326:47:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/DSMath.sol",
        "file": "../../contracts/DSMath.sol",
        "id": 9119,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 304,
        "src": "374:36:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": null,
        "fullyImplemented": false,
        "id": 9160,
        "linearizedBaseContracts": [
          9160
        ],
        "name": "cERC20",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": null,
            "id": 9126,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mint",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9122,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9121,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9126,
                  "src": "449:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9120,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "449:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "448:20:29"
            },
            "returnParameters": {
              "id": 9125,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9124,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9126,
                  "src": "487:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9123,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "487:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "486:9:29"
            },
            "scope": 9160,
            "src": "435:61:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9133,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemUnderlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9129,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9128,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9133,
                  "src": "528:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9127,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "528:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "527:20:29"
            },
            "returnParameters": {
              "id": 9132,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9131,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9133,
                  "src": "566:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9130,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "566:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "565:9:29"
            },
            "scope": 9160,
            "src": "502:73:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9138,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "exchangeRateCurrent",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9134,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "609:2:29"
            },
            "returnParameters": {
              "id": 9137,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9136,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9138,
                  "src": "630:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9135,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "630:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "629:9:29"
            },
            "scope": 9160,
            "src": "581:58:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9143,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "exchangeRateStored",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9139,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "672:2:29"
            },
            "returnParameters": {
              "id": 9142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9143,
                  "src": "698:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9140,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "698:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "697:9:29"
            },
            "scope": 9160,
            "src": "645:62:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9150,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "balanceOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9146,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9145,
                  "name": "addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 9150,
                  "src": "732:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9144,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "732:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "731:14:29"
            },
            "returnParameters": {
              "id": 9149,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9148,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9150,
                  "src": "769:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9147,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "769:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "768:9:29"
            },
            "scope": 9160,
            "src": "713:65:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9159,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9155,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9152,
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "802:10:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9151,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "802:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9154,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "814:14:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9153,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "814:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "801:28:29"
            },
            "returnParameters": {
              "id": 9158,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9157,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "848:4:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9156,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "848:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "847:6:29"
            },
            "scope": 9160,
            "src": "784:70:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 9741,
        "src": "412:444:29"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9161,
              "name": "DSMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 303,
              "src": "1102:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_DSMath_$303",
                "typeString": "contract DSMath"
              }
            },
            "id": 9162,
            "nodeType": "InheritanceSpecifier",
            "src": "1102:6:29"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9163,
              "name": "Pausable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21111,
              "src": "1110:8:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Pausable_$21111",
                "typeString": "contract Pausable"
              }
            },
            "id": 9164,
            "nodeType": "InheritanceSpecifier",
            "src": "1110:8:29"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9165,
              "name": "FeelessScheme",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1227,
              "src": "1120:13:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_FeelessScheme_$1227",
                "typeString": "contract FeelessScheme"
              }
            },
            "id": 9166,
            "nodeType": "InheritanceSpecifier",
            "src": "1120:13:29"
          }
        ],
        "contractDependencies": [
          303,
          1227,
          1423,
          2667,
          20947,
          21111,
          21417
        ],
        "contractKind": "contract",
        "documentation": "@title Staking contract that donates earned interest to the DAO\nallowing stakers to deposit DAI or withdraw their stake in DAI.\nThe contract buys cDAI and can transfer the daily interest to the DAO",
        "fullyImplemented": true,
        "id": 9740,
        "linearizedBaseContracts": [
          9740,
          1227,
          2667,
          1423,
          21417,
          21111,
          20947,
          303
        ],
        "name": "SimpleDAIStaking",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 9169,
            "libraryName": {
              "contractScope": null,
              "id": 9167,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21308,
              "src": "1146:8:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$21308",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1140:27:29",
            "typeName": {
              "id": 9168,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1159:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "canonicalName": "SimpleDAIStaking.Staker",
            "id": 9174,
            "members": [
              {
                "constant": false,
                "id": 9171,
                "name": "stakedDAI",
                "nodeType": "VariableDeclaration",
                "scope": 9174,
                "src": "1269:17:29",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 9170,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1269:7:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 9173,
                "name": "lastStake",
                "nodeType": "VariableDeclaration",
                "scope": 9174,
                "src": "1377:17:29",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 9172,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1377:7:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "Staker",
            "nodeType": "StructDefinition",
            "scope": 9740,
            "src": "1212:189:29",
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9178,
            "name": "stakers",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "1455:41:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
              "typeString": "mapping(address => struct SimpleDAIStaking.Staker)"
            },
            "typeName": {
              "id": 9177,
              "keyType": {
                "id": 9175,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "1463:7:29",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "1455:26:29",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                "typeString": "mapping(address => struct SimpleDAIStaking.Staker)"
              },
              "valueType": {
                "contractScope": null,
                "id": 9176,
                "name": "Staker",
                "nodeType": "UserDefinedTypeName",
                "referencedDeclaration": 9174,
                "src": "1474:6:29",
                "typeDescriptions": {
                  "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                  "typeString": "struct SimpleDAIStaking.Staker"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9184,
            "name": "DAIStaked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9183,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9180,
                  "indexed": true,
                  "name": "staker",
                  "nodeType": "VariableDeclaration",
                  "scope": 9184,
                  "src": "1608:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1608:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9182,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9184,
                  "src": "1684:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9181,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1684:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1568:138:29"
            },
            "src": "1553:154:29"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9192,
            "name": "DAIStakeWithdraw",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9186,
                  "indexed": true,
                  "name": "staker",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1841:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9185,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1841:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9188,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1922:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9187,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1922:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9190,
                  "indexed": false,
                  "name": "daiActual",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1997:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9189,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1997:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1784:236:29"
            },
            "src": "1762:259:29"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9202,
            "name": "InterestCollected",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9194,
                  "indexed": false,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2144:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9193,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2144:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9196,
                  "indexed": false,
                  "name": "cdaiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2225:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9195,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2225:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9198,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2306:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9197,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2306:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9200,
                  "indexed": false,
                  "name": "daiPrecisionLoss",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2389:24:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9199,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2389:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2094:325:29"
            },
            "src": "2071:349:29"
          },
          {
            "constant": false,
            "id": 9204,
            "name": "dai",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2451:16:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ERC20_$21849",
              "typeString": "contract ERC20"
            },
            "typeName": {
              "contractScope": null,
              "id": 9203,
              "name": "ERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21849,
              "src": "2451:5:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ERC20_$21849",
                "typeString": "contract ERC20"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9206,
            "name": "cDai",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2500:18:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_cERC20_$9160",
              "typeString": "contract cERC20"
            },
            "typeName": {
              "contractScope": null,
              "id": 9205,
              "name": "cERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 9160,
              "src": "2500:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_cERC20_$9160",
                "typeString": "contract cERC20"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9208,
            "name": "blockInterval",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2665:28:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9207,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2665:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9210,
            "name": "lastUBICollection",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2784:32:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9209,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2784:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9213,
            "name": "totalStaked",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2874:30:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9211,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2874:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "30",
              "id": 9212,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "2903:1:29",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_0_by_1",
                "typeString": "int_const 0"
              },
              "value": "0"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9216,
            "name": "avgInterestDonatedRatio",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "3062:43:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 9214,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "3062:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "316536",
              "id": 9215,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "3102:3:29",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1e6"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9218,
            "name": "fundManager",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "3160:26:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 9217,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "3160:7:29",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9229,
              "nodeType": "Block",
              "src": "3218:103:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 9224,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9221,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22171,
                            "src": "3236:3:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 9222,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3236:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 9223,
                          "name": "fundManager",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9218,
                          "src": "3250:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "3236:25:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4f6e6c792046756e644d616e616765722063616e2063616c6c2074686973206d6574686f64",
                        "id": 9225,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3263:39:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8659903c14beb1decb5cde807aae2b42823801f7a2ec9f1cb2d42f84ff652fab",
                          "typeString": "literal_string \"Only FundManager can call this method\""
                        },
                        "value": "Only FundManager can call this method"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8659903c14beb1decb5cde807aae2b42823801f7a2ec9f1cb2d42f84ff652fab",
                          "typeString": "literal_string \"Only FundManager can call this method\""
                        }
                      ],
                      "id": 9220,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "3228:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9226,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3228:75:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9227,
                  "nodeType": "ExpressionStatement",
                  "src": "3228:75:29"
                },
                {
                  "id": 9228,
                  "nodeType": "PlaceholderStatement",
                  "src": "3313:1:29"
                }
              ]
            },
            "documentation": null,
            "id": 9230,
            "name": "onlyFundManager",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 9219,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3218:0:29"
            },
            "src": "3193:128:29",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9283,
              "nodeType": "Block",
              "src": "3933:294:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9253,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9249,
                      "name": "dai",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9204,
                      "src": "3943:3:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ERC20_$21849",
                        "typeString": "contract ERC20"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9251,
                          "name": "_dai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9232,
                          "src": "3955:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 9250,
                        "name": "ERC20",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21849,
                        "src": "3949:5:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ERC20_$21849_$",
                          "typeString": "type(contract ERC20)"
                        }
                      },
                      "id": 9252,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3949:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ERC20_$21849",
                        "typeString": "contract ERC20"
                      }
                    },
                    "src": "3943:17:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$21849",
                      "typeString": "contract ERC20"
                    }
                  },
                  "id": 9254,
                  "nodeType": "ExpressionStatement",
                  "src": "3943:17:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9259,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9255,
                      "name": "cDai",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9206,
                      "src": "3970:4:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_cERC20_$9160",
                        "typeString": "contract cERC20"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9257,
                          "name": "_cDai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9234,
                          "src": "3984:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 9256,
                        "name": "cERC20",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9160,
                        "src": "3977:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_cERC20_$9160_$",
                          "typeString": "type(contract cERC20)"
                        }
                      },
                      "id": 9258,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3977:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_cERC20_$9160",
                        "typeString": "contract cERC20"
                      }
                    },
                    "src": "3970:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_cERC20_$9160",
                      "typeString": "contract cERC20"
                    }
                  },
                  "id": 9260,
                  "nodeType": "ExpressionStatement",
                  "src": "3970:20:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9263,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9261,
                      "name": "blockInterval",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9208,
                      "src": "4000:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9262,
                      "name": "_blockInterval",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9238,
                      "src": "4016:14:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4000:30:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9264,
                  "nodeType": "ExpressionStatement",
                  "src": "4000:30:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9265,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "4040:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9269,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "4077:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9266,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "4060:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9267,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "4060:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9268,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "4060:16:29",
                        "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": 9270,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4060:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4040:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9272,
                  "nodeType": "ExpressionStatement",
                  "src": "4040:51:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9275,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9273,
                      "name": "fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9218,
                      "src": "4101:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9274,
                      "name": "_fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9236,
                      "src": "4115:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "4101:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 9276,
                  "nodeType": "ExpressionStatement",
                  "src": "4101:26:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9279,
                            "name": "avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1281,
                            "src": "4212:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Avatar_$12705",
                              "typeString": "contract Avatar"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_Avatar_$12705",
                              "typeString": "contract Avatar"
                            }
                          ],
                          "id": 9278,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4204:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9280,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4204:15:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "id": 9277,
                      "name": "addPauser",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 20905,
                      "src": "4194:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 9281,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4194:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9282,
                  "nodeType": "ExpressionStatement",
                  "src": "4194:26:29"
                }
              ]
            },
            "documentation": "@dev Constructor\n@param _dai The address of DAI\n@param _cDai The address of cDAI\n@param _fundManager The address of the fund manager contract\n@param _blockInterval How many blocks should be passed before the next execution of `collectUBIInterest`\n@param _avatar The avatar of the DAO\n@param _identity The identity contract",
            "id": 9284,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 9245,
                    "name": "_identity",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9242,
                    "src": "3913:9:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Identity_$2380",
                      "typeString": "contract Identity"
                    }
                  },
                  {
                    "argumentTypes": null,
                    "id": 9246,
                    "name": "_avatar",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9240,
                    "src": "3924:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  }
                ],
                "id": 9247,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9244,
                  "name": "FeelessScheme",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1227,
                  "src": "3899:13:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_FeelessScheme_$1227_$",
                    "typeString": "type(contract FeelessScheme)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3899:33:29"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9243,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9232,
                  "name": "_dai",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3736:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9231,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3736:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9234,
                  "name": "_cDai",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3758:13:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9233,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3758:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9236,
                  "name": "_fundManager",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3781:20:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9235,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3781:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9238,
                  "name": "_blockInterval",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3811:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9237,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3811:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9240,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3843:14:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9239,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "3843:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9242,
                  "name": "_identity",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3867:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Identity_$2380",
                    "typeString": "contract Identity"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9241,
                    "name": "Identity",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2380,
                    "src": "3867:8:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Identity_$2380",
                      "typeString": "contract Identity"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3726:165:29"
            },
            "returnParameters": {
              "id": 9248,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3933:0:29"
            },
            "scope": 9740,
            "src": "3715:512:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9295,
              "nodeType": "Block",
              "src": "4439:43:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9293,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9291,
                      "name": "fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9218,
                      "src": "4449:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9292,
                      "name": "_fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9286,
                      "src": "4463:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "4449:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 9294,
                  "nodeType": "ExpressionStatement",
                  "src": "4449:26:29"
                }
              ]
            },
            "documentation": "@dev Allows the DAO to change the fund manager contract address\n@param _fundManager Address of the new contract",
            "id": 9296,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9289,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9288,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "4428:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4428:10:29"
              }
            ],
            "name": "setFundManager",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9287,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9286,
                  "name": "_fundManager",
                  "nodeType": "VariableDeclaration",
                  "scope": 9296,
                  "src": "4399:20:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9285,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4399:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4398:22:29"
            },
            "returnParameters": {
              "id": 9290,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4439:0:29"
            },
            "scope": 9740,
            "src": "4375:107:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9390,
              "nodeType": "Block",
              "src": "4812:1025:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9306,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 9304,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "4830:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9305,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4840:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4830:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "596f75206e65656420746f207374616b65206120706f73697469766520746f6b656e20616d6f756e74",
                        "id": 9307,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4843:43:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_0df2c7e58c395cb8df3c21ef84be33d1d8ff5cbf2a8b2cf1fa7931eeed13da62",
                          "typeString": "literal_string \"You need to stake a positive token amount\""
                        },
                        "value": "You need to stake a positive token amount"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_0df2c7e58c395cb8df3c21ef84be33d1d8ff5cbf2a8b2cf1fa7931eeed13da62",
                          "typeString": "literal_string \"You need to stake a positive token amount\""
                        }
                      ],
                      "id": 9303,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "4822:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9308,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4822:65:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9309,
                  "nodeType": "ExpressionStatement",
                  "src": "4822:65:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 9321,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 9313,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 22171,
                                "src": "4935:3:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 9314,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4935:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 9316,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 22327,
                                  "src": "4955:4:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                    "typeString": "contract SimpleDAIStaking"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                    "typeString": "contract SimpleDAIStaking"
                                  }
                                ],
                                "id": 9315,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4947:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 9317,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4947:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 9318,
                              "name": "_amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9298,
                              "src": "4962:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9311,
                              "name": "dai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9204,
                              "src": "4918:3:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$21849",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 9312,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21578,
                            "src": "4918:16:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 9319,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4918:52:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 9320,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4974:4:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "src": "4918:60:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7472616e7366657246726f6d206661696c65642c206d616b65207375726520796f7520617070726f76656420444149207472616e73666572",
                        "id": 9322,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4992:58:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ee07915d88e147dbd0474d1f4b7dd5b98a6778f07e832106ffd695a46b406d6e",
                          "typeString": "literal_string \"transferFrom failed, make sure you approved DAI transfer\""
                        },
                        "value": "transferFrom failed, make sure you approved DAI transfer"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ee07915d88e147dbd0474d1f4b7dd5b98a6778f07e832106ffd695a46b406d6e",
                          "typeString": "literal_string \"transferFrom failed, make sure you approved DAI transfer\""
                        }
                      ],
                      "id": 9310,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "4897:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9323,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4897:163:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9324,
                  "nodeType": "ExpressionStatement",
                  "src": "4897:163:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9329,
                            "name": "cDai",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9206,
                            "src": "5131:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_cERC20_$9160",
                              "typeString": "contract cERC20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_cERC20_$9160",
                              "typeString": "contract cERC20"
                            }
                          ],
                          "id": 9328,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5123:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9330,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5123:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9331,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5138:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9325,
                        "name": "dai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9204,
                        "src": "5111:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9327,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21529,
                      "src": "5111:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 9332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5111:35:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9333,
                  "nodeType": "ExpressionStatement",
                  "src": "5111:35:29"
                },
                {
                  "assignments": [
                    9335
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9335,
                      "name": "res",
                      "nodeType": "VariableDeclaration",
                      "scope": 9390,
                      "src": "5181:11:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9334,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5181:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9340,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9338,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5205:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9336,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "5195:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9337,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "mint",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9126,
                      "src": "5195:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) external returns (uint256)"
                      }
                    },
                    "id": 9339,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5195:18:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5181:32:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9343,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9341,
                      "name": "res",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9335,
                      "src": "5402:3:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9342,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "5408:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "5402:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9352,
                  "nodeType": "IfStatement",
                  "src": "5398:94:29",
                  "trueBody": {
                    "id": 9351,
                    "nodeType": "Block",
                    "src": "5411:81:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9347,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 9345,
                                "name": "res",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9335,
                                "src": "5433:3:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 9346,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5440:1:29",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "5433:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4d696e74696e672063446169206661696c65642c2066756e64732072657475726e6564",
                              "id": 9348,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5443:37:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_9fba825e72dafc705b289a19c5027021048dd7f2ebe3c823d265b59e8a41b98f",
                                "typeString": "literal_string \"Minting cDai failed, funds returned\""
                              },
                              "value": "Minting cDai failed, funds returned"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_9fba825e72dafc705b289a19c5027021048dd7f2ebe3c823d265b59e8a41b98f",
                                "typeString": "literal_string \"Minting cDai failed, funds returned\""
                              }
                            ],
                            "id": 9344,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              22174,
                              22175
                            ],
                            "referencedDeclaration": 22175,
                            "src": "5425:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 9349,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5425:56:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9350,
                        "nodeType": "ExpressionStatement",
                        "src": "5425:56:29"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    9354
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9354,
                      "name": "staker",
                      "nodeType": "VariableDeclaration",
                      "scope": 9390,
                      "src": "5539:21:29",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 9353,
                        "name": "Staker",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 9174,
                        "src": "5539:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9359,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 9355,
                      "name": "stakers",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9178,
                      "src": "5563:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                        "typeString": "mapping(address => struct SimpleDAIStaking.Staker storage ref)"
                      }
                    },
                    "id": 9358,
                    "indexExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9356,
                        "name": "msg",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22171,
                        "src": "5571:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_message",
                          "typeString": "msg"
                        }
                      },
                      "id": 9357,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sender",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5571:10:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5563:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Staker_$9174_storage",
                      "typeString": "struct SimpleDAIStaking.Staker storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5539:43:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9368,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9360,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9354,
                        "src": "5592:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9362,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "stakedDAI",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9171,
                      "src": "5592:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9366,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "5632:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9363,
                            "name": "staker",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9354,
                            "src": "5611:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                              "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                            }
                          },
                          "id": 9364,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "stakedDAI",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 9171,
                          "src": "5611:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9365,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21287,
                        "src": "5611:20:29",
                        "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": 9367,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5611:29:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5592:48:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9369,
                  "nodeType": "ExpressionStatement",
                  "src": "5592:48:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9375,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9370,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9354,
                        "src": "5650:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9372,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "lastStake",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9173,
                      "src": "5650:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9373,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22161,
                        "src": "5669:5:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 9374,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5669:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5650:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9376,
                  "nodeType": "ExpressionStatement",
                  "src": "5650:31:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9382,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9377,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "5746:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9380,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "5776:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9378,
                          "name": "totalStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9213,
                          "src": "5760:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9379,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21287,
                        "src": "5760:15:29",
                        "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": 9381,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5760:24:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5746:38:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9383,
                  "nodeType": "ExpressionStatement",
                  "src": "5746:38:29"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 9385,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 22171,
                          "src": "5810:3:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 9386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5810:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9387,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5822:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9384,
                      "name": "DAIStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9184,
                      "src": "5800:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 9388,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5800:30:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9389,
                  "nodeType": "EmitStatement",
                  "src": "5795:35:29"
                }
              ]
            },
            "documentation": "@dev Allows a staker to deposit DAI tokens. Notice that `approve` is\nneeded to be executed before the execution of this method.\nCan be executed only when the contract is not paused.\n@param _amount The amount of DAI to stake",
            "id": 9391,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9301,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9300,
                  "name": "whenNotPaused",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 21068,
                  "src": "4798:13:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4798:13:29"
              }
            ],
            "name": "stakeDAI",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9299,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9298,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9391,
                  "src": "4774:15:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9297,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4774:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4773:17:29"
            },
            "returnParameters": {
              "id": 9302,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4812:0:29"
            },
            "scope": 9740,
            "src": "4756:1081:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9473,
              "nodeType": "Block",
              "src": "5936:853:29",
              "statements": [
                {
                  "assignments": [
                    9395
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9395,
                      "name": "staker",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "5946:21:29",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 9394,
                        "name": "Staker",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 9174,
                        "src": "5946:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9400,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 9396,
                      "name": "stakers",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9178,
                      "src": "5970:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                        "typeString": "mapping(address => struct SimpleDAIStaking.Staker storage ref)"
                      }
                    },
                    "id": 9399,
                    "indexExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9397,
                        "name": "msg",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22171,
                        "src": "5978:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_message",
                          "typeString": "msg"
                        }
                      },
                      "id": 9398,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sender",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5978:10:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5970:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Staker_$9174_storage",
                      "typeString": "struct SimpleDAIStaking.Staker storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5946:43:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9405,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9402,
                            "name": "staker",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9395,
                            "src": "6007:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                              "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                            }
                          },
                          "id": 9403,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "stakedDAI",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 9171,
                          "src": "6007:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9404,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6026:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6007:20:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e6f20444149207374616b6564",
                        "id": 9406,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6029:15:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c7a1c4dcae14020a6de4ccb28b8861c795f9958e1fbdb2ab0fb5dc5d25e10738",
                          "typeString": "literal_string \"No DAI staked\""
                        },
                        "value": "No DAI staked"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c7a1c4dcae14020a6de4ccb28b8861c795f9958e1fbdb2ab0fb5dc5d25e10738",
                          "typeString": "literal_string \"No DAI staked\""
                        }
                      ],
                      "id": 9401,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "5999:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9407,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5999:46:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9408,
                  "nodeType": "ExpressionStatement",
                  "src": "5999:46:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9416,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 9412,
                                "name": "staker",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9395,
                                "src": "6085:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                                  "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                                }
                              },
                              "id": 9413,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "stakedDAI",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 9171,
                              "src": "6085:16:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9410,
                              "name": "cDai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9206,
                              "src": "6063:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_cERC20_$9160",
                                "typeString": "contract cERC20"
                              }
                            },
                            "id": 9411,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "redeemUnderlying",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9133,
                            "src": "6063:21:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256) external returns (uint256)"
                            }
                          },
                          "id": 9414,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6063:39:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6106:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6063:44:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4661696c656420746f2072656465656d2063446169",
                        "id": 9417,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6109:23:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_1f647a2f625cf3b1ea4c7844befd4fe6574e2c7464224cfadaec07f3918cd8a2",
                          "typeString": "literal_string \"Failed to redeem cDai\""
                        },
                        "value": "Failed to redeem cDai"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_1f647a2f625cf3b1ea4c7844befd4fe6574e2c7464224cfadaec07f3918cd8a2",
                          "typeString": "literal_string \"Failed to redeem cDai\""
                        }
                      ],
                      "id": 9409,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "6055:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9418,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6055:78:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9419,
                  "nodeType": "ExpressionStatement",
                  "src": "6055:78:29"
                },
                {
                  "assignments": [
                    9421
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9421,
                      "name": "daiWithdraw",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "6143:19:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9420,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6143:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9424,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 9422,
                      "name": "staker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9395,
                      "src": "6165:6:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                      }
                    },
                    "id": 9423,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "stakedDAI",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 9171,
                    "src": "6165:16:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6143:38:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9429,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9425,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9395,
                        "src": "6255:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9427,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "stakedDAI",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9171,
                      "src": "6255:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9428,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6274:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "6255:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9430,
                  "nodeType": "ExpressionStatement",
                  "src": "6255:20:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9436,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9431,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "6286:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9434,
                          "name": "daiWithdraw",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9421,
                          "src": "6316:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9432,
                          "name": "totalStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9213,
                          "src": "6300:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9433,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21263,
                        "src": "6300:15:29",
                        "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": 9435,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6300:28:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6286:42:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9437,
                  "nodeType": "ExpressionStatement",
                  "src": "6286:42:29"
                },
                {
                  "assignments": [
                    9439
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9439,
                      "name": "daiActual",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "6497:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9438,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6497:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9446,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9443,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22327,
                            "src": "6539:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          ],
                          "id": 9442,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "6531:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9444,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6531:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9440,
                        "name": "dai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9204,
                        "src": "6517:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9441,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21458,
                      "src": "6517:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 9445,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6517:28:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6497:48:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9449,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9447,
                      "name": "daiActual",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9439,
                      "src": "6559:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9448,
                      "name": "daiWithdraw",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9421,
                      "src": "6571:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6559:23:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9455,
                  "nodeType": "IfStatement",
                  "src": "6555:77:29",
                  "trueBody": {
                    "id": 9454,
                    "nodeType": "Block",
                    "src": "6584:48:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 9452,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 9450,
                            "name": "daiWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9421,
                            "src": "6598:11:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 9451,
                            "name": "daiActual",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9439,
                            "src": "6612:9:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6598:23:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9453,
                        "nodeType": "ExpressionStatement",
                        "src": "6598:23:29"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 9459,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22171,
                              "src": "6662:3:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 9460,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "6662:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9461,
                            "name": "daiWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9421,
                            "src": "6674:11:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9457,
                            "name": "dai",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9204,
                            "src": "6649:3:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$21849",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 9458,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21493,
                          "src": "6649:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 9462,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6649:37:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7769746864726177207472616e73666572206661696c6564",
                        "id": 9463,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6688:26:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_58bc929e474c8aeb2e4ca83613053e225f521e498e8deece823d1749bab458d1",
                          "typeString": "literal_string \"withdraw transfer failed\""
                        },
                        "value": "withdraw transfer failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_58bc929e474c8aeb2e4ca83613053e225f521e498e8deece823d1749bab458d1",
                          "typeString": "literal_string \"withdraw transfer failed\""
                        }
                      ],
                      "id": 9456,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "6641:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9464,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6641:74:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9465,
                  "nodeType": "ExpressionStatement",
                  "src": "6641:74:29"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 9467,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 22171,
                          "src": "6747:3:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 9468,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6747:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9469,
                        "name": "daiWithdraw",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9421,
                        "src": "6759:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9470,
                        "name": "daiActual",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9439,
                        "src": "6772:9:29",
                        "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": 9466,
                      "name": "DAIStakeWithdraw",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9192,
                      "src": "6730:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256)"
                      }
                    },
                    "id": 9471,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6730:52:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9472,
                  "nodeType": "EmitStatement",
                  "src": "6725:57:29"
                }
              ]
            },
            "documentation": "@dev Withdraws the sender staked DAI.",
            "id": 9474,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "withdrawStake",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9392,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5926:2:29"
            },
            "returnParameters": {
              "id": 9393,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5936:0:29"
            },
            "scope": 9740,
            "src": "5904:885:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9505,
              "nodeType": "Block",
              "src": "6977:258:29",
              "statements": [
                {
                  "assignments": [
                    9480
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9480,
                      "name": "er",
                      "nodeType": "VariableDeclaration",
                      "scope": 9505,
                      "src": "6987:10:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9479,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6987:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9484,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9481,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "7000:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9482,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "exchangeRateStored",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9143,
                      "src": "7000:23:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 9483,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7000:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6987:38:29"
                },
                {
                  "assignments": [
                    9486
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9486,
                      "name": "daiBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 9505,
                      "src": "7123:18:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9485,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7123:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9502,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "3130",
                        "id": 9500,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7198:2:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10_by_1",
                          "typeString": "int_const 10"
                        },
                        "value": "10"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10_by_1",
                          "typeString": "int_const 10"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "31653130",
                                "id": 9495,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7183:4:29",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_10000000000_by_1",
                                  "typeString": "int_const 10000000000"
                                },
                                "value": "1e10"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_10000000000_by_1",
                                  "typeString": "int_const 10000000000"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 9491,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 22327,
                                        "src": "7172:4:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                          "typeString": "contract SimpleDAIStaking"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                          "typeString": "contract SimpleDAIStaking"
                                        }
                                      ],
                                      "id": 9490,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "7164:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 9492,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "7164:13:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 9488,
                                    "name": "cDai",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9206,
                                    "src": "7149:4:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_cERC20_$9160",
                                      "typeString": "contract cERC20"
                                    }
                                  },
                                  "id": 9489,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "balanceOf",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 9150,
                                  "src": "7149:14:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                    "typeString": "function (address) view external returns (uint256)"
                                  }
                                },
                                "id": 9493,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7149:29:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9494,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "mul",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21215,
                              "src": "7149:33:29",
                              "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": 9496,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7149:39:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9497,
                            "name": "er",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9480,
                            "src": "7190:2:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 9487,
                          "name": "rmul",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 199,
                          "src": "7144:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 9498,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7144:49:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9499,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "div",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21239,
                      "src": "7144:53:29",
                      "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": 9501,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7144:57:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7123:78:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9503,
                    "name": "daiBalance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9486,
                    "src": "7218:10:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 9478,
                  "id": 9504,
                  "nodeType": "Return",
                  "src": "7211:17:29"
                }
              ]
            },
            "documentation": "@dev Calculates the worth of the staked cDAI tokens in DAI.\n@return (uint256) The worth in DAI",
            "id": 9506,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentDAIWorth",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9475,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6944:2:29"
            },
            "returnParameters": {
              "id": 9478,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9477,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9506,
                  "src": "6968:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9476,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6968:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6967:9:29"
            },
            "scope": 9740,
            "src": "6920:315:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9582,
              "nodeType": "Block",
              "src": "7615:870:29",
              "statements": [
                {
                  "assignments": [
                    9516
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9516,
                      "name": "er",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7625:10:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9515,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7625:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9520,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9517,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "7638:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9518,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "exchangeRateStored",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9143,
                      "src": "7638:23:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 9519,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7638:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7625:38:29"
                },
                {
                  "assignments": [
                    9522
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9522,
                      "name": "daiWorth",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7673:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9521,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7673:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9525,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9523,
                      "name": "currentDAIWorth",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9506,
                      "src": "7692:15:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 9524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7692:17:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7673:36:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9528,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9526,
                      "name": "daiWorth",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9522,
                      "src": "7723:8:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9527,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "7735:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7723:23:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9535,
                  "nodeType": "IfStatement",
                  "src": "7719:70:29",
                  "trueBody": {
                    "id": 9534,
                    "nodeType": "Block",
                    "src": "7748:41:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9529,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7770:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9530,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7773:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9531,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7776:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 9532,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "7769:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$_t_rational_0_by_1_$",
                            "typeString": "tuple(int_const 0,int_const 0,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 9514,
                        "id": 9533,
                        "nodeType": "Return",
                        "src": "7762:16:29"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    9537
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9537,
                      "name": "daiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7798:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9536,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7798:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9542,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9540,
                        "name": "totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9213,
                        "src": "7830:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9538,
                        "name": "daiWorth",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9522,
                        "src": "7817:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9539,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sub",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21263,
                      "src": "7817:12:29",
                      "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": 9541,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7817:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7798:44:29"
                },
                {
                  "assignments": [
                    9544
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9544,
                      "name": "cdaiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7984:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9543,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7984:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9552,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31653130",
                            "id": 9548,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8022:4:29",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_10000000000_by_1",
                              "typeString": "int_const 10000000000"
                            },
                            "value": "1e10"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_10000000000_by_1",
                              "typeString": "int_const 10000000000"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9546,
                            "name": "daiGains",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9537,
                            "src": "8009:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9547,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "mul",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21215,
                          "src": "8009:12:29",
                          "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": 9549,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8009:18:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9550,
                        "name": "er",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9516,
                        "src": "8029:2:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9545,
                      "name": "rdiv",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 247,
                      "src": "8004:4:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 9551,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8004:28:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7984:48:29"
                },
                {
                  "assignments": [
                    9554
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9554,
                      "name": "precisionLossCDaiRay",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "8159:28:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9553,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "8159:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9559,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "31653139",
                        "id": 9557,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8204:4:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10000000000000000000_by_1",
                          "typeString": "int_const 10000000000000000000"
                        },
                        "value": "1e19"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10000000000000000000_by_1",
                          "typeString": "int_const 10000000000000000000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9555,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9544,
                        "src": "8190:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9556,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "mod",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21307,
                      "src": "8190:13:29",
                      "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": 9558,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8190:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8159:50:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9565,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9560,
                      "name": "cdaiGains",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9544,
                      "src": "8255:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "31653139",
                          "id": 9563,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8281:4:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_10000000000000000000_by_1",
                            "typeString": "int_const 10000000000000000000"
                          },
                          "value": "1e19"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_10000000000000000000_by_1",
                            "typeString": "int_const 10000000000000000000"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9561,
                          "name": "cdaiGains",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9544,
                          "src": "8267:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9562,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "8267:13:29",
                        "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": 9564,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8267:19:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8255:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9566,
                  "nodeType": "ExpressionStatement",
                  "src": "8255:31:29"
                },
                {
                  "assignments": [
                    9568
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9568,
                      "name": "precisionLossDai",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "8355:24:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9567,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "8355:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9576,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "31653130",
                        "id": 9574,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8417:4:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10000000000_by_1",
                          "typeString": "int_const 10000000000"
                        },
                        "value": "1e10"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10000000000_by_1",
                          "typeString": "int_const 10000000000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9570,
                            "name": "precisionLossCDaiRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9554,
                            "src": "8387:20:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9571,
                            "name": "er",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9516,
                            "src": "8409:2:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 9569,
                          "name": "rmul",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 199,
                          "src": "8382:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 9572,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8382:30:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9573,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "div",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21239,
                      "src": "8382:34:29",
                      "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": 9575,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8382:40:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8355:67:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 9577,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9544,
                        "src": "8440:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9578,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9537,
                        "src": "8451:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9579,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9568,
                        "src": "8461:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 9580,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "8439:39:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                      "typeString": "tuple(uint256,uint256,uint256)"
                    }
                  },
                  "functionReturnParameters": 9514,
                  "id": 9581,
                  "nodeType": "Return",
                  "src": "8432:46:29"
                }
              ]
            },
            "documentation": "@dev Calculates the current interest that was gained.\n@return (uint256, uint256, uint256) The interest in cDAI, the interest in DAI,\nthe amount which is not covered by precision of DAI",
            "id": 9583,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentUBIInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9507,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7490:2:29"
            },
            "returnParameters": {
              "id": 9514,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9509,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7551:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9508,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7551:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9511,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7572:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9510,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7572:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9513,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7593:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9512,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7593:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7537:73:29"
            },
            "scope": 9740,
            "src": "7463:1022:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9656,
              "nodeType": "Block",
              "src": "9087:716:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 9603,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 9599,
                          "name": "_recipient",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9585,
                          "src": "9173:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 9601,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22327,
                              "src": "9195:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                "typeString": "contract SimpleDAIStaking"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                "typeString": "contract SimpleDAIStaking"
                              }
                            ],
                            "id": 9600,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9187:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 9602,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9187:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "9173:27:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526563697069656e742063616e6e6f7420626520746865207374616b696e6720636f6e7472616374",
                        "id": 9604,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9202:42:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b186bec0df383c90e23d5b956c4da2f18dd93ac86eb077c5c0e428a763cbd6fa",
                          "typeString": "literal_string \"Recipient cannot be the staking contract\""
                        },
                        "value": "Recipient cannot be the staking contract"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b186bec0df383c90e23d5b956c4da2f18dd93ac86eb077c5c0e428a763cbd6fa",
                          "typeString": "literal_string \"Recipient cannot be the staking contract\""
                        }
                      ],
                      "id": 9598,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "9165:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9605,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9165:80:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9606,
                  "nodeType": "ExpressionStatement",
                  "src": "9165:80:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 9608,
                          "name": "canCollect",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9671,
                          "src": "9264:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                            "typeString": "function () view returns (bool)"
                          }
                        },
                        "id": 9609,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9264:12:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e65656420746f207761697420666f7220746865206e65787420696e74657276616c",
                        "id": 9610,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9278:36:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b2926b938aae9e3d3391834a8a3f967955ec6bac9d9b401e186c29404478d446",
                          "typeString": "literal_string \"Need to wait for the next interval\""
                        },
                        "value": "Need to wait for the next interval"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b2926b938aae9e3d3391834a8a3f967955ec6bac9d9b401e186c29404478d446",
                          "typeString": "literal_string \"Need to wait for the next interval\""
                        }
                      ],
                      "id": 9607,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "9256:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9611,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9256:59:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9612,
                  "nodeType": "ExpressionStatement",
                  "src": "9256:59:29"
                },
                {
                  "assignments": [
                    9614,
                    9616,
                    9618
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9614,
                      "name": "cdaiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9340:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9613,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9340:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 9616,
                      "name": "daiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9371:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9615,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9371:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 9618,
                      "name": "precisionLossDai",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9401:24:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9617,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9401:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9621,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9619,
                      "name": "currentUBIInterest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9583,
                      "src": "9438:18:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$",
                        "typeString": "function () view returns (uint256,uint256,uint256)"
                      }
                    },
                    "id": 9620,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9438:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                      "typeString": "tuple(uint256,uint256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9326:132:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9628,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9622,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "9468:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9626,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "9505:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9623,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "9488:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9624,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "9488:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9625,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "9488:16:29",
                        "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": 9627,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9488:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9468:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9629,
                  "nodeType": "ExpressionStatement",
                  "src": "9468:51:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9632,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9630,
                      "name": "cdaiGains",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9614,
                      "src": "9533:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9631,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9545:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "9533:13:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9642,
                  "nodeType": "IfStatement",
                  "src": "9529:103:29",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 9636,
                              "name": "_recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9585,
                              "src": "9582:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 9637,
                              "name": "cdaiGains",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9614,
                              "src": "9594:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9634,
                              "name": "cDai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9206,
                              "src": "9568:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_cERC20_$9160",
                                "typeString": "contract cERC20"
                              }
                            },
                            "id": 9635,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9159,
                            "src": "9568:13:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 9638,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9568:36:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "636f6c6c656374207472616e73666572206661696c6564",
                          "id": 9639,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9606:25:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_c955f53632207d8104a997da6e051a24feef1c53c0972ac3af4bdda83f5d190e",
                            "typeString": "literal_string \"collect transfer failed\""
                          },
                          "value": "collect transfer failed"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          {
                            "typeIdentifier": "t_stringliteral_c955f53632207d8104a997da6e051a24feef1c53c0972ac3af4bdda83f5d190e",
                            "typeString": "literal_string \"collect transfer failed\""
                          }
                        ],
                        "id": 9633,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          22174,
                          22175
                        ],
                        "referencedDeclaration": 22175,
                        "src": "9560:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                          "typeString": "function (bool,string memory) pure"
                        }
                      },
                      "id": 9640,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9560:72:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 9641,
                    "nodeType": "ExpressionStatement",
                    "src": "9560:72:29"
                  }
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9644,
                        "name": "_recipient",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9585,
                        "src": "9665:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9645,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9614,
                        "src": "9677:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9646,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9616,
                        "src": "9688:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9647,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9618,
                        "src": "9698:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9643,
                      "name": "InterestCollected",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9202,
                      "src": "9647:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256,uint256)"
                      }
                    },
                    "id": 9648,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9647:68:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9649,
                  "nodeType": "EmitStatement",
                  "src": "9642:73:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 9650,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9614,
                        "src": "9733:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9651,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9616,
                        "src": "9744:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9652,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9618,
                        "src": "9754:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9653,
                        "name": "avgInterestDonatedRatio",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9216,
                        "src": "9772:23:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "id": 9654,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "9732:64:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint32_$",
                      "typeString": "tuple(uint256,uint256,uint256,uint32)"
                    }
                  },
                  "functionReturnParameters": 9597,
                  "id": 9655,
                  "nodeType": "Return",
                  "src": "9725:71:29"
                }
              ]
            },
            "documentation": "@dev Collects gained interest by fundmanager. Can be collected only once\nin an interval which is defined above.\n@param _recipient The recipient of cDAI gains\n@return (uint256, uint256, uint256, uint32) The interest in cDAI, the interest in DAI,\nthe amount which is not covered by precision of DAI, how much of the generated interest is donated",
            "id": 9657,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9588,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9587,
                  "name": "onlyFundManager",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 9230,
                  "src": "8957:15:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "8957:15:29"
              }
            ],
            "name": "collectUBIInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9586,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9585,
                  "name": "_recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "8914:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9584,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8914:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8913:20:29"
            },
            "returnParameters": {
              "id": 9597,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9590,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9003:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9589,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9003:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9592,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9024:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9591,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9024:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9594,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9045:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9593,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9045:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9596,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9066:6:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 9595,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "9066:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8989:93:29"
            },
            "scope": 9740,
            "src": "8886:917:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9670,
              "nodeType": "Block",
              "src": "10084:75:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9668,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9665,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "10118:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9662,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "10101:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9663,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "10101:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9664,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "10101:16:29",
                        "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": 9666,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10101:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9667,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "10135:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "10101:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 9661,
                  "id": 9669,
                  "nodeType": "Return",
                  "src": "10094:58:29"
                }
              ]
            },
            "documentation": "@dev Checks if enough blocks have passed so it would be possible to\nexecute `collectUBIInterest` according to the length of `blockInterval`\n@return (bool) True if enough blocks have passed",
            "id": 9671,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "canCollect",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9658,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10054:2:29"
            },
            "returnParameters": {
              "id": 9661,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9660,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9671,
                  "src": "10078:4:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9659,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "10078:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10077:6:29"
            },
            "scope": 9740,
            "src": "10035:124:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9679,
              "nodeType": "Block",
              "src": "10350:28:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9676,
                      "name": "addRights",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1203,
                      "src": "10360:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9677,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10360:11:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9678,
                  "nodeType": "ExpressionStatement",
                  "src": "10360:11:29"
                }
              ]
            },
            "documentation": "@dev Start function. Adds this contract to identity as a feeless scheme.\nCan only be called if scheme is registered",
            "id": 9680,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9674,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9673,
                  "name": "onlyRegistered",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1335,
                  "src": "10335:14:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10335:14:29"
              }
            ],
            "name": "start",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9672,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10325:2:29"
            },
            "returnParameters": {
              "id": 9675,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10350:0:29"
            },
            "scope": 9740,
            "src": "10311:67:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9691,
              "nodeType": "Block",
              "src": "10643:48:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9685,
                      "name": "pause",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 21093,
                      "src": "10653:5:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9686,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10653:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9687,
                  "nodeType": "ExpressionStatement",
                  "src": "10653:7:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9688,
                      "name": "removeRights",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1226,
                      "src": "10670:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9689,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10670:14:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9690,
                  "nodeType": "ExpressionStatement",
                  "src": "10670:14:29"
                }
              ]
            },
            "documentation": "@dev making the contract inactive\nNOTICE: this could theoretically result in future interest earned in cdai to remain locked\nbut we dont expect any other stakers but us in SimpleDAIStaking",
            "id": 9692,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9683,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9682,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "10632:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10632:10:29"
              }
            ],
            "name": "end",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9681,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10622:2:29"
            },
            "returnParameters": {
              "id": 9684,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10643:0:29"
            },
            "scope": 9740,
            "src": "10610:81:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9738,
              "nodeType": "Block",
              "src": "10883:457:29",
              "statements": [
                {
                  "assignments": [
                    9700
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9700,
                      "name": "toWithdraw",
                      "nodeType": "VariableDeclaration",
                      "scope": 9738,
                      "src": "10893:18:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9699,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "10893:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9707,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9704,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22327,
                            "src": "10939:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          ],
                          "id": 9703,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "10931:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9705,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "10931:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9701,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9694,
                        "src": "10914:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9702,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21458,
                      "src": "10914:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 9706,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10914:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10893:52:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 9714,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9709,
                          "name": "_token",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9694,
                          "src": "11053:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ERC20_$21849",
                            "typeString": "contract ERC20"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_ERC20_$21849",
                            "typeString": "contract ERC20"
                          }
                        ],
                        "id": 9708,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "11045:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 9710,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "11045:15:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9712,
                          "name": "cDai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9206,
                          "src": "11072:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_cERC20_$9160",
                            "typeString": "contract cERC20"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_cERC20_$9160",
                            "typeString": "contract cERC20"
                          }
                        ],
                        "id": 9711,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "11064:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 9713,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "11064:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "11045:32:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9726,
                  "nodeType": "IfStatement",
                  "src": "11041:203:29",
                  "trueBody": {
                    "id": 9725,
                    "nodeType": "Block",
                    "src": "11079:165:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 9721,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 9718,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 9716,
                                  "name": "totalStaked",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9213,
                                  "src": "11118:11:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 9717,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "11133:1:29",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "11118:16:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 9719,
                                  "name": "paused",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21059,
                                  "src": "11138:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                                    "typeString": "function () view returns (bool)"
                                  }
                                },
                                "id": 9720,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11138:8:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "11118:28:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "63616e207265636f7665722063446169206f6e6c79207768656e207374616b65732068617665206265656e2077697468647261776e",
                              "id": 9722,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11164:55:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_79607305dd51ed20c601fc68ead0738527c2757f2ece05378363c3502b2aaa0c",
                                "typeString": "literal_string \"can recover cDai only when stakes have been withdrawn\""
                              },
                              "value": "can recover cDai only when stakes have been withdrawn"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_79607305dd51ed20c601fc68ead0738527c2757f2ece05378363c3502b2aaa0c",
                                "typeString": "literal_string \"can recover cDai only when stakes have been withdrawn\""
                              }
                            ],
                            "id": 9715,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              22174,
                              22175
                            ],
                            "referencedDeclaration": 22175,
                            "src": "11093:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 9723,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11093:140:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9724,
                        "nodeType": "ExpressionStatement",
                        "src": "11093:140:29"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 9731,
                                "name": "avatar",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1281,
                                "src": "11285:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Avatar_$12705",
                                  "typeString": "contract Avatar"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_Avatar_$12705",
                                  "typeString": "contract Avatar"
                                }
                              ],
                              "id": 9730,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "11277:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": "address"
                            },
                            "id": 9732,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11277:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9733,
                            "name": "toWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9700,
                            "src": "11294:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9728,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9694,
                            "src": "11261:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$21849",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 9729,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21493,
                          "src": "11261:15:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 9734,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "11261:44:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7265636f766572207472616e73666572206661696c6564",
                        "id": 9735,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11307:25:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_41a03013a5674cc54e9badb52c47e3c4670bc54fa0765e5276b5118633f8aeb3",
                          "typeString": "literal_string \"recover transfer failed\""
                        },
                        "value": "recover transfer failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_41a03013a5674cc54e9badb52c47e3c4670bc54fa0765e5276b5118633f8aeb3",
                          "typeString": "literal_string \"recover transfer failed\""
                        }
                      ],
                      "id": 9727,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "11253:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11253:80:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9737,
                  "nodeType": "ExpressionStatement",
                  "src": "11253:80:29"
                }
              ]
            },
            "documentation": "@dev method to recover any stuck erc20 tokens (ie  compound COMP)\n@param _token the ERC20 token to recover",
            "id": 9739,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9697,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9696,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "10872:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10872:10:29"
              }
            ],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9695,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9694,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 9739,
                  "src": "10851:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$21849",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9693,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21849,
                    "src": "10851:5:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$21849",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10850:14:29"
            },
            "returnParameters": {
              "id": 9698,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10883:0:29"
            },
            "scope": 9740,
            "src": "10834:506:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 9741,
        "src": "1073:10269:29"
      }
    ],
    "src": "0:11343:29"
  },
  "legacyAST": {
    "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/stakingModel/contracts/SimpleDAIStaking.sol",
    "exportedSymbols": {
      "SimpleDAIStaking": [
        9740
      ],
      "cERC20": [
        9160
      ]
    },
    "id": 9741,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 9112,
        "literals": [
          "solidity",
          ">",
          "0.5",
          ".4"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:29"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
        "id": 9113,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21309,
        "src": "25:59:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
        "file": "openzeppelin-solidity/contracts/lifecycle/Pausable.sol",
        "id": 9114,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21112,
        "src": "85:64:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 9115,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 21850,
        "src": "150:63:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@daostack/arc/contracts/controller/Avatar.sol",
        "file": "@daostack/arc/contracts/controller/Avatar.sol",
        "id": 9116,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 12706,
        "src": "214:55:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/schemes/FeelessScheme.sol",
        "file": "../../contracts/dao/schemes/FeelessScheme.sol",
        "id": 9117,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 1228,
        "src": "270:55:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/identity/Identity.sol",
        "file": "../../contracts/identity/Identity.sol",
        "id": 9118,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 2381,
        "src": "326:47:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/DSMath.sol",
        "file": "../../contracts/DSMath.sol",
        "id": 9119,
        "nodeType": "ImportDirective",
        "scope": 9741,
        "sourceUnit": 304,
        "src": "374:36:29",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": null,
        "fullyImplemented": false,
        "id": 9160,
        "linearizedBaseContracts": [
          9160
        ],
        "name": "cERC20",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": null,
            "id": 9126,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mint",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9122,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9121,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9126,
                  "src": "449:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9120,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "449:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "448:20:29"
            },
            "returnParameters": {
              "id": 9125,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9124,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9126,
                  "src": "487:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9123,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "487:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "486:9:29"
            },
            "scope": 9160,
            "src": "435:61:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9133,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemUnderlying",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9129,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9128,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9133,
                  "src": "528:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9127,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "528:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "527:20:29"
            },
            "returnParameters": {
              "id": 9132,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9131,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9133,
                  "src": "566:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9130,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "566:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "565:9:29"
            },
            "scope": 9160,
            "src": "502:73:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9138,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "exchangeRateCurrent",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9134,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "609:2:29"
            },
            "returnParameters": {
              "id": 9137,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9136,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9138,
                  "src": "630:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9135,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "630:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "629:9:29"
            },
            "scope": 9160,
            "src": "581:58:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9143,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "exchangeRateStored",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9139,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "672:2:29"
            },
            "returnParameters": {
              "id": 9142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9143,
                  "src": "698:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9140,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "698:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "697:9:29"
            },
            "scope": 9160,
            "src": "645:62:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9150,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "balanceOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9146,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9145,
                  "name": "addr",
                  "nodeType": "VariableDeclaration",
                  "scope": 9150,
                  "src": "732:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9144,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "732:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "731:14:29"
            },
            "returnParameters": {
              "id": 9149,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9148,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9150,
                  "src": "769:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9147,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "769:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "768:9:29"
            },
            "scope": 9160,
            "src": "713:65:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": null,
            "id": 9159,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9155,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9152,
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "802:10:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9151,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "802:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9154,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "814:14:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9153,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "814:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "801:28:29"
            },
            "returnParameters": {
              "id": 9158,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9157,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9159,
                  "src": "848:4:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9156,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "848:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "847:6:29"
            },
            "scope": 9160,
            "src": "784:70:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 9741,
        "src": "412:444:29"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9161,
              "name": "DSMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 303,
              "src": "1102:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_DSMath_$303",
                "typeString": "contract DSMath"
              }
            },
            "id": 9162,
            "nodeType": "InheritanceSpecifier",
            "src": "1102:6:29"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9163,
              "name": "Pausable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21111,
              "src": "1110:8:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Pausable_$21111",
                "typeString": "contract Pausable"
              }
            },
            "id": 9164,
            "nodeType": "InheritanceSpecifier",
            "src": "1110:8:29"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 9165,
              "name": "FeelessScheme",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1227,
              "src": "1120:13:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_FeelessScheme_$1227",
                "typeString": "contract FeelessScheme"
              }
            },
            "id": 9166,
            "nodeType": "InheritanceSpecifier",
            "src": "1120:13:29"
          }
        ],
        "contractDependencies": [
          303,
          1227,
          1423,
          2667,
          20947,
          21111,
          21417
        ],
        "contractKind": "contract",
        "documentation": "@title Staking contract that donates earned interest to the DAO\nallowing stakers to deposit DAI or withdraw their stake in DAI.\nThe contract buys cDAI and can transfer the daily interest to the DAO",
        "fullyImplemented": true,
        "id": 9740,
        "linearizedBaseContracts": [
          9740,
          1227,
          2667,
          1423,
          21417,
          21111,
          20947,
          303
        ],
        "name": "SimpleDAIStaking",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 9169,
            "libraryName": {
              "contractScope": null,
              "id": 9167,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21308,
              "src": "1146:8:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$21308",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1140:27:29",
            "typeName": {
              "id": 9168,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1159:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "canonicalName": "SimpleDAIStaking.Staker",
            "id": 9174,
            "members": [
              {
                "constant": false,
                "id": 9171,
                "name": "stakedDAI",
                "nodeType": "VariableDeclaration",
                "scope": 9174,
                "src": "1269:17:29",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 9170,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1269:7:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 9173,
                "name": "lastStake",
                "nodeType": "VariableDeclaration",
                "scope": 9174,
                "src": "1377:17:29",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 9172,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1377:7:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "Staker",
            "nodeType": "StructDefinition",
            "scope": 9740,
            "src": "1212:189:29",
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9178,
            "name": "stakers",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "1455:41:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
              "typeString": "mapping(address => struct SimpleDAIStaking.Staker)"
            },
            "typeName": {
              "id": 9177,
              "keyType": {
                "id": 9175,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "1463:7:29",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "1455:26:29",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                "typeString": "mapping(address => struct SimpleDAIStaking.Staker)"
              },
              "valueType": {
                "contractScope": null,
                "id": 9176,
                "name": "Staker",
                "nodeType": "UserDefinedTypeName",
                "referencedDeclaration": 9174,
                "src": "1474:6:29",
                "typeDescriptions": {
                  "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                  "typeString": "struct SimpleDAIStaking.Staker"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9184,
            "name": "DAIStaked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9183,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9180,
                  "indexed": true,
                  "name": "staker",
                  "nodeType": "VariableDeclaration",
                  "scope": 9184,
                  "src": "1608:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1608:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9182,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9184,
                  "src": "1684:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9181,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1684:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1568:138:29"
            },
            "src": "1553:154:29"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9192,
            "name": "DAIStakeWithdraw",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9186,
                  "indexed": true,
                  "name": "staker",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1841:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9185,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1841:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9188,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1922:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9187,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1922:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9190,
                  "indexed": false,
                  "name": "daiActual",
                  "nodeType": "VariableDeclaration",
                  "scope": 9192,
                  "src": "1997:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9189,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1997:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1784:236:29"
            },
            "src": "1762:259:29"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 9202,
            "name": "InterestCollected",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 9201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9194,
                  "indexed": false,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2144:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9193,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2144:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9196,
                  "indexed": false,
                  "name": "cdaiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2225:17:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9195,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2225:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9198,
                  "indexed": false,
                  "name": "daiValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2306:16:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9197,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2306:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9200,
                  "indexed": false,
                  "name": "daiPrecisionLoss",
                  "nodeType": "VariableDeclaration",
                  "scope": 9202,
                  "src": "2389:24:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9199,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2389:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2094:325:29"
            },
            "src": "2071:349:29"
          },
          {
            "constant": false,
            "id": 9204,
            "name": "dai",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2451:16:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_ERC20_$21849",
              "typeString": "contract ERC20"
            },
            "typeName": {
              "contractScope": null,
              "id": 9203,
              "name": "ERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 21849,
              "src": "2451:5:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ERC20_$21849",
                "typeString": "contract ERC20"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9206,
            "name": "cDai",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2500:18:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_cERC20_$9160",
              "typeString": "contract cERC20"
            },
            "typeName": {
              "contractScope": null,
              "id": 9205,
              "name": "cERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 9160,
              "src": "2500:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_cERC20_$9160",
                "typeString": "contract cERC20"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9208,
            "name": "blockInterval",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2665:28:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9207,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2665:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9210,
            "name": "lastUBICollection",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2784:32:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9209,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2784:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9213,
            "name": "totalStaked",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "2874:30:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 9211,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "2874:7:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "30",
              "id": 9212,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "2903:1:29",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_0_by_1",
                "typeString": "int_const 0"
              },
              "value": "0"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9216,
            "name": "avgInterestDonatedRatio",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "3062:43:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint32",
              "typeString": "uint32"
            },
            "typeName": {
              "id": 9214,
              "name": "uint32",
              "nodeType": "ElementaryTypeName",
              "src": "3062:6:29",
              "typeDescriptions": {
                "typeIdentifier": "t_uint32",
                "typeString": "uint32"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "316536",
              "id": 9215,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "3102:3:29",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1e6"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 9218,
            "name": "fundManager",
            "nodeType": "VariableDeclaration",
            "scope": 9740,
            "src": "3160:26:29",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 9217,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "3160:7:29",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9229,
              "nodeType": "Block",
              "src": "3218:103:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 9224,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9221,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22171,
                            "src": "3236:3:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 9222,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3236:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 9223,
                          "name": "fundManager",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9218,
                          "src": "3250:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "3236:25:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4f6e6c792046756e644d616e616765722063616e2063616c6c2074686973206d6574686f64",
                        "id": 9225,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3263:39:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8659903c14beb1decb5cde807aae2b42823801f7a2ec9f1cb2d42f84ff652fab",
                          "typeString": "literal_string \"Only FundManager can call this method\""
                        },
                        "value": "Only FundManager can call this method"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8659903c14beb1decb5cde807aae2b42823801f7a2ec9f1cb2d42f84ff652fab",
                          "typeString": "literal_string \"Only FundManager can call this method\""
                        }
                      ],
                      "id": 9220,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "3228:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9226,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3228:75:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9227,
                  "nodeType": "ExpressionStatement",
                  "src": "3228:75:29"
                },
                {
                  "id": 9228,
                  "nodeType": "PlaceholderStatement",
                  "src": "3313:1:29"
                }
              ]
            },
            "documentation": null,
            "id": 9230,
            "name": "onlyFundManager",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 9219,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3218:0:29"
            },
            "src": "3193:128:29",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9283,
              "nodeType": "Block",
              "src": "3933:294:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9253,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9249,
                      "name": "dai",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9204,
                      "src": "3943:3:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ERC20_$21849",
                        "typeString": "contract ERC20"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9251,
                          "name": "_dai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9232,
                          "src": "3955:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 9250,
                        "name": "ERC20",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 21849,
                        "src": "3949:5:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_ERC20_$21849_$",
                          "typeString": "type(contract ERC20)"
                        }
                      },
                      "id": 9252,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3949:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ERC20_$21849",
                        "typeString": "contract ERC20"
                      }
                    },
                    "src": "3943:17:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$21849",
                      "typeString": "contract ERC20"
                    }
                  },
                  "id": 9254,
                  "nodeType": "ExpressionStatement",
                  "src": "3943:17:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9259,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9255,
                      "name": "cDai",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9206,
                      "src": "3970:4:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_cERC20_$9160",
                        "typeString": "contract cERC20"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9257,
                          "name": "_cDai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9234,
                          "src": "3984:5:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 9256,
                        "name": "cERC20",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9160,
                        "src": "3977:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_cERC20_$9160_$",
                          "typeString": "type(contract cERC20)"
                        }
                      },
                      "id": 9258,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3977:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_cERC20_$9160",
                        "typeString": "contract cERC20"
                      }
                    },
                    "src": "3970:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_cERC20_$9160",
                      "typeString": "contract cERC20"
                    }
                  },
                  "id": 9260,
                  "nodeType": "ExpressionStatement",
                  "src": "3970:20:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9263,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9261,
                      "name": "blockInterval",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9208,
                      "src": "4000:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9262,
                      "name": "_blockInterval",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9238,
                      "src": "4016:14:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4000:30:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9264,
                  "nodeType": "ExpressionStatement",
                  "src": "4000:30:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9265,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "4040:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9269,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "4077:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9266,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "4060:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9267,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "4060:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9268,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "4060:16:29",
                        "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": 9270,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4060:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4040:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9272,
                  "nodeType": "ExpressionStatement",
                  "src": "4040:51:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9275,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9273,
                      "name": "fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9218,
                      "src": "4101:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9274,
                      "name": "_fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9236,
                      "src": "4115:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "4101:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 9276,
                  "nodeType": "ExpressionStatement",
                  "src": "4101:26:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9279,
                            "name": "avatar",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1281,
                            "src": "4212:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Avatar_$12705",
                              "typeString": "contract Avatar"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_Avatar_$12705",
                              "typeString": "contract Avatar"
                            }
                          ],
                          "id": 9278,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4204:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9280,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4204:15:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "id": 9277,
                      "name": "addPauser",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 20905,
                      "src": "4194:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 9281,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4194:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9282,
                  "nodeType": "ExpressionStatement",
                  "src": "4194:26:29"
                }
              ]
            },
            "documentation": "@dev Constructor\n@param _dai The address of DAI\n@param _cDai The address of cDAI\n@param _fundManager The address of the fund manager contract\n@param _blockInterval How many blocks should be passed before the next execution of `collectUBIInterest`\n@param _avatar The avatar of the DAO\n@param _identity The identity contract",
            "id": 9284,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 9245,
                    "name": "_identity",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9242,
                    "src": "3913:9:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Identity_$2380",
                      "typeString": "contract Identity"
                    }
                  },
                  {
                    "argumentTypes": null,
                    "id": 9246,
                    "name": "_avatar",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9240,
                    "src": "3924:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  }
                ],
                "id": 9247,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9244,
                  "name": "FeelessScheme",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1227,
                  "src": "3899:13:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_FeelessScheme_$1227_$",
                    "typeString": "type(contract FeelessScheme)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3899:33:29"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9243,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9232,
                  "name": "_dai",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3736:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9231,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3736:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9234,
                  "name": "_cDai",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3758:13:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9233,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3758:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9236,
                  "name": "_fundManager",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3781:20:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9235,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3781:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9238,
                  "name": "_blockInterval",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3811:22:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9237,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3811:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9240,
                  "name": "_avatar",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3843:14:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Avatar_$12705",
                    "typeString": "contract Avatar"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9239,
                    "name": "Avatar",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 12705,
                    "src": "3843:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Avatar_$12705",
                      "typeString": "contract Avatar"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9242,
                  "name": "_identity",
                  "nodeType": "VariableDeclaration",
                  "scope": 9284,
                  "src": "3867:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Identity_$2380",
                    "typeString": "contract Identity"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9241,
                    "name": "Identity",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2380,
                    "src": "3867:8:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Identity_$2380",
                      "typeString": "contract Identity"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3726:165:29"
            },
            "returnParameters": {
              "id": 9248,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3933:0:29"
            },
            "scope": 9740,
            "src": "3715:512:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9295,
              "nodeType": "Block",
              "src": "4439:43:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9293,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9291,
                      "name": "fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9218,
                      "src": "4449:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 9292,
                      "name": "_fundManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9286,
                      "src": "4463:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "4449:26:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 9294,
                  "nodeType": "ExpressionStatement",
                  "src": "4449:26:29"
                }
              ]
            },
            "documentation": "@dev Allows the DAO to change the fund manager contract address\n@param _fundManager Address of the new contract",
            "id": 9296,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9289,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9288,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "4428:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4428:10:29"
              }
            ],
            "name": "setFundManager",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9287,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9286,
                  "name": "_fundManager",
                  "nodeType": "VariableDeclaration",
                  "scope": 9296,
                  "src": "4399:20:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9285,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4399:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4398:22:29"
            },
            "returnParameters": {
              "id": 9290,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4439:0:29"
            },
            "scope": 9740,
            "src": "4375:107:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9390,
              "nodeType": "Block",
              "src": "4812:1025:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9306,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 9304,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "4830:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9305,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4840:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4830:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "596f75206e65656420746f207374616b65206120706f73697469766520746f6b656e20616d6f756e74",
                        "id": 9307,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4843:43:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_0df2c7e58c395cb8df3c21ef84be33d1d8ff5cbf2a8b2cf1fa7931eeed13da62",
                          "typeString": "literal_string \"You need to stake a positive token amount\""
                        },
                        "value": "You need to stake a positive token amount"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_0df2c7e58c395cb8df3c21ef84be33d1d8ff5cbf2a8b2cf1fa7931eeed13da62",
                          "typeString": "literal_string \"You need to stake a positive token amount\""
                        }
                      ],
                      "id": 9303,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "4822:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9308,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4822:65:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9309,
                  "nodeType": "ExpressionStatement",
                  "src": "4822:65:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 9321,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 9313,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 22171,
                                "src": "4935:3:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 9314,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4935:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 9316,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 22327,
                                  "src": "4955:4:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                    "typeString": "contract SimpleDAIStaking"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                    "typeString": "contract SimpleDAIStaking"
                                  }
                                ],
                                "id": 9315,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4947:7:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 9317,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4947:13:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 9318,
                              "name": "_amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9298,
                              "src": "4962:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9311,
                              "name": "dai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9204,
                              "src": "4918:3:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$21849",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 9312,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 21578,
                            "src": "4918:16:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 9319,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4918:52:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 9320,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4974:4:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "src": "4918:60:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7472616e7366657246726f6d206661696c65642c206d616b65207375726520796f7520617070726f76656420444149207472616e73666572",
                        "id": 9322,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4992:58:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_ee07915d88e147dbd0474d1f4b7dd5b98a6778f07e832106ffd695a46b406d6e",
                          "typeString": "literal_string \"transferFrom failed, make sure you approved DAI transfer\""
                        },
                        "value": "transferFrom failed, make sure you approved DAI transfer"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_ee07915d88e147dbd0474d1f4b7dd5b98a6778f07e832106ffd695a46b406d6e",
                          "typeString": "literal_string \"transferFrom failed, make sure you approved DAI transfer\""
                        }
                      ],
                      "id": 9310,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "4897:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9323,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4897:163:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9324,
                  "nodeType": "ExpressionStatement",
                  "src": "4897:163:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9329,
                            "name": "cDai",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9206,
                            "src": "5131:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_cERC20_$9160",
                              "typeString": "contract cERC20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_cERC20_$9160",
                              "typeString": "contract cERC20"
                            }
                          ],
                          "id": 9328,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5123:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9330,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5123:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9331,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5138:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9325,
                        "name": "dai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9204,
                        "src": "5111:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9327,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21529,
                      "src": "5111:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 9332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5111:35:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9333,
                  "nodeType": "ExpressionStatement",
                  "src": "5111:35:29"
                },
                {
                  "assignments": [
                    9335
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9335,
                      "name": "res",
                      "nodeType": "VariableDeclaration",
                      "scope": 9390,
                      "src": "5181:11:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9334,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5181:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9340,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9338,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5205:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9336,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "5195:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9337,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "mint",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9126,
                      "src": "5195:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) external returns (uint256)"
                      }
                    },
                    "id": 9339,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5195:18:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5181:32:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9343,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9341,
                      "name": "res",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9335,
                      "src": "5402:3:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9342,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "5408:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "5402:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9352,
                  "nodeType": "IfStatement",
                  "src": "5398:94:29",
                  "trueBody": {
                    "id": 9351,
                    "nodeType": "Block",
                    "src": "5411:81:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 9347,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 9345,
                                "name": "res",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9335,
                                "src": "5433:3:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "==",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 9346,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5440:1:29",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              "src": "5433:8:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4d696e74696e672063446169206661696c65642c2066756e64732072657475726e6564",
                              "id": 9348,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5443:37:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_9fba825e72dafc705b289a19c5027021048dd7f2ebe3c823d265b59e8a41b98f",
                                "typeString": "literal_string \"Minting cDai failed, funds returned\""
                              },
                              "value": "Minting cDai failed, funds returned"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_9fba825e72dafc705b289a19c5027021048dd7f2ebe3c823d265b59e8a41b98f",
                                "typeString": "literal_string \"Minting cDai failed, funds returned\""
                              }
                            ],
                            "id": 9344,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              22174,
                              22175
                            ],
                            "referencedDeclaration": 22175,
                            "src": "5425:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 9349,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5425:56:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9350,
                        "nodeType": "ExpressionStatement",
                        "src": "5425:56:29"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    9354
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9354,
                      "name": "staker",
                      "nodeType": "VariableDeclaration",
                      "scope": 9390,
                      "src": "5539:21:29",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 9353,
                        "name": "Staker",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 9174,
                        "src": "5539:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9359,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 9355,
                      "name": "stakers",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9178,
                      "src": "5563:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                        "typeString": "mapping(address => struct SimpleDAIStaking.Staker storage ref)"
                      }
                    },
                    "id": 9358,
                    "indexExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9356,
                        "name": "msg",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22171,
                        "src": "5571:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_message",
                          "typeString": "msg"
                        }
                      },
                      "id": 9357,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sender",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5571:10:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5563:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Staker_$9174_storage",
                      "typeString": "struct SimpleDAIStaking.Staker storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5539:43:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9368,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9360,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9354,
                        "src": "5592:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9362,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "stakedDAI",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9171,
                      "src": "5592:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9366,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "5632:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9363,
                            "name": "staker",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9354,
                            "src": "5611:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                              "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                            }
                          },
                          "id": 9364,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "stakedDAI",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 9171,
                          "src": "5611:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9365,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21287,
                        "src": "5611:20:29",
                        "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": 9367,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5611:29:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5592:48:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9369,
                  "nodeType": "ExpressionStatement",
                  "src": "5592:48:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9375,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9370,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9354,
                        "src": "5650:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9372,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "lastStake",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9173,
                      "src": "5650:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9373,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22161,
                        "src": "5669:5:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 9374,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5669:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5650:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9376,
                  "nodeType": "ExpressionStatement",
                  "src": "5650:31:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9382,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9377,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "5746:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9380,
                          "name": "_amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9298,
                          "src": "5776:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9378,
                          "name": "totalStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9213,
                          "src": "5760:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9379,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21287,
                        "src": "5760:15:29",
                        "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": 9381,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5760:24:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5746:38:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9383,
                  "nodeType": "ExpressionStatement",
                  "src": "5746:38:29"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 9385,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 22171,
                          "src": "5810:3:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 9386,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5810:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9387,
                        "name": "_amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9298,
                        "src": "5822:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9384,
                      "name": "DAIStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9184,
                      "src": "5800:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 9388,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5800:30:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9389,
                  "nodeType": "EmitStatement",
                  "src": "5795:35:29"
                }
              ]
            },
            "documentation": "@dev Allows a staker to deposit DAI tokens. Notice that `approve` is\nneeded to be executed before the execution of this method.\nCan be executed only when the contract is not paused.\n@param _amount The amount of DAI to stake",
            "id": 9391,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9301,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9300,
                  "name": "whenNotPaused",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 21068,
                  "src": "4798:13:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4798:13:29"
              }
            ],
            "name": "stakeDAI",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9299,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9298,
                  "name": "_amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 9391,
                  "src": "4774:15:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9297,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4774:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4773:17:29"
            },
            "returnParameters": {
              "id": 9302,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4812:0:29"
            },
            "scope": 9740,
            "src": "4756:1081:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9473,
              "nodeType": "Block",
              "src": "5936:853:29",
              "statements": [
                {
                  "assignments": [
                    9395
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9395,
                      "name": "staker",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "5946:21:29",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 9394,
                        "name": "Staker",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 9174,
                        "src": "5946:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9400,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 9396,
                      "name": "stakers",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9178,
                      "src": "5970:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Staker_$9174_storage_$",
                        "typeString": "mapping(address => struct SimpleDAIStaking.Staker storage ref)"
                      }
                    },
                    "id": 9399,
                    "indexExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9397,
                        "name": "msg",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 22171,
                        "src": "5978:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_message",
                          "typeString": "msg"
                        }
                      },
                      "id": 9398,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sender",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "5978:10:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5970:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Staker_$9174_storage",
                      "typeString": "struct SimpleDAIStaking.Staker storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5946:43:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9405,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9402,
                            "name": "staker",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9395,
                            "src": "6007:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                              "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                            }
                          },
                          "id": 9403,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "stakedDAI",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 9171,
                          "src": "6007:16:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9404,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6026:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6007:20:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e6f20444149207374616b6564",
                        "id": 9406,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6029:15:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c7a1c4dcae14020a6de4ccb28b8861c795f9958e1fbdb2ab0fb5dc5d25e10738",
                          "typeString": "literal_string \"No DAI staked\""
                        },
                        "value": "No DAI staked"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c7a1c4dcae14020a6de4ccb28b8861c795f9958e1fbdb2ab0fb5dc5d25e10738",
                          "typeString": "literal_string \"No DAI staked\""
                        }
                      ],
                      "id": 9401,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "5999:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9407,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5999:46:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9408,
                  "nodeType": "ExpressionStatement",
                  "src": "5999:46:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9416,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 9412,
                                "name": "staker",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9395,
                                "src": "6085:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                                  "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                                }
                              },
                              "id": 9413,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "stakedDAI",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 9171,
                              "src": "6085:16:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9410,
                              "name": "cDai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9206,
                              "src": "6063:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_cERC20_$9160",
                                "typeString": "contract cERC20"
                              }
                            },
                            "id": 9411,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "redeemUnderlying",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9133,
                            "src": "6063:21:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256) external returns (uint256)"
                            }
                          },
                          "id": 9414,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6063:39:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 9415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6106:1:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6063:44:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4661696c656420746f2072656465656d2063446169",
                        "id": 9417,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6109:23:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_1f647a2f625cf3b1ea4c7844befd4fe6574e2c7464224cfadaec07f3918cd8a2",
                          "typeString": "literal_string \"Failed to redeem cDai\""
                        },
                        "value": "Failed to redeem cDai"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_1f647a2f625cf3b1ea4c7844befd4fe6574e2c7464224cfadaec07f3918cd8a2",
                          "typeString": "literal_string \"Failed to redeem cDai\""
                        }
                      ],
                      "id": 9409,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "6055:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9418,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6055:78:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9419,
                  "nodeType": "ExpressionStatement",
                  "src": "6055:78:29"
                },
                {
                  "assignments": [
                    9421
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9421,
                      "name": "daiWithdraw",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "6143:19:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9420,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6143:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9424,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 9422,
                      "name": "staker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9395,
                      "src": "6165:6:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                        "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                      }
                    },
                    "id": 9423,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "stakedDAI",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 9171,
                    "src": "6165:16:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6143:38:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9429,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 9425,
                        "name": "staker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9395,
                        "src": "6255:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Staker_$9174_storage_ptr",
                          "typeString": "struct SimpleDAIStaking.Staker storage pointer"
                        }
                      },
                      "id": 9427,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "stakedDAI",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9171,
                      "src": "6255:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9428,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6274:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "6255:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9430,
                  "nodeType": "ExpressionStatement",
                  "src": "6255:20:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9436,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9431,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "6286:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9434,
                          "name": "daiWithdraw",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9421,
                          "src": "6316:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9432,
                          "name": "totalStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9213,
                          "src": "6300:11:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9433,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21263,
                        "src": "6300:15:29",
                        "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": 9435,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6300:28:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6286:42:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9437,
                  "nodeType": "ExpressionStatement",
                  "src": "6286:42:29"
                },
                {
                  "assignments": [
                    9439
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9439,
                      "name": "daiActual",
                      "nodeType": "VariableDeclaration",
                      "scope": 9473,
                      "src": "6497:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9438,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6497:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9446,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9443,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22327,
                            "src": "6539:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          ],
                          "id": 9442,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "6531:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9444,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6531:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9440,
                        "name": "dai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9204,
                        "src": "6517:3:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9441,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21458,
                      "src": "6517:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 9445,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6517:28:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6497:48:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9449,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9447,
                      "name": "daiActual",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9439,
                      "src": "6559:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9448,
                      "name": "daiWithdraw",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9421,
                      "src": "6571:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6559:23:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9455,
                  "nodeType": "IfStatement",
                  "src": "6555:77:29",
                  "trueBody": {
                    "id": 9454,
                    "nodeType": "Block",
                    "src": "6584:48:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 9452,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 9450,
                            "name": "daiWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9421,
                            "src": "6598:11:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 9451,
                            "name": "daiActual",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9439,
                            "src": "6612:9:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "6598:23:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9453,
                        "nodeType": "ExpressionStatement",
                        "src": "6598:23:29"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 9459,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22171,
                              "src": "6662:3:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 9460,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "6662:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9461,
                            "name": "daiWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9421,
                            "src": "6674:11:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9457,
                            "name": "dai",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9204,
                            "src": "6649:3:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$21849",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 9458,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21493,
                          "src": "6649:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 9462,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6649:37:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7769746864726177207472616e73666572206661696c6564",
                        "id": 9463,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6688:26:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_58bc929e474c8aeb2e4ca83613053e225f521e498e8deece823d1749bab458d1",
                          "typeString": "literal_string \"withdraw transfer failed\""
                        },
                        "value": "withdraw transfer failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_58bc929e474c8aeb2e4ca83613053e225f521e498e8deece823d1749bab458d1",
                          "typeString": "literal_string \"withdraw transfer failed\""
                        }
                      ],
                      "id": 9456,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "6641:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9464,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6641:74:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9465,
                  "nodeType": "ExpressionStatement",
                  "src": "6641:74:29"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 9467,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 22171,
                          "src": "6747:3:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 9468,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6747:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9469,
                        "name": "daiWithdraw",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9421,
                        "src": "6759:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9470,
                        "name": "daiActual",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9439,
                        "src": "6772:9:29",
                        "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": 9466,
                      "name": "DAIStakeWithdraw",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9192,
                      "src": "6730:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256)"
                      }
                    },
                    "id": 9471,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6730:52:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9472,
                  "nodeType": "EmitStatement",
                  "src": "6725:57:29"
                }
              ]
            },
            "documentation": "@dev Withdraws the sender staked DAI.",
            "id": 9474,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "withdrawStake",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9392,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5926:2:29"
            },
            "returnParameters": {
              "id": 9393,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5936:0:29"
            },
            "scope": 9740,
            "src": "5904:885:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9505,
              "nodeType": "Block",
              "src": "6977:258:29",
              "statements": [
                {
                  "assignments": [
                    9480
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9480,
                      "name": "er",
                      "nodeType": "VariableDeclaration",
                      "scope": 9505,
                      "src": "6987:10:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9479,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "6987:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9484,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9481,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "7000:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9482,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "exchangeRateStored",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9143,
                      "src": "7000:23:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 9483,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7000:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6987:38:29"
                },
                {
                  "assignments": [
                    9486
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9486,
                      "name": "daiBalance",
                      "nodeType": "VariableDeclaration",
                      "scope": 9505,
                      "src": "7123:18:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9485,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7123:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9502,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "3130",
                        "id": 9500,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7198:2:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10_by_1",
                          "typeString": "int_const 10"
                        },
                        "value": "10"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10_by_1",
                          "typeString": "int_const 10"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "31653130",
                                "id": 9495,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7183:4:29",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_10000000000_by_1",
                                  "typeString": "int_const 10000000000"
                                },
                                "value": "1e10"
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_10000000000_by_1",
                                  "typeString": "int_const 10000000000"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 9491,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 22327,
                                        "src": "7172:4:29",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                          "typeString": "contract SimpleDAIStaking"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                          "typeString": "contract SimpleDAIStaking"
                                        }
                                      ],
                                      "id": 9490,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "7164:7:29",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 9492,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "7164:13:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 9488,
                                    "name": "cDai",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9206,
                                    "src": "7149:4:29",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_cERC20_$9160",
                                      "typeString": "contract cERC20"
                                    }
                                  },
                                  "id": 9489,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "balanceOf",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 9150,
                                  "src": "7149:14:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                    "typeString": "function (address) view external returns (uint256)"
                                  }
                                },
                                "id": 9493,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7149:29:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 9494,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "mul",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 21215,
                              "src": "7149:33:29",
                              "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": 9496,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7149:39:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9497,
                            "name": "er",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9480,
                            "src": "7190:2:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 9487,
                          "name": "rmul",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 199,
                          "src": "7144:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 9498,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7144:49:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9499,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "div",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21239,
                      "src": "7144:53:29",
                      "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": 9501,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7144:57:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7123:78:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9503,
                    "name": "daiBalance",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9486,
                    "src": "7218:10:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 9478,
                  "id": 9504,
                  "nodeType": "Return",
                  "src": "7211:17:29"
                }
              ]
            },
            "documentation": "@dev Calculates the worth of the staked cDAI tokens in DAI.\n@return (uint256) The worth in DAI",
            "id": 9506,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentDAIWorth",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9475,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6944:2:29"
            },
            "returnParameters": {
              "id": 9478,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9477,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9506,
                  "src": "6968:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9476,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6968:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6967:9:29"
            },
            "scope": 9740,
            "src": "6920:315:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9582,
              "nodeType": "Block",
              "src": "7615:870:29",
              "statements": [
                {
                  "assignments": [
                    9516
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9516,
                      "name": "er",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7625:10:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9515,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7625:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9520,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9517,
                        "name": "cDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9206,
                        "src": "7638:4:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_cERC20_$9160",
                          "typeString": "contract cERC20"
                        }
                      },
                      "id": 9518,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "exchangeRateStored",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 9143,
                      "src": "7638:23:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 9519,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7638:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7625:38:29"
                },
                {
                  "assignments": [
                    9522
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9522,
                      "name": "daiWorth",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7673:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9521,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7673:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9525,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9523,
                      "name": "currentDAIWorth",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9506,
                      "src": "7692:15:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                        "typeString": "function () view returns (uint256)"
                      }
                    },
                    "id": 9524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7692:17:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7673:36:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9528,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9526,
                      "name": "daiWorth",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9522,
                      "src": "7723:8:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9527,
                      "name": "totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9213,
                      "src": "7735:11:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7723:23:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9535,
                  "nodeType": "IfStatement",
                  "src": "7719:70:29",
                  "trueBody": {
                    "id": 9534,
                    "nodeType": "Block",
                    "src": "7748:41:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9529,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7770:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9530,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7773:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 9531,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7776:1:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 9532,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "7769:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_rational_0_by_1_$_t_rational_0_by_1_$_t_rational_0_by_1_$",
                            "typeString": "tuple(int_const 0,int_const 0,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 9514,
                        "id": 9533,
                        "nodeType": "Return",
                        "src": "7762:16:29"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    9537
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9537,
                      "name": "daiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7798:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9536,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7798:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9542,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9540,
                        "name": "totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9213,
                        "src": "7830:11:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9538,
                        "name": "daiWorth",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9522,
                        "src": "7817:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9539,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sub",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21263,
                      "src": "7817:12:29",
                      "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": 9541,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7817:25:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7798:44:29"
                },
                {
                  "assignments": [
                    9544
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9544,
                      "name": "cdaiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "7984:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9543,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7984:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9552,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "31653130",
                            "id": 9548,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "8022:4:29",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_10000000000_by_1",
                              "typeString": "int_const 10000000000"
                            },
                            "value": "1e10"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_10000000000_by_1",
                              "typeString": "int_const 10000000000"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9546,
                            "name": "daiGains",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9537,
                            "src": "8009:8:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "id": 9547,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "mul",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21215,
                          "src": "8009:12:29",
                          "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": 9549,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8009:18:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9550,
                        "name": "er",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9516,
                        "src": "8029:2:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9545,
                      "name": "rdiv",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 247,
                      "src": "8004:4:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                      }
                    },
                    "id": 9551,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8004:28:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7984:48:29"
                },
                {
                  "assignments": [
                    9554
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9554,
                      "name": "precisionLossCDaiRay",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "8159:28:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9553,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "8159:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9559,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "31653139",
                        "id": 9557,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8204:4:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10000000000000000000_by_1",
                          "typeString": "int_const 10000000000000000000"
                        },
                        "value": "1e19"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10000000000000000000_by_1",
                          "typeString": "int_const 10000000000000000000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9555,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9544,
                        "src": "8190:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9556,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "mod",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21307,
                      "src": "8190:13:29",
                      "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": 9558,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8190:19:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8159:50:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9565,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9560,
                      "name": "cdaiGains",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9544,
                      "src": "8255:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "31653139",
                          "id": 9563,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "8281:4:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_10000000000000000000_by_1",
                            "typeString": "int_const 10000000000000000000"
                          },
                          "value": "1e19"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_10000000000000000000_by_1",
                            "typeString": "int_const 10000000000000000000"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 9561,
                          "name": "cdaiGains",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9544,
                          "src": "8267:9:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9562,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "8267:13:29",
                        "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": 9564,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8267:19:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "8255:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9566,
                  "nodeType": "ExpressionStatement",
                  "src": "8255:31:29"
                },
                {
                  "assignments": [
                    9568
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9568,
                      "name": "precisionLossDai",
                      "nodeType": "VariableDeclaration",
                      "scope": 9582,
                      "src": "8355:24:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9567,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "8355:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9576,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "31653130",
                        "id": 9574,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8417:4:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_10000000000_by_1",
                          "typeString": "int_const 10000000000"
                        },
                        "value": "1e10"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_10000000000_by_1",
                          "typeString": "int_const 10000000000"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9570,
                            "name": "precisionLossCDaiRay",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9554,
                            "src": "8387:20:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9571,
                            "name": "er",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9516,
                            "src": "8409:2:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 9569,
                          "name": "rmul",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 199,
                          "src": "8382:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256,uint256) pure returns (uint256)"
                          }
                        },
                        "id": 9572,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8382:30:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 9573,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "div",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21239,
                      "src": "8382:34:29",
                      "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": 9575,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8382:40:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8355:67:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 9577,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9544,
                        "src": "8440:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9578,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9537,
                        "src": "8451:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9579,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9568,
                        "src": "8461:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 9580,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "8439:39:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                      "typeString": "tuple(uint256,uint256,uint256)"
                    }
                  },
                  "functionReturnParameters": 9514,
                  "id": 9581,
                  "nodeType": "Return",
                  "src": "8432:46:29"
                }
              ]
            },
            "documentation": "@dev Calculates the current interest that was gained.\n@return (uint256, uint256, uint256) The interest in cDAI, the interest in DAI,\nthe amount which is not covered by precision of DAI",
            "id": 9583,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentUBIInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9507,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7490:2:29"
            },
            "returnParameters": {
              "id": 9514,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9509,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7551:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9508,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7551:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9511,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7572:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9510,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7572:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9513,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9583,
                  "src": "7593:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9512,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7593:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7537:73:29"
            },
            "scope": 9740,
            "src": "7463:1022:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9656,
              "nodeType": "Block",
              "src": "9087:716:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 9603,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 9599,
                          "name": "_recipient",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9585,
                          "src": "9173:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 9601,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 22327,
                              "src": "9195:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                "typeString": "contract SimpleDAIStaking"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                                "typeString": "contract SimpleDAIStaking"
                              }
                            ],
                            "id": 9600,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9187:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 9602,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9187:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "9173:27:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "526563697069656e742063616e6e6f7420626520746865207374616b696e6720636f6e7472616374",
                        "id": 9604,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9202:42:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b186bec0df383c90e23d5b956c4da2f18dd93ac86eb077c5c0e428a763cbd6fa",
                          "typeString": "literal_string \"Recipient cannot be the staking contract\""
                        },
                        "value": "Recipient cannot be the staking contract"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b186bec0df383c90e23d5b956c4da2f18dd93ac86eb077c5c0e428a763cbd6fa",
                          "typeString": "literal_string \"Recipient cannot be the staking contract\""
                        }
                      ],
                      "id": 9598,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "9165:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9605,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9165:80:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9606,
                  "nodeType": "ExpressionStatement",
                  "src": "9165:80:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 9608,
                          "name": "canCollect",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9671,
                          "src": "9264:10:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                            "typeString": "function () view returns (bool)"
                          }
                        },
                        "id": 9609,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9264:12:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "4e65656420746f207761697420666f7220746865206e65787420696e74657276616c",
                        "id": 9610,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9278:36:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b2926b938aae9e3d3391834a8a3f967955ec6bac9d9b401e186c29404478d446",
                          "typeString": "literal_string \"Need to wait for the next interval\""
                        },
                        "value": "Need to wait for the next interval"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b2926b938aae9e3d3391834a8a3f967955ec6bac9d9b401e186c29404478d446",
                          "typeString": "literal_string \"Need to wait for the next interval\""
                        }
                      ],
                      "id": 9607,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "9256:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9611,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9256:59:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9612,
                  "nodeType": "ExpressionStatement",
                  "src": "9256:59:29"
                },
                {
                  "assignments": [
                    9614,
                    9616,
                    9618
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9614,
                      "name": "cdaiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9340:17:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9613,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9340:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 9616,
                      "name": "daiGains",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9371:16:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9615,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9371:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 9618,
                      "name": "precisionLossDai",
                      "nodeType": "VariableDeclaration",
                      "scope": 9656,
                      "src": "9401:24:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9617,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "9401:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9621,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9619,
                      "name": "currentUBIInterest",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9583,
                      "src": "9438:18:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$",
                        "typeString": "function () view returns (uint256,uint256,uint256)"
                      }
                    },
                    "id": 9620,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9438:20:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",
                      "typeString": "tuple(uint256,uint256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9326:132:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 9628,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 9622,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "9468:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9626,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "9505:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9623,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "9488:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9624,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "9488:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9625,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "9488:16:29",
                        "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": 9627,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9488:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9468:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 9629,
                  "nodeType": "ExpressionStatement",
                  "src": "9468:51:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9632,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 9630,
                      "name": "cdaiGains",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9614,
                      "src": "9533:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 9631,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9545:1:29",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "9533:13:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9642,
                  "nodeType": "IfStatement",
                  "src": "9529:103:29",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 9636,
                              "name": "_recipient",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9585,
                              "src": "9582:10:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 9637,
                              "name": "cdaiGains",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9614,
                              "src": "9594:9:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 9634,
                              "name": "cDai",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9206,
                              "src": "9568:4:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_cERC20_$9160",
                                "typeString": "contract cERC20"
                              }
                            },
                            "id": 9635,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 9159,
                            "src": "9568:13:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 9638,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9568:36:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "hexValue": "636f6c6c656374207472616e73666572206661696c6564",
                          "id": 9639,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9606:25:29",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_c955f53632207d8104a997da6e051a24feef1c53c0972ac3af4bdda83f5d190e",
                            "typeString": "literal_string \"collect transfer failed\""
                          },
                          "value": "collect transfer failed"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          {
                            "typeIdentifier": "t_stringliteral_c955f53632207d8104a997da6e051a24feef1c53c0972ac3af4bdda83f5d190e",
                            "typeString": "literal_string \"collect transfer failed\""
                          }
                        ],
                        "id": 9633,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          22174,
                          22175
                        ],
                        "referencedDeclaration": 22175,
                        "src": "9560:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                          "typeString": "function (bool,string memory) pure"
                        }
                      },
                      "id": 9640,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9560:72:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 9641,
                    "nodeType": "ExpressionStatement",
                    "src": "9560:72:29"
                  }
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 9644,
                        "name": "_recipient",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9585,
                        "src": "9665:10:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9645,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9614,
                        "src": "9677:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9646,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9616,
                        "src": "9688:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9647,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9618,
                        "src": "9698:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9643,
                      "name": "InterestCollected",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9202,
                      "src": "9647:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256,uint256,uint256)"
                      }
                    },
                    "id": 9648,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9647:68:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9649,
                  "nodeType": "EmitStatement",
                  "src": "9642:73:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "id": 9650,
                        "name": "cdaiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9614,
                        "src": "9733:9:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9651,
                        "name": "daiGains",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9616,
                        "src": "9744:8:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9652,
                        "name": "precisionLossDai",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9618,
                        "src": "9754:16:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 9653,
                        "name": "avgInterestDonatedRatio",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9216,
                        "src": "9772:23:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      }
                    ],
                    "id": 9654,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "9732:64:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint32_$",
                      "typeString": "tuple(uint256,uint256,uint256,uint32)"
                    }
                  },
                  "functionReturnParameters": 9597,
                  "id": 9655,
                  "nodeType": "Return",
                  "src": "9725:71:29"
                }
              ]
            },
            "documentation": "@dev Collects gained interest by fundmanager. Can be collected only once\nin an interval which is defined above.\n@param _recipient The recipient of cDAI gains\n@return (uint256, uint256, uint256, uint32) The interest in cDAI, the interest in DAI,\nthe amount which is not covered by precision of DAI, how much of the generated interest is donated",
            "id": 9657,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9588,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9587,
                  "name": "onlyFundManager",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 9230,
                  "src": "8957:15:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "8957:15:29"
              }
            ],
            "name": "collectUBIInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9586,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9585,
                  "name": "_recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "8914:18:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 9584,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8914:7:29",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8913:20:29"
            },
            "returnParameters": {
              "id": 9597,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9590,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9003:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9589,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9003:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9592,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9024:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9591,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9024:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9594,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9045:7:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9593,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9045:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9596,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9657,
                  "src": "9066:6:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 9595,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "9066:6:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8989:93:29"
            },
            "scope": 9740,
            "src": "8886:917:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9670,
              "nodeType": "Block",
              "src": "10084:75:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9668,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9665,
                          "name": "blockInterval",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9208,
                          "src": "10118:13:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 9662,
                            "name": "block",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22161,
                            "src": "10101:5:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_block",
                              "typeString": "block"
                            }
                          },
                          "id": 9663,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "number",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "10101:12:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 9664,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "div",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 21239,
                        "src": "10101:16:29",
                        "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": 9666,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "10101:31:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 9667,
                      "name": "lastUBICollection",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9210,
                      "src": "10135:17:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "10101:51:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 9661,
                  "id": 9669,
                  "nodeType": "Return",
                  "src": "10094:58:29"
                }
              ]
            },
            "documentation": "@dev Checks if enough blocks have passed so it would be possible to\nexecute `collectUBIInterest` according to the length of `blockInterval`\n@return (bool) True if enough blocks have passed",
            "id": 9671,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "canCollect",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9658,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10054:2:29"
            },
            "returnParameters": {
              "id": 9661,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9660,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 9671,
                  "src": "10078:4:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9659,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "10078:4:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10077:6:29"
            },
            "scope": 9740,
            "src": "10035:124:29",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9679,
              "nodeType": "Block",
              "src": "10350:28:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9676,
                      "name": "addRights",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1203,
                      "src": "10360:9:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9677,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10360:11:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9678,
                  "nodeType": "ExpressionStatement",
                  "src": "10360:11:29"
                }
              ]
            },
            "documentation": "@dev Start function. Adds this contract to identity as a feeless scheme.\nCan only be called if scheme is registered",
            "id": 9680,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9674,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9673,
                  "name": "onlyRegistered",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1335,
                  "src": "10335:14:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10335:14:29"
              }
            ],
            "name": "start",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9672,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10325:2:29"
            },
            "returnParameters": {
              "id": 9675,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10350:0:29"
            },
            "scope": 9740,
            "src": "10311:67:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9691,
              "nodeType": "Block",
              "src": "10643:48:29",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9685,
                      "name": "pause",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 21093,
                      "src": "10653:5:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9686,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10653:7:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9687,
                  "nodeType": "ExpressionStatement",
                  "src": "10653:7:29"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9688,
                      "name": "removeRights",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1226,
                      "src": "10670:12:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 9689,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10670:14:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9690,
                  "nodeType": "ExpressionStatement",
                  "src": "10670:14:29"
                }
              ]
            },
            "documentation": "@dev making the contract inactive\nNOTICE: this could theoretically result in future interest earned in cdai to remain locked\nbut we dont expect any other stakers but us in SimpleDAIStaking",
            "id": 9692,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9683,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9682,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "10632:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10632:10:29"
              }
            ],
            "name": "end",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9681,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10622:2:29"
            },
            "returnParameters": {
              "id": 9684,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10643:0:29"
            },
            "scope": 9740,
            "src": "10610:81:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 9738,
              "nodeType": "Block",
              "src": "10883:457:29",
              "statements": [
                {
                  "assignments": [
                    9700
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9700,
                      "name": "toWithdraw",
                      "nodeType": "VariableDeclaration",
                      "scope": 9738,
                      "src": "10893:18:29",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 9699,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "10893:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 9707,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 9704,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 22327,
                            "src": "10939:4:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_SimpleDAIStaking_$9740",
                              "typeString": "contract SimpleDAIStaking"
                            }
                          ],
                          "id": 9703,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "10931:7:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 9705,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "10931:13:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 9701,
                        "name": "_token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9694,
                        "src": "10914:6:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$21849",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 9702,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 21458,
                      "src": "10914:16:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 9706,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10914:31:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "10893:52:29"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 9714,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9709,
                          "name": "_token",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9694,
                          "src": "11053:6:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ERC20_$21849",
                            "typeString": "contract ERC20"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_ERC20_$21849",
                            "typeString": "contract ERC20"
                          }
                        ],
                        "id": 9708,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "11045:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 9710,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "11045:15:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 9712,
                          "name": "cDai",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9206,
                          "src": "11072:4:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_cERC20_$9160",
                            "typeString": "contract cERC20"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_cERC20_$9160",
                            "typeString": "contract cERC20"
                          }
                        ],
                        "id": 9711,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "11064:7:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 9713,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "11064:13:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "11045:32:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 9726,
                  "nodeType": "IfStatement",
                  "src": "11041:203:29",
                  "trueBody": {
                    "id": 9725,
                    "nodeType": "Block",
                    "src": "11079:165:29",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 9721,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 9718,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 9716,
                                  "name": "totalStaked",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9213,
                                  "src": "11118:11:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "==",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 9717,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "11133:1:29",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "11118:16:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [],
                                "expression": {
                                  "argumentTypes": [],
                                  "id": 9719,
                                  "name": "paused",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 21059,
                                  "src": "11138:6:29",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                                    "typeString": "function () view returns (bool)"
                                  }
                                },
                                "id": 9720,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "11138:8:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "11118:28:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "63616e207265636f7665722063446169206f6e6c79207768656e207374616b65732068617665206265656e2077697468647261776e",
                              "id": 9722,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "11164:55:29",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_79607305dd51ed20c601fc68ead0738527c2757f2ece05378363c3502b2aaa0c",
                                "typeString": "literal_string \"can recover cDai only when stakes have been withdrawn\""
                              },
                              "value": "can recover cDai only when stakes have been withdrawn"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_79607305dd51ed20c601fc68ead0738527c2757f2ece05378363c3502b2aaa0c",
                                "typeString": "literal_string \"can recover cDai only when stakes have been withdrawn\""
                              }
                            ],
                            "id": 9715,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              22174,
                              22175
                            ],
                            "referencedDeclaration": 22175,
                            "src": "11093:7:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 9723,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "11093:140:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 9724,
                        "nodeType": "ExpressionStatement",
                        "src": "11093:140:29"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 9731,
                                "name": "avatar",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1281,
                                "src": "11285:6:29",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Avatar_$12705",
                                  "typeString": "contract Avatar"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_contract$_Avatar_$12705",
                                  "typeString": "contract Avatar"
                                }
                              ],
                              "id": 9730,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "11277:7:29",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_address_$",
                                "typeString": "type(address)"
                              },
                              "typeName": "address"
                            },
                            "id": 9732,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "11277:15:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 9733,
                            "name": "toWithdraw",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9700,
                            "src": "11294:10:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 9728,
                            "name": "_token",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9694,
                            "src": "11261:6:29",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$21849",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 9729,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 21493,
                          "src": "11261:15:29",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 9734,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "11261:44:29",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "7265636f766572207472616e73666572206661696c6564",
                        "id": 9735,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "11307:25:29",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_41a03013a5674cc54e9badb52c47e3c4670bc54fa0765e5276b5118633f8aeb3",
                          "typeString": "literal_string \"recover transfer failed\""
                        },
                        "value": "recover transfer failed"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_41a03013a5674cc54e9badb52c47e3c4670bc54fa0765e5276b5118633f8aeb3",
                          "typeString": "literal_string \"recover transfer failed\""
                        }
                      ],
                      "id": 9727,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        22174,
                        22175
                      ],
                      "referencedDeclaration": 22175,
                      "src": "11253:7:29",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 9736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "11253:80:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9737,
                  "nodeType": "ExpressionStatement",
                  "src": "11253:80:29"
                }
              ]
            },
            "documentation": "@dev method to recover any stuck erc20 tokens (ie  compound COMP)\n@param _token the ERC20 token to recover",
            "id": 9739,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 9697,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 9696,
                  "name": "onlyAvatar",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 1325,
                  "src": "10872:10:29",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "10872:10:29"
              }
            ],
            "name": "recover",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9695,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9694,
                  "name": "_token",
                  "nodeType": "VariableDeclaration",
                  "scope": 9739,
                  "src": "10851:12:29",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_ERC20_$21849",
                    "typeString": "contract ERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 9693,
                    "name": "ERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 21849,
                    "src": "10851:5:29",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ERC20_$21849",
                      "typeString": "contract ERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10850:14:29"
            },
            "returnParameters": {
              "id": 9698,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10883:0:29"
            },
            "scope": 9740,
            "src": "10834:506:29",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 9741,
        "src": "1073:10269:29"
      }
    ],
    "src": "0:11343:29"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.2",
  "updatedAt": "2021-08-23T07:33:52.311Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}