[ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "fromUser", "type": "address" }, { "indexed": true, "internalType": "address", "name": "toUser", "type": "address" }, { "indexed": false, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "BorrowAllowanceDelegated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "underlyingAsset", "type": "address" }, { "indexed": true, "internalType": "address", "name": "pool", "type": "address" }, { "indexed": false, "internalType": "address", "name": "incentivesController", "type": "address" }, { "indexed": false, "internalType": "uint8", "name": "debtTokenDecimals", "type": "uint8" }, { "indexed": false, "internalType": "string", "name": "debtTokenName", "type": "string" }, { "indexed": false, "internalType": "string", "name": "debtTokenSymbol", "type": "string" }, { "indexed": false, "internalType": "bytes", "name": "params", "type": "bytes" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [], "name": "DEBT_TOKEN_REVISION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "POOL", "outputs": [ { "internalType": "contract ILendingPool", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UNDERLYING_ASSET_ADDRESS", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "delegatee", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "approveDelegation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "fromUser", "type": "address" }, { "internalType": "address", "name": "toUser", "type": "address" } ], "name": "borrowAllowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } ], "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getAssetPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getIncentivesController", "outputs": [ { "internalType": "contract IAaveIncentivesController", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "getScaledUserBalanceAndSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "addedValue", "type": "uint256" } ], "name": "increaseAllowance", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract ILendingPool", "name": "pool", "type": "address" }, { "internalType": "address", "name": "underlyingAsset", "type": "address" }, { "internalType": "contract IAaveIncentivesController", "name": "incentivesController", "type": "address" }, { "internalType": "uint8", "name": "debtTokenDecimals", "type": "uint8" }, { "internalType": "string", "name": "debtTokenName", "type": "string" }, { "internalType": "string", "name": "debtTokenSymbol", "type": "string" }, { "internalType": "bytes", "name": "params", "type": "bytes" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "mint", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "name": "scaledBalanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "scaledTotalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ]
608060405260006007553480156200001657600080fd5b50604080518082018252600e8082526d111150951513d2d15397d253541360921b60208084018281528551808701909652928552840152815191929160009162000064916003919062000098565b5081516200007a90600490602085019062000098565b506005805460ff191660ff9290921691909117905550620001349050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000db57805160ff19168380011785556200010b565b828001600101855582156200010b579182015b828111156200010b578251825591602001919060010190620000ee565b50620001199291506200011d565b5090565b5b808211156200011957600081556001016200011e565b6119b180620001446000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806395d89b41116100c3578063b9a7b6221161007c578063b9a7b62214610419578063c04a8a1014610421578063c222ec8a1461044f578063dd62ed3e146105f8578063e54f088014610626578063f5298aca1461062e57610158565b806395d89b4114610399578063a457c2d7146102ed578063a9059cbb146103a1578063b16a19de146103cd578063b1bf962d146103d5578063b3f1c93d146103dd57610158565b8063313ce56711610115578063313ce567146102cf57806339509351146102ed5780636bd76d241461031957806370a08231146103475780637535d2461461036d57806375d264131461039157610158565b806306fdde031461015d578063095ea7b3146101da5780630afbcdc91461021a57806318160ddd146102595780631da24f3e1461027357806323b872dd14610299575b600080fd5b610165610660565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019f578181015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610206600480360360408110156101f057600080fd5b506001600160a01b0381351690602001356106f6565b604080519115158252519081900360200190f35b6102406004803603602081101561023057600080fd5b50356001600160a01b031661073e565b6040805192835260208301919091528051918290030190f35b61026161075b565b60408051918252519081900360200190f35b6102616004803603602081101561028957600080fd5b50356001600160a01b03166107f4565b610206600480360360608110156102af57600080fd5b506001600160a01b03813581169160208101359091169060400135610807565b6102d761084f565b6040805160ff9092168252519081900360200190f35b6102066004803603604081101561030357600080fd5b506001600160a01b038135169060200135610858565b6102616004803603604081101561032f57600080fd5b506001600160a01b03813581169160200135166108a7565b6102616004803603602081101561035d57600080fd5b50356001600160a01b03166108d4565b610375610984565b604080516001600160a01b039092168252519081900360200190f35b610375610998565b6101656109a2565b610206600480360360408110156103b757600080fd5b506001600160a01b038135169060200135610807565b610375610a03565b610261610a12565b610206600480360360808110156103f357600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610a1c565b610261610c35565b61044d6004803603604081101561043757600080fd5b506001600160a01b038135169060200135610c3a565b005b61044d600480360360e081101561046557600080fd5b6001600160a01b038235811692602081013582169260408201359092169160ff606083013516919081019060a0810160808201356401000000008111156104ab57600080fd5b8201836020820111156104bd57600080fd5b803590602001918460018302840111640100000000831117156104df57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561053257600080fd5b82018360208201111561054457600080fd5b8035906020019184600183028401116401000000008311171561056657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156105b957600080fd5b8201836020820111156105cb57600080fd5b803590602001918460018302840111640100000000831117156105ed57600080fd5b509092509050610cd6565b6102616004803603604081101561060e57600080fd5b506001600160a01b0381358116916020013516610858565b610261610f69565b61044d6004803603606081101561064457600080fd5b506001600160a01b0381351690602081013590604001356110db565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ec5780601f106106c1576101008083540402835291602001916106ec565b820191906000526020600020905b8154815290600101906020018083116106cf57829003601f168201915b5050505050905090565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60008061074a8361126f565b61075261128a565b91509150915091565b6005546006546040805163386497fd60e01b81526001600160a01b03928316600482015290516000936107ef93610100909104169163386497fd916024808301926020929190829003018186803b1580156107b557600080fd5b505afa1580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b50516107e961128a565b90611290565b905090565b60006107ff8261126f565b90505b919050565b6040805162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60055460ff1690565b6040805162461bcd60e51b815260206004820152601760248201527f414c4c4f57414e43455f4e4f545f535550504f525445440000000000000000006044820152905160009181900360640190fd5b6001600160a01b038083166000908152603b60209081526040808320938516835292905220545b92915050565b6000806108e08361126f565b9050806108f1576000915050610802565b6005546006546040805163386497fd60e01b81526001600160a01b039283166004820152905161097d9361010090049092169163386497fd91602480820192602092909190829003018186803b15801561094a57600080fd5b505afa15801561095e573d6000803e3d6000fd5b505050506040513d602081101561097457600080fd5b50518290611290565b9392505050565b60055461010090046001600160a01b031690565b60006107ef61134e565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ec5780601f106106c1576101008083540402835291602001916106ec565b6006546001600160a01b031690565b60006107ef61128a565b6000610a26610984565b6001600160a01b0316610a3761135d565b6001600160a01b03161460405180604001604052806002815260200161323960f01b81525090610ae55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610aaa578181015183820152602001610a92565b50505050905090810190601f168015610ad75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50836001600160a01b0316856001600160a01b031614610b0a57610b0a848685611361565b6000610b158561126f565b90506000610b238585611429565b6040805180820190915260028152611a9b60f11b602082015290915081610b8b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b50610b968682611530565b6040805186815290516001600160a01b038816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3856001600160a01b0316876001600160a01b03167f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee8787604051808381526020018281526020019250505060405180910390a3501595945050505050565b600781565b80603b6000610c4761135d565b6001600160a01b0390811682526020808301939093526040918201600090812091871680825291909352912091909155610c7f61135d565b6001600160a01b03167fda919360433220e13b51e8c211e490d148e61a3bd53de8c097194e458b97f3e1610cb1610a03565b604080516001600160a01b039092168252602082018690528051918290030190a35050565b6000610ce061168c565b60085490915060ff1680610cf75750610cf7611691565b80610d03575060075481115b610d3e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061192d602e913960400191505060405180910390fd5b60085460ff16158015610d5e576008805460ff1916600117905560078290555b610d6786611697565b610d70856116ae565b610d79876116c1565b89600560016101000a8154816001600160a01b0302191690836001600160a01b0316021790555088600660006101000a8154816001600160a01b0302191690836001600160a01b0316021790555087603c60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550896001600160a01b0316896001600160a01b03167f40251fbfb6656cfa65a00d7879029fec1fad21d28fdcff2f4f68f52795b74f2c8a8a8a8a8a8a60405180876001600160a01b031681526020018660ff168152602001806020018060200180602001848103845288818151815260200191508051906020019080838360005b83811015610e86578181015183820152602001610e6e565b50505050905090810190601f168015610eb35780820380516001836020036101000a031916815260200191505b50848103835287518152875160209182019189019080838360005b83811015610ee6578181015183820152602001610ece565b50505050905090810190601f168015610f135780820380516001836020036101000a031916815260200191505b508481038252858152602001868680828437600083820152604051601f909101601f19169092018290039b50909950505050505050505050a38015610f5d576008805460ff191690555b50505050505050505050565b600080600560019054906101000a90046001600160a01b03166001600160a01b031663fe65acfe6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b505160408051631f94a27560e31b815290519192506000916001600160a01b0384169163fca513a8916004808301926020929190829003018186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b50516006546040805163b3596f0760e01b81526001600160a01b03928316600482015290519293509083169163b3596f0791602480820192602092909190829003018186803b1580156110a857600080fd5b505afa1580156110bc573d6000803e3d6000fd5b505050506040513d60208110156110d257600080fd5b50519250505090565b6110e3610984565b6001600160a01b03166110f461135d565b6001600160a01b03161460405180604001604052806002815260200161323960f01b815250906111655760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b5060006111728383611429565b60408051808201909152600281526106a760f31b6020820152909150816111da5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b506111e584826116d7565b6040805184815290516000916001600160a01b038716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3604080518481526020810184905281516001600160a01b038716927f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a928290030190a250505050565b6001600160a01b031660009081526020819052604090205490565b60025490565b600082158061129d575081155b156112aa575060006108ce565b816b019d971e4fe8401e7400000019816112c057fe5b0483111560405180604001604052806002815260200161068760f31b8152509061132b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b50506b033b2e3c9fd0803ce800000091026b019d971e4fe8401e74000000010490565b603c546001600160a01b031690565b3390565b6040805180820182526002815261353960f01b6020808301919091526001600160a01b038087166000908152603b835284812091871681529152918220546113aa91849061177c565b6001600160a01b038086166000818152603b60209081526040808320948916808452949091529020839055919250907fda919360433220e13b51e8c211e490d148e61a3bd53de8c097194e458b97f3e1611402610a03565b604080516001600160a01b039092168252602082018690528051918290030190a350505050565b604080518082019091526002815261035360f41b6020820152600090826114915760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b5060408051808201909152600280825261068760f31b60208301528304906b033b2e3c9fd0803ce800000082190485111561150d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b5082816b033b2e3c9fd0803ce80000008602018161152757fe5b04949350505050565b6001600160a01b03821661158b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611597600083836117d6565b6002546000906115a790836117db565b60028190556001600160a01b038416600090815260208190526040812054919250906115d390846117db565b6001600160a01b03851660009081526020819052604081208290559091506115f961134e565b6001600160a01b0316146116865761160f61134e565b6001600160a01b03166331873e2e8583856040518463ffffffff1660e01b815260040180846001600160a01b031681526020018381526020018281526020019350505050600060405180830381600087803b15801561166d57600080fd5b505af1158015611681573d6000803e3d6000fd5b505050505b50505050565b600790565b303b1590565b80516116aa906003906020840190611877565b5050565b80516116aa906004906020840190611877565b6005805460ff191660ff92909216919091179055565b6001600160a01b03821661171c5760405162461bcd60e51b815260040180806020018281038252602181526020018061195b6021913960400191505060405180910390fd5b611728826000836117d6565b6002546000906117389083611835565b90508060028190555060006115d38360405180606001604052806022815260200161190b602291396001600160a01b03871660009081526020819052604090205491905b600081848411156117ce5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610aaa578181015183820152602001610a92565b505050900390565b505050565b60008282018381101561097d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061097d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061177c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118b857805160ff19168380011785556118e5565b828001600101855582156118e5579182015b828111156118e55782518255916020019190600101906118ca565b506118f19291506118f5565b5090565b5b808211156118f157600081556001016118f656fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a206275726e2066726f6d20746865207a65726f2061646472657373a2646970667358221220a019633c411e8c23309c1abd9d1dcf6fc915c301c0173a6feef0deb79ec4c31364736f6c634300060c0033