{
  "contractName": "KollateralInvokable",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/helpers/KollateralInvokable.sol\":\"KollateralInvokable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/ExtendedMath.sol\":{\"keccak256\":\"0x9b4a67b1242134b64f557613259bfb51268d488cbc7b27cb2bc72c2f21f2b71f\",\"urls\":[\"bzz-raw://47bc3f04cddcbbe7a0373a074d50bbc1720ef7d73266532aab07474ea426ab43\",\"dweb:/ipfs/QmdPdivc8yXbmvDL1nG8xXHJF7qcfx6JqQoCFBv1ohDmdP\"]},\"/Users/kbrizzle/code/kollateral/protocol/contracts/Invoker.sol\":{\"keccak256\":\"0xc6c6e31ef43758db90ef5f21ff27519ea736f40088abf4b635ac29ba658eb784\",\"urls\":[\"bzz-raw://50968c9a288e9c44d61a1912fc3a44c57fc6c07ab564be99e1b3395c89583b0d\",\"dweb:/ipfs/QmNeN8jTLcwx31J6vyxdgS2e5uyToZNstWWQ28xAK6kEAU\"]},\"/Users/kbrizzle/code/kollateral/protocol/contracts/KToken.sol\":{\"keccak256\":\"0x748a3edca97018638a9ed18f3484977c124517f2261af8a7be3e1b8ee2fbe8a8\",\"urls\":[\"bzz-raw://9b5d42beda89cdf788e79cec733d96c4c4eaf896694948ee2c0fa5bb46d3972c\",\"dweb:/ipfs/Qmc9sGpHe3CTiEG9gzrdHtCgsuHBfAToTBGYmL8a4JL3J1\"]},\"/Users/kbrizzle/code/kollateral/protocol/contracts/helpers/KollateralInvokable.sol\":{\"keccak256\":\"0x653d1d930de94774c0e4ca7beb155db84656dc24ad94071bdb16a9b013c92f78\",\"urls\":[\"bzz-raw://6656eca4d9385d22725cac49012f7eb6042aa1519680affed0673858111b2af0\",\"dweb:/ipfs/QmfWENLFW34soWoHM2bT2BcD7ALcjsgtkcezGW9wu5rx1e\"]},\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IInvoker.sol\":{\"keccak256\":\"0x8ad397e0611b31884a19bed7b27712530efb95ecf032fc8b8e0c25f4d3190569\",\"urls\":[\"bzz-raw://b23aa7fa654935abb0286ceac8eaf281589b866b75f0cc5b2d8971e1378e98c1\",\"dweb:/ipfs/QmVqYaxBEQVGfXUXVSFXaG6ZfFz5dEwkjDoMprZqbLAnyN\"]},\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IKToken.sol\":{\"keccak256\":\"0x5b03d279a41856eef739da4ee50155425bbd95d99d80e4b910ec5abb91a99e40\",\"urls\":[\"bzz-raw://4ef7259b5604ef20e62b2503bc34d4052f99b85a18a80b072b8883bb7f9559de\",\"dweb:/ipfs/QmUsVQH9M3FoB4rpJGZJpZrbk2kcDFyRg5E5WfAKqHYkok\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]},\"@openzeppelin/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzz-raw://00a788c4631466c220b385bdd100c571d24b2deccd657615cfbcef6cadf669a4\",\"dweb:/ipfs/QmTEwDbjJNxmMNCDMqtuou3dyM8Wtp8Q9NFvn7SAVM7Jf3\"]},\"@openzeppelin/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30\",\"urls\":[\"bzz-raw://69c4bb822caae3d1bfd38e81f03b6d618d4d83cbb8e9f8236d28e1c4fe1d0d81\",\"dweb:/ipfs/QmWamstbFhdySmocF2TSKYVLLZF24JG4aXMvHiRdWKv3RA\"]},\"@openzeppelin/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260\",\"urls\":[\"bzz-raw://0307a3cae4df037aee16fb0b0d94849cb4d9b20d7d7182c185f3efac6d2caec0\",\"dweb:/ipfs/QmezTANBfrJmCvxfmfyfcfFGtbcUEUtoJCjfxKnAePiNoE\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xecd8ab29d9a5771c3964d0cd1788c4a5098a0081b20fb275da850a22b1c59806\",\"urls\":[\"bzz-raw://696a75bc2c55407ce8251ccc7d19ecb1b7b2be1796a160a6524312babcc7e3d4\",\"dweb:/ipfs/QmQViKEp3y99h9uhRssE29TmjBKRnFMaoz3eJZ4eggggg2\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x65a4078c03875c25413a068ce9cfdd7e68a90f8786612d1189c89341e6e3b802\",\"urls\":[\"bzz-raw://45c0d95495b944fbb1aa09d900b0ab530903a432125ab8fddfa05064a7988991\",\"dweb:/ipfs/Qma2VeknkKA1THeubGzshWFk44BktXkXP1UKp9Un2uDSsu\"]},\"@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed\",\"urls\":[\"bzz-raw://28d03f328e19e4099d5013de0649afaeaabac1a614e130767ab1cb4aca9775b6\",\"dweb:/ipfs/Qmb9iW7yNuYehB2NfhRMs9TakqbLVQhBhmGMkaDZ5g1Eb4\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xe86fdc15fbc379ecf14d6aa4f51b87c0be8476e114e23c171b790a6717230655\",\"urls\":[\"bzz-raw://81905037f66d37ed211a4e3430af74f36e18b3a5d5b688e6d7d5ee199824a41a\",\"dweb:/ipfs/QmTcpgNKqLVRbcgNSUHazAbVf2bz5uh5mPkAijGeYW7Sqb\"]}},\"version\":1}",
  "bytecode": "0x6080604052348015600f57600080fd5b50603e80601d6000396000f3fe6080604052600080fdfea265627a7a7231582060976e3a373542cc8802272ecb02e354bbccc0dd88268b986a21194440eeac4d64736f6c63430005100032",
  "deployedBytecode": "0x6080604052600080fdfea265627a7a7231582060976e3a373542cc8802272ecb02e354bbccc0dd88268b986a21194440eeac4d64736f6c63430005100032",
  "sourceMap": "184:1779:7:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;184:1779:7;;;;;;;",
  "deployedSourceMap": "184:1779:7:-;;;;;",
  "source": "pragma solidity ^0.5.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"../Invoker.sol\";\nimport \"../KToken.sol\";\n\ncontract KollateralInvokable {\n    using SafeMath for uint256;\n\n    function currentKTokenAddress() internal view returns (address) {\n        return Invoker(msg.sender).currentKTokenAddress();\n    }\n\n    function currentTokenAddress() internal view returns (address) {\n        return Invoker(msg.sender).currentTokenAddress();\n    }\n\n    function currentTokenAmount() internal view returns (uint256) {\n        return Invoker(msg.sender).currentTokenAmount();\n    }\n\n    function currentExpectedBalance() internal view returns (uint256) {\n        return Invoker(msg.sender).currentExpectedBalance();\n    }\n\n    function currentKTokenTotalReserve() internal view returns (uint256) {\n        return KToken(currentKTokenAddress()).totalReserve();\n    }\n\n    function currentOutstandingTokenAmount() internal view returns (uint256) {\n        return currentExpectedBalance().sub(currentKTokenTotalReserve());\n    }\n\n    function isKTokenKEther() internal view returns (bool) {\n        return KToken(currentKTokenAddress()).isKEther();\n    }\n\n    function repay() internal returns (bool) {\n        return repayAmount(currentOutstandingTokenAmount());\n    }\n\n    function repayAmount(uint256 amount) internal returns (bool) {\n        if (isKTokenKEther()) {\n            address payable kEtherAddress = address(uint160(currentKTokenAddress()));\n            require(address(this).balance >= amount, \"KollateralInvokable: not enough ether balance\");\n            kEtherAddress.transfer(amount);\n            return true;\n        } else {\n            IERC20 token = IERC20(currentTokenAddress());\n            require(token.balanceOf(address(this)) >= amount, \"KollateralInvokable: not enough token balance\");\n            return token.transfer(currentKTokenAddress(), amount);\n        }\n    }\n}\n",
  "sourcePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/helpers/KollateralInvokable.sol",
  "ast": {
    "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/helpers/KollateralInvokable.sol",
    "exportedSymbols": {
      "KollateralInvokable": [
        1819
      ]
    },
    "id": 1820,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1643,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:7"
      },
      {
        "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
        "file": "@openzeppelin/contracts/math/SafeMath.sol",
        "id": 1644,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 2904,
        "src": "25:51:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 1645,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 3550,
        "src": "77:56:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/Invoker.sol",
        "file": "../Invoker.sol",
        "id": 1646,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 422,
        "src": "134:24:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/KToken.sol",
        "file": "../KToken.sol",
        "id": 1647,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 1117,
        "src": "159:23:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1819,
        "linearizedBaseContracts": [
          1819
        ],
        "name": "KollateralInvokable",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 1650,
            "libraryName": {
              "contractScope": null,
              "id": 1648,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2903,
              "src": "225:8:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$2903",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "219:27:7",
            "typeName": {
              "id": 1649,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "238:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "body": {
              "id": 1662,
              "nodeType": "Block",
              "src": "316:66:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1656,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "341:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1657,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "341:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1655,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "333:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1658,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "333:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1659,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentKTokenAddress",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 352,
                      "src": "333:40:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                        "typeString": "function () view external returns (address)"
                      }
                    },
                    "id": 1660,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "333:42:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 1654,
                  "id": 1661,
                  "nodeType": "Return",
                  "src": "326:49:7"
                }
              ]
            },
            "documentation": null,
            "id": 1663,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentKTokenAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1651,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "281:2:7"
            },
            "returnParameters": {
              "id": 1654,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1653,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1663,
                  "src": "307:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1652,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "307:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "306:9:7"
            },
            "scope": 1819,
            "src": "252:130:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1675,
              "nodeType": "Block",
              "src": "451:65:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1669,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "476:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1670,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "476:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1668,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "468:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1671,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "468:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1672,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentTokenAddress",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 362,
                      "src": "468:39:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                        "typeString": "function () view external returns (address)"
                      }
                    },
                    "id": 1673,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "468:41:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 1667,
                  "id": 1674,
                  "nodeType": "Return",
                  "src": "461:48:7"
                }
              ]
            },
            "documentation": null,
            "id": 1676,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentTokenAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1664,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "416:2:7"
            },
            "returnParameters": {
              "id": 1667,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1666,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1676,
                  "src": "442:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1665,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "442:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "441:9:7"
            },
            "scope": 1819,
            "src": "388:128:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1688,
              "nodeType": "Block",
              "src": "584:64:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1682,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "609:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1683,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "609:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1681,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "601:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1684,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "601:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1685,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentTokenAmount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 336,
                      "src": "601:38:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1686,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "601:40:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1680,
                  "id": 1687,
                  "nodeType": "Return",
                  "src": "594:47:7"
                }
              ]
            },
            "documentation": null,
            "id": 1689,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentTokenAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1677,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "549:2:7"
            },
            "returnParameters": {
              "id": 1680,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1679,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1689,
                  "src": "575:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1678,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "575:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "574:9:7"
            },
            "scope": 1819,
            "src": "522:126:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1701,
              "nodeType": "Block",
              "src": "720:68:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1695,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "745:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "745:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1694,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "737:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1697,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "737:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1698,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentExpectedBalance",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 344,
                      "src": "737:42:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1699,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "737:44:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1693,
                  "id": 1700,
                  "nodeType": "Return",
                  "src": "730:51:7"
                }
              ]
            },
            "documentation": null,
            "id": 1702,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentExpectedBalance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1690,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "685:2:7"
            },
            "returnParameters": {
              "id": 1693,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1692,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1702,
                  "src": "711:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1691,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "711:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "710:9:7"
            },
            "scope": 1819,
            "src": "654:134:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1714,
              "nodeType": "Block",
              "src": "863:69:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1708,
                              "name": "currentKTokenAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1663,
                              "src": "887:20:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                "typeString": "function () view returns (address)"
                              }
                            },
                            "id": 1709,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "887:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 1707,
                          "name": "KToken",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1116,
                          "src": "880:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_KToken_$1116_$",
                            "typeString": "type(contract KToken)"
                          }
                        },
                        "id": 1710,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "880:30:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_KToken_$1116",
                          "typeString": "contract KToken"
                        }
                      },
                      "id": 1711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "totalReserve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1030,
                      "src": "880:43:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1712,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "880:45:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1706,
                  "id": 1713,
                  "nodeType": "Return",
                  "src": "873:52:7"
                }
              ]
            },
            "documentation": null,
            "id": 1715,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentKTokenTotalReserve",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1703,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "828:2:7"
            },
            "returnParameters": {
              "id": 1706,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1705,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1715,
                  "src": "854:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1704,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "854:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "853:9:7"
            },
            "scope": 1819,
            "src": "794:138:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1727,
              "nodeType": "Block",
              "src": "1011:81:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1723,
                          "name": "currentKTokenTotalReserve",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1715,
                          "src": "1057:25:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1724,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1057:27:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1720,
                          "name": "currentExpectedBalance",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1702,
                          "src": "1028:22:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1721,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1028:24:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 1722,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sub",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2759,
                      "src": "1028:28:7",
                      "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": 1725,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1028:57:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1719,
                  "id": 1726,
                  "nodeType": "Return",
                  "src": "1021:64:7"
                }
              ]
            },
            "documentation": null,
            "id": 1728,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentOutstandingTokenAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1716,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "976:2:7"
            },
            "returnParameters": {
              "id": 1719,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1718,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1728,
                  "src": "1002:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1717,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1002:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1001:9:7"
            },
            "scope": 1819,
            "src": "938:154:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1740,
              "nodeType": "Block",
              "src": "1153:65:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1734,
                              "name": "currentKTokenAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1663,
                              "src": "1177:20:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                "typeString": "function () view returns (address)"
                              }
                            },
                            "id": 1735,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1177:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 1733,
                          "name": "KToken",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1116,
                          "src": "1170:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_KToken_$1116_$",
                            "typeString": "type(contract KToken)"
                          }
                        },
                        "id": 1736,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1170:30:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_KToken_$1116",
                          "typeString": "contract KToken"
                        }
                      },
                      "id": 1737,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "isKEther",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1025,
                      "src": "1170:39:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
                        "typeString": "function () view external returns (bool)"
                      }
                    },
                    "id": 1738,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1170:41:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1732,
                  "id": 1739,
                  "nodeType": "Return",
                  "src": "1163:48:7"
                }
              ]
            },
            "documentation": null,
            "id": 1741,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isKTokenKEther",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1729,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1121:2:7"
            },
            "returnParameters": {
              "id": 1732,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1731,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1741,
                  "src": "1147:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1730,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1147:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1146:6:7"
            },
            "scope": 1819,
            "src": "1098:120:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1751,
              "nodeType": "Block",
              "src": "1265:68:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1747,
                          "name": "currentOutstandingTokenAmount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1728,
                          "src": "1294:29:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1748,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1294:31:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1746,
                      "name": "repayAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1818,
                      "src": "1282:11:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (uint256) returns (bool)"
                      }
                    },
                    "id": 1749,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1282:44:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1745,
                  "id": 1750,
                  "nodeType": "Return",
                  "src": "1275:51:7"
                }
              ]
            },
            "documentation": null,
            "id": 1752,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repay",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1742,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1238:2:7"
            },
            "returnParameters": {
              "id": 1745,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1744,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1752,
                  "src": "1259:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1743,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1259:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1258:6:7"
            },
            "scope": 1819,
            "src": "1224:109:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1817,
              "nodeType": "Block",
              "src": "1400:561:7",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1759,
                      "name": "isKTokenKEther",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1741,
                      "src": "1414:14:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                        "typeString": "function () view returns (bool)"
                      }
                    },
                    "id": 1760,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1414:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 1815,
                    "nodeType": "Block",
                    "src": "1707:248:7",
                    "statements": [
                      {
                        "assignments": [
                          1790
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1790,
                            "name": "token",
                            "nodeType": "VariableDeclaration",
                            "scope": 1815,
                            "src": "1721:12:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$3549",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 1789,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 3549,
                              "src": "1721:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3549",
                                "typeString": "contract IERC20"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 1795,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1792,
                                "name": "currentTokenAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1676,
                                "src": "1743:19:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                  "typeString": "function () view returns (address)"
                                }
                              },
                              "id": 1793,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1743:21:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 1791,
                            "name": "IERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3549,
                            "src": "1736:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IERC20_$3549_$",
                              "typeString": "type(contract IERC20)"
                            }
                          },
                          "id": 1794,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1736:29:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$3549",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1721:44:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1804,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 1800,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3648,
                                        "src": "1811:4:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                          "typeString": "contract KollateralInvokable"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                          "typeString": "contract KollateralInvokable"
                                        }
                                      ],
                                      "id": 1799,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1803:7:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 1801,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "1803:13:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 1797,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1790,
                                    "src": "1787:5:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$3549",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 1798,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "balanceOf",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3494,
                                  "src": "1787:15:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                    "typeString": "function (address) view external returns (uint256)"
                                  }
                                },
                                "id": 1802,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1787:30:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 1803,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1754,
                                "src": "1821:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1787:40:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a206e6f7420656e6f75676820746f6b656e2062616c616e6365",
                              "id": 1805,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1829:47:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_1e9e1d4a1c2118b5d1f9c40795869bbe1edb11ab72b598eac182bbe47bb952e7",
                                "typeString": "literal_string \"KollateralInvokable: not enough token balance\""
                              },
                              "value": "KollateralInvokable: not enough token balance"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_1e9e1d4a1c2118b5d1f9c40795869bbe1edb11ab72b598eac182bbe47bb952e7",
                                "typeString": "literal_string \"KollateralInvokable: not enough token balance\""
                              }
                            ],
                            "id": 1796,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              3599,
                              3600
                            ],
                            "referencedDeclaration": 3600,
                            "src": "1779:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1779:98:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1807,
                        "nodeType": "ExpressionStatement",
                        "src": "1779:98:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1810,
                                "name": "currentKTokenAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1663,
                                "src": "1913:20:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                  "typeString": "function () view returns (address)"
                                }
                              },
                              "id": 1811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1913:22:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 1812,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1754,
                              "src": "1937:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1808,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1790,
                              "src": "1898:5:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3549",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 1809,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3503,
                            "src": "1898:14:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 1813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1898:46:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 1758,
                        "id": 1814,
                        "nodeType": "Return",
                        "src": "1891:53:7"
                      }
                    ]
                  },
                  "id": 1816,
                  "nodeType": "IfStatement",
                  "src": "1410:545:7",
                  "trueBody": {
                    "id": 1788,
                    "nodeType": "Block",
                    "src": "1432:269:7",
                    "statements": [
                      {
                        "assignments": [
                          1762
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1762,
                            "name": "kEtherAddress",
                            "nodeType": "VariableDeclaration",
                            "scope": 1788,
                            "src": "1446:29:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            "typeName": {
                              "id": 1761,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1446:15:7",
                              "stateMutability": "payable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 1769,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 1765,
                                    "name": "currentKTokenAddress",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1663,
                                    "src": "1494:20:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                      "typeString": "function () view returns (address)"
                                    }
                                  },
                                  "id": 1766,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1494:22:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 1764,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1486:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint160_$",
                                  "typeString": "type(uint160)"
                                },
                                "typeName": "uint160"
                              },
                              "id": 1767,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1486:31:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            ],
                            "id": 1763,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1478:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 1768,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1478:40:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1446:72:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1776,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 1772,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3648,
                                      "src": "1548:4:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                        "typeString": "contract KollateralInvokable"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                        "typeString": "contract KollateralInvokable"
                                      }
                                    ],
                                    "id": 1771,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1540:7:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": "address"
                                  },
                                  "id": 1773,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1540:13:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "id": 1774,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balance",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "1540:21:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 1775,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1754,
                                "src": "1565:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1540:31:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a206e6f7420656e6f7567682065746865722062616c616e6365",
                              "id": 1777,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1573:47:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_06752d53a6cbf1de45be69db44c01534d24543bb6a8bb87072d1860dae7eec5d",
                                "typeString": "literal_string \"KollateralInvokable: not enough ether balance\""
                              },
                              "value": "KollateralInvokable: not enough ether balance"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_06752d53a6cbf1de45be69db44c01534d24543bb6a8bb87072d1860dae7eec5d",
                                "typeString": "literal_string \"KollateralInvokable: not enough ether balance\""
                              }
                            ],
                            "id": 1770,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              3599,
                              3600
                            ],
                            "referencedDeclaration": 3600,
                            "src": "1532:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1778,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1532:89:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1779,
                        "nodeType": "ExpressionStatement",
                        "src": "1532:89:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1783,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1754,
                              "src": "1658:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1780,
                              "name": "kEtherAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1762,
                              "src": "1635:13:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "id": 1782,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "1635:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 1784,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1635:30:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1785,
                        "nodeType": "ExpressionStatement",
                        "src": "1635:30:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 1786,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1686:4:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 1758,
                        "id": 1787,
                        "nodeType": "Return",
                        "src": "1679:11:7"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": null,
            "id": 1818,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repayAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1755,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1754,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 1818,
                  "src": "1360:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1753,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1360:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1359:16:7"
            },
            "returnParameters": {
              "id": 1758,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1757,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1818,
                  "src": "1394:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1756,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1394:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1393:6:7"
            },
            "scope": 1819,
            "src": "1339:622:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 1820,
        "src": "184:1779:7"
      }
    ],
    "src": "0:1964:7"
  },
  "legacyAST": {
    "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/helpers/KollateralInvokable.sol",
    "exportedSymbols": {
      "KollateralInvokable": [
        1819
      ]
    },
    "id": 1820,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1643,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:7"
      },
      {
        "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
        "file": "@openzeppelin/contracts/math/SafeMath.sol",
        "id": 1644,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 2904,
        "src": "25:51:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 1645,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 3550,
        "src": "77:56:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/Invoker.sol",
        "file": "../Invoker.sol",
        "id": 1646,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 422,
        "src": "134:24:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/KToken.sol",
        "file": "../KToken.sol",
        "id": 1647,
        "nodeType": "ImportDirective",
        "scope": 1820,
        "sourceUnit": 1117,
        "src": "159:23:7",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 1819,
        "linearizedBaseContracts": [
          1819
        ],
        "name": "KollateralInvokable",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 1650,
            "libraryName": {
              "contractScope": null,
              "id": 1648,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2903,
              "src": "225:8:7",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$2903",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "219:27:7",
            "typeName": {
              "id": 1649,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "238:7:7",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "body": {
              "id": 1662,
              "nodeType": "Block",
              "src": "316:66:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1656,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "341:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1657,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "341:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1655,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "333:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1658,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "333:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1659,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentKTokenAddress",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 352,
                      "src": "333:40:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                        "typeString": "function () view external returns (address)"
                      }
                    },
                    "id": 1660,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "333:42:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 1654,
                  "id": 1661,
                  "nodeType": "Return",
                  "src": "326:49:7"
                }
              ]
            },
            "documentation": null,
            "id": 1663,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentKTokenAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1651,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "281:2:7"
            },
            "returnParameters": {
              "id": 1654,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1653,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1663,
                  "src": "307:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1652,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "307:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "306:9:7"
            },
            "scope": 1819,
            "src": "252:130:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1675,
              "nodeType": "Block",
              "src": "451:65:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1669,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "476:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1670,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "476:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1668,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "468:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1671,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "468:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1672,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentTokenAddress",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 362,
                      "src": "468:39:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                        "typeString": "function () view external returns (address)"
                      }
                    },
                    "id": 1673,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "468:41:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "functionReturnParameters": 1667,
                  "id": 1674,
                  "nodeType": "Return",
                  "src": "461:48:7"
                }
              ]
            },
            "documentation": null,
            "id": 1676,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentTokenAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1664,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "416:2:7"
            },
            "returnParameters": {
              "id": 1667,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1666,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1676,
                  "src": "442:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 1665,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "442:7:7",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "441:9:7"
            },
            "scope": 1819,
            "src": "388:128:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1688,
              "nodeType": "Block",
              "src": "584:64:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1682,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "609:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1683,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "609:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1681,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "601:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1684,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "601:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1685,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentTokenAmount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 336,
                      "src": "601:38:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1686,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "601:40:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1680,
                  "id": 1687,
                  "nodeType": "Return",
                  "src": "594:47:7"
                }
              ]
            },
            "documentation": null,
            "id": 1689,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentTokenAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1677,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "549:2:7"
            },
            "returnParameters": {
              "id": 1680,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1679,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1689,
                  "src": "575:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1678,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "575:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "574:9:7"
            },
            "scope": 1819,
            "src": "522:126:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1701,
              "nodeType": "Block",
              "src": "720:68:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 1695,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3596,
                              "src": "745:3:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 1696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "745:10:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          ],
                          "id": 1694,
                          "name": "Invoker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 421,
                          "src": "737:7:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Invoker_$421_$",
                            "typeString": "type(contract Invoker)"
                          }
                        },
                        "id": 1697,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "737:19:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Invoker_$421",
                          "typeString": "contract Invoker"
                        }
                      },
                      "id": 1698,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentExpectedBalance",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 344,
                      "src": "737:42:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1699,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "737:44:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1693,
                  "id": 1700,
                  "nodeType": "Return",
                  "src": "730:51:7"
                }
              ]
            },
            "documentation": null,
            "id": 1702,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentExpectedBalance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1690,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "685:2:7"
            },
            "returnParameters": {
              "id": 1693,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1692,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1702,
                  "src": "711:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1691,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "711:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "710:9:7"
            },
            "scope": 1819,
            "src": "654:134:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1714,
              "nodeType": "Block",
              "src": "863:69:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1708,
                              "name": "currentKTokenAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1663,
                              "src": "887:20:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                "typeString": "function () view returns (address)"
                              }
                            },
                            "id": 1709,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "887:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 1707,
                          "name": "KToken",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1116,
                          "src": "880:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_KToken_$1116_$",
                            "typeString": "type(contract KToken)"
                          }
                        },
                        "id": 1710,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "880:30:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_KToken_$1116",
                          "typeString": "contract KToken"
                        }
                      },
                      "id": 1711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "totalReserve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1030,
                      "src": "880:43:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                        "typeString": "function () view external returns (uint256)"
                      }
                    },
                    "id": 1712,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "880:45:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1706,
                  "id": 1713,
                  "nodeType": "Return",
                  "src": "873:52:7"
                }
              ]
            },
            "documentation": null,
            "id": 1715,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentKTokenTotalReserve",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1703,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "828:2:7"
            },
            "returnParameters": {
              "id": 1706,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1705,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1715,
                  "src": "854:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1704,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "854:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "853:9:7"
            },
            "scope": 1819,
            "src": "794:138:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1727,
              "nodeType": "Block",
              "src": "1011:81:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1723,
                          "name": "currentKTokenTotalReserve",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1715,
                          "src": "1057:25:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1724,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1057:27:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1720,
                          "name": "currentExpectedBalance",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1702,
                          "src": "1028:22:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1721,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1028:24:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "id": 1722,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sub",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2759,
                      "src": "1028:28:7",
                      "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": 1725,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1028:57:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1719,
                  "id": 1726,
                  "nodeType": "Return",
                  "src": "1021:64:7"
                }
              ]
            },
            "documentation": null,
            "id": 1728,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currentOutstandingTokenAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1716,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "976:2:7"
            },
            "returnParameters": {
              "id": 1719,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1718,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1728,
                  "src": "1002:7:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1717,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1002:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1001:9:7"
            },
            "scope": 1819,
            "src": "938:154:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1740,
              "nodeType": "Block",
              "src": "1153:65:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "id": 1734,
                              "name": "currentKTokenAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1663,
                              "src": "1177:20:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                "typeString": "function () view returns (address)"
                              }
                            },
                            "id": 1735,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1177:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 1733,
                          "name": "KToken",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1116,
                          "src": "1170:6:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_KToken_$1116_$",
                            "typeString": "type(contract KToken)"
                          }
                        },
                        "id": 1736,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1170:30:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_KToken_$1116",
                          "typeString": "contract KToken"
                        }
                      },
                      "id": 1737,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "isKEther",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1025,
                      "src": "1170:39:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$",
                        "typeString": "function () view external returns (bool)"
                      }
                    },
                    "id": 1738,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1170:41:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1732,
                  "id": 1739,
                  "nodeType": "Return",
                  "src": "1163:48:7"
                }
              ]
            },
            "documentation": null,
            "id": 1741,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isKTokenKEther",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1729,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1121:2:7"
            },
            "returnParameters": {
              "id": 1732,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1731,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1741,
                  "src": "1147:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1730,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1147:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1146:6:7"
            },
            "scope": 1819,
            "src": "1098:120:7",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1751,
              "nodeType": "Block",
              "src": "1265:68:7",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "id": 1747,
                          "name": "currentOutstandingTokenAmount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1728,
                          "src": "1294:29:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                            "typeString": "function () view returns (uint256)"
                          }
                        },
                        "id": 1748,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1294:31:7",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1746,
                      "name": "repayAmount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1818,
                      "src": "1282:11:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (uint256) returns (bool)"
                      }
                    },
                    "id": 1749,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1282:44:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 1745,
                  "id": 1750,
                  "nodeType": "Return",
                  "src": "1275:51:7"
                }
              ]
            },
            "documentation": null,
            "id": 1752,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repay",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1742,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1238:2:7"
            },
            "returnParameters": {
              "id": 1745,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1744,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1752,
                  "src": "1259:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1743,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1259:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1258:6:7"
            },
            "scope": 1819,
            "src": "1224:109:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1817,
              "nodeType": "Block",
              "src": "1400:561:7",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 1759,
                      "name": "isKTokenKEther",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1741,
                      "src": "1414:14:7",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$",
                        "typeString": "function () view returns (bool)"
                      }
                    },
                    "id": 1760,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1414:16:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 1815,
                    "nodeType": "Block",
                    "src": "1707:248:7",
                    "statements": [
                      {
                        "assignments": [
                          1790
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1790,
                            "name": "token",
                            "nodeType": "VariableDeclaration",
                            "scope": 1815,
                            "src": "1721:12:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IERC20_$3549",
                              "typeString": "contract IERC20"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 1789,
                              "name": "IERC20",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 3549,
                              "src": "1721:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3549",
                                "typeString": "contract IERC20"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 1795,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1792,
                                "name": "currentTokenAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1676,
                                "src": "1743:19:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                  "typeString": "function () view returns (address)"
                                }
                              },
                              "id": 1793,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1743:21:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 1791,
                            "name": "IERC20",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3549,
                            "src": "1736:6:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_IERC20_$3549_$",
                              "typeString": "type(contract IERC20)"
                            }
                          },
                          "id": 1794,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1736:29:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IERC20_$3549",
                            "typeString": "contract IERC20"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1721:44:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1804,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 1800,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3648,
                                        "src": "1811:4:7",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                          "typeString": "contract KollateralInvokable"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                          "typeString": "contract KollateralInvokable"
                                        }
                                      ],
                                      "id": 1799,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "1803:7:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 1801,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "1803:13:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 1797,
                                    "name": "token",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1790,
                                    "src": "1787:5:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_IERC20_$3549",
                                      "typeString": "contract IERC20"
                                    }
                                  },
                                  "id": 1798,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "balanceOf",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 3494,
                                  "src": "1787:15:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                    "typeString": "function (address) view external returns (uint256)"
                                  }
                                },
                                "id": 1802,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "1787:30:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 1803,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1754,
                                "src": "1821:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1787:40:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a206e6f7420656e6f75676820746f6b656e2062616c616e6365",
                              "id": 1805,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1829:47:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_1e9e1d4a1c2118b5d1f9c40795869bbe1edb11ab72b598eac182bbe47bb952e7",
                                "typeString": "literal_string \"KollateralInvokable: not enough token balance\""
                              },
                              "value": "KollateralInvokable: not enough token balance"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_1e9e1d4a1c2118b5d1f9c40795869bbe1edb11ab72b598eac182bbe47bb952e7",
                                "typeString": "literal_string \"KollateralInvokable: not enough token balance\""
                              }
                            ],
                            "id": 1796,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              3599,
                              3600
                            ],
                            "referencedDeclaration": 3600,
                            "src": "1779:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1779:98:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1807,
                        "nodeType": "ExpressionStatement",
                        "src": "1779:98:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "id": 1810,
                                "name": "currentKTokenAddress",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1663,
                                "src": "1913:20:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                  "typeString": "function () view returns (address)"
                                }
                              },
                              "id": 1811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1913:22:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 1812,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1754,
                              "src": "1937:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1808,
                              "name": "token",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1790,
                              "src": "1898:5:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3549",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 1809,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3503,
                            "src": "1898:14:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 1813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1898:46:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 1758,
                        "id": 1814,
                        "nodeType": "Return",
                        "src": "1891:53:7"
                      }
                    ]
                  },
                  "id": 1816,
                  "nodeType": "IfStatement",
                  "src": "1410:545:7",
                  "trueBody": {
                    "id": 1788,
                    "nodeType": "Block",
                    "src": "1432:269:7",
                    "statements": [
                      {
                        "assignments": [
                          1762
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 1762,
                            "name": "kEtherAddress",
                            "nodeType": "VariableDeclaration",
                            "scope": 1788,
                            "src": "1446:29:7",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            "typeName": {
                              "id": 1761,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "1446:15:7",
                              "stateMutability": "payable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 1769,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [],
                                  "expression": {
                                    "argumentTypes": [],
                                    "id": 1765,
                                    "name": "currentKTokenAddress",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1663,
                                    "src": "1494:20:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                      "typeString": "function () view returns (address)"
                                    }
                                  },
                                  "id": 1766,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1494:22:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 1764,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1486:7:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint160_$",
                                  "typeString": "type(uint160)"
                                },
                                "typeName": "uint160"
                              },
                              "id": 1767,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1486:31:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            ],
                            "id": 1763,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "1478:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 1768,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1478:40:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1446:72:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1776,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 1772,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3648,
                                      "src": "1548:4:7",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                        "typeString": "contract KollateralInvokable"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_KollateralInvokable_$1819",
                                        "typeString": "contract KollateralInvokable"
                                      }
                                    ],
                                    "id": 1771,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "1540:7:7",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": "address"
                                  },
                                  "id": 1773,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "1540:13:7",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                },
                                "id": 1774,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balance",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "1540:21:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": ">=",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 1775,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 1754,
                                "src": "1565:6:7",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1540:31:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a206e6f7420656e6f7567682065746865722062616c616e6365",
                              "id": 1777,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1573:47:7",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_06752d53a6cbf1de45be69db44c01534d24543bb6a8bb87072d1860dae7eec5d",
                                "typeString": "literal_string \"KollateralInvokable: not enough ether balance\""
                              },
                              "value": "KollateralInvokable: not enough ether balance"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_06752d53a6cbf1de45be69db44c01534d24543bb6a8bb87072d1860dae7eec5d",
                                "typeString": "literal_string \"KollateralInvokable: not enough ether balance\""
                              }
                            ],
                            "id": 1770,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              3599,
                              3600
                            ],
                            "referencedDeclaration": 3600,
                            "src": "1532:7:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 1778,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1532:89:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1779,
                        "nodeType": "ExpressionStatement",
                        "src": "1532:89:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1783,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1754,
                              "src": "1658:6:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 1780,
                              "name": "kEtherAddress",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1762,
                              "src": "1635:13:7",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "id": 1782,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "1635:22:7",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 1784,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1635:30:7",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1785,
                        "nodeType": "ExpressionStatement",
                        "src": "1635:30:7"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "hexValue": "74727565",
                          "id": 1786,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "bool",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1686:4:7",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "value": "true"
                        },
                        "functionReturnParameters": 1758,
                        "id": 1787,
                        "nodeType": "Return",
                        "src": "1679:11:7"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": null,
            "id": 1818,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repayAmount",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1755,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1754,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 1818,
                  "src": "1360:14:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1753,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1360:7:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1359:16:7"
            },
            "returnParameters": {
              "id": 1758,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1757,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1818,
                  "src": "1394:4:7",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 1756,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1394:4:7",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1393:6:7"
            },
            "scope": 1819,
            "src": "1339:622:7",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 1820,
        "src": "184:1779:7"
      }
    ],
    "src": "0:1964:7"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.20",
  "updatedAt": "2020-02-01T23:51:00.342Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}