fluid-contracts-public/deployments/mainnet/fToken_fUSDT_LendingRewards.json

279 lines
34 KiB
JSON
Raw Normal View History

{
"address": "0xf6109Ad48f5Cf9e28938774aD4069C90f81D648E",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "duration_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startTvl_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rewardAmount_",
"type": "uint256"
},
{
"internalType": "address",
"name": "initiator_",
"type": "address"
},
{
"internalType": "contract IFluidLendingRewardsRateModel",
"name": "previousModel_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidLendingError",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
}
],
"name": "LogRewardsStarted",
"type": "event"
},
{
"inputs": [],
"name": "PREVIOUS_MODEL",
"outputs": [
{
"internalType": "contract IFluidLendingRewardsRateModel",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getConfig",
"outputs": [
{
"internalType": "uint256",
"name": "duration_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startTime_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "startTvl_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxRate_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "rewardAmount_",
"type": "uint256"
},
{
"internalType": "address",
"name": "initiator_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalAssets_",
"type": "uint256"
}
],
"name": "getRate",
"outputs": [
{
"internalType": "uint256",
"name": "rate_",
"type": "uint256"
},
{
"internalType": "bool",
"name": "ended_",
"type": "bool"
},
{
"internalType": "uint256",
"name": "startTime_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "start",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"args": [
2592000,
"1000000000",
"250000000000",
"0x0000000000000000000000000000000000000000",
"0x2005617238a8E1C153D19A33fd32fB168f3626e7"
],
"numDeployments": 5,
"solcInputHash": "ec1c69ef8765d39cbaaa5d49219c88a4",
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"duration_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startTvl_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator_\",\"type\":\"address\"},{\"internalType\":\"contract IFluidLendingRewardsRateModel\",\"name\":\"previousModel_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorId_\",\"type\":\"uint256\"}],\"name\":\"FluidLendingError\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endTime\",\"type\":\"uint256\"}],\"name\":\"LogRewardsStarted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PREVIOUS_MODEL\",\"outputs\":[{\"internalType\":\"contract IFluidLendingRewardsRateModel\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"duration_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startTime_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"endTime_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startTvl_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxRate_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"totalAssets_\",\"type\":\"uint256\"}],\"name\":\"getRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate_\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"ended_\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"startTime_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"start\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"duration_\":\"for how long rewards should run\",\"initiator_\":\"address which has access to kickstart the rewards, if previousModel is address zero\",\"previousModel_\":\"address of previously active lendingRewardsRateModel. can be zero address if none.\",\"rewardAmount_\":\"total amount of underlying asset to be distributed as rewards\",\"startTvl_\":\"tvl below which rate is 0\"}},\"getRate(uint256)\":{\"params\":{\"totalAssets_\":\"amount of assets in the lending\"},\"returns\":{\"ended_\":\"flag to signal that rewards have ended (always 0 going forward)\",\"rate_\":\"rewards rate percentage per year with 1e12 RATE_PRECISION, e.g. 1e12 = 1%, 1e14 = 100%\",\"startTime_\":\"start time of rewards to compare against last update timestamp\"}}},\"stateVariables\":{\"DURATION\":{\"details\":\"for how long rewards should run\"},\"INITIATOR\":{\"details\":\"address which has access to call start() which kickstarts the rewards\"},\"MAX_RATE\":{\"details\":\"maximum rewards rate is 50%. no config higher than this should be possible.\"},\"PREVIOUS_MODEL\":{\"details\":\"address of the previously active lending rewards rate model for smooth transition. Can be zero address if none.\"},\"PREVIOUS_MODEL_END_TIME\":{\"details\":\"end time of previous lending rewards rate model. 0 if there is no previous model.\"},\"RATE_PRECISION\":{\"details\":\"precision decimals for rewards rate\"},\"REWARD_AMOUNT\":{\"details\":\"total amounts to be distributed. not needed but stored for easier tracking via `getConfig`\"},\"START_TVL\":{\"details\":\"tvl below which rewards rate is 0\"},\"YEARLY_REWARD\":{\"details\":\"annualized reward based on constructor input p
"bytecode": "0x6101606040523480156200001257600080fd5b5060405162000b1738038062000b17833981016040819052620000359162000257565b84158062000041575082155b806200004b575083155b806200007157506001600160a01b0382161580156200007157506001600160a01b038116155b15620000995760405163694bda1d60e01b81526159d960048201526024015b60405180910390fd5b608084905260a085905260e08390526001600160a01b0382166101005284620000c76301e1338085620002c9565b620000d39190620002e9565b60c0526001600160a01b0381161562000233576001600160a01b038116610120819052604080516330fe427560e21b8152905163c3f909d49160048082019260e0929091908290030181865afa15801562000132573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200015891906200030c565b5050506101408290525060000391506200018c90505760405163694bda1d60e01b81526159d9600482015260240162000090565b61014051600080546001600160601b0319166001600160601b03831617905560a051620001b9916200036f565b600080546001600160601b039283166c01000000000000000000000000908102600160601b600160c01b0319831681179384905560408051918616938616939093178152920490921660208201527fc46a00a5f8de6e404178aaf0795f118716058fca1012ad21f1e0253a05188c44910160405180910390a15b505050505062000385565b6001600160a01b03811681146200025457600080fd5b50565b600080600080600060a086880312156200027057600080fd5b855194506020860151935060408601519250606086015162000292816200023e565b6080870151909250620002a5816200023e565b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620002e357620002e3620002b3565b92915050565b6000826200030757634e487b7160e01b600052601260045260246000fd5b500490565b600080600080600080600060e0888a0312156200032857600080fd5b875196506020880151955060408801519450606088015193506080880151925060a0880151915060c08801516200035f816200023e565b8091505092959891949750929550565b80820180821115620002e357620002e3620002b3565b60805160a05160c05160e05161010051610120516101405161071c620003fb60003960006101340152600081816089015261018801526000818161033101526105d0015260006105ad015260006102a701526000818161044c015261051801526000818161026e015261055c015261071c6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063577640941461005157806379b9b28f14610084578063be9a6555146100d0578063c3f909d4146100da575b600080fd5b61006461005f3660046105f5565b61012d565b604080519384529115156020840152908201526060015b60405180910390f35b6100ab7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161007b565b6100d8610319565b005b6100e2610506565b604080519788526020880196909652948601939093526060850191909152608084015260a083015273ffffffffffffffffffffffffffffffffffffffff1660c082015260e00161007b565b60008060007f00000000000000000000000000000000000000000000000000000000000000004211610213576040517f57764094000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690635776409490602401606060405180830381865afa1580156101e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610208919061060e565b925092509250610312565b506000546bffffffffffffffffffffffff808216916c01000000000000000000000000900416811580610244575080155b15610256576000809350935050610312565b8042111561026c57600060019350935050610312565b7f00000000000000000000000000000000000000000000000000000000000000008510156102a1576000809350935050610312565b846102d27f0000000000000000000000000000000000000000000000000000000000000000655af3107a400061067b565b6102dc9190610698565b93506102ee64e8d4a51000603261067b565b84116102fa578361030a565b61030a64e8d4a51000603261067b565b600093509350505b9193909250565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610391576040517f694bda1d0000000000000000000000000000000000000000000000000000000081526159db60048201526024015b60405180910390fd5b6000546bffffffffffffffffffffffff161515806103ce57506000546c0100000000000000000000000090046bffffffffffffffffffffffff1615155b15610409576040517f694bda1d0000000000000000000000000000000000000000000000000000000081526159
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063577640941461005157806379b9b28f14610084578063be9a6555146100d0578063c3f909d4146100da575b600080fd5b61006461005f3660046105f5565b61012d565b604080519384529115156020840152908201526060015b60405180910390f35b6100ab7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161007b565b6100d8610319565b005b6100e2610506565b604080519788526020880196909652948601939093526060850191909152608084015260a083015273ffffffffffffffffffffffffffffffffffffffff1660c082015260e00161007b565b60008060007f00000000000000000000000000000000000000000000000000000000000000004211610213576040517f57764094000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690635776409490602401606060405180830381865afa1580156101e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610208919061060e565b925092509250610312565b506000546bffffffffffffffffffffffff808216916c01000000000000000000000000900416811580610244575080155b15610256576000809350935050610312565b8042111561026c57600060019350935050610312565b7f00000000000000000000000000000000000000000000000000000000000000008510156102a1576000809350935050610312565b846102d27f0000000000000000000000000000000000000000000000000000000000000000655af3107a400061067b565b6102dc9190610698565b93506102ee64e8d4a51000603261067b565b84116102fa578361030a565b61030a64e8d4a51000603261067b565b600093509350505b9193909250565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610391576040517f694bda1d0000000000000000000000000000000000000000000000000000000081526159db60048201526024015b60405180910390fd5b6000546bffffffffffffffffffffffff161515806103ce57506000546c0100000000000000000000000090046bffffffffffffffffffffffff1615155b15610409576040517f694bda1d0000000000000000000000000000000000000000000000000000000081526159dc6004820152602401610388565b600080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016426bffffffffffffffffffffffff811691909117909155610471907f0000000000000000000000000000000000000000000000000000000000000000906106d3565b600080546bffffffffffffffffffffffff9283166c010000000000000000000000009081027fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff831681179384905560408051918616938616939093178152920490921660208201527fc46a00a5f8de6e404178aaf0795f118716058fca1012ad21f1e0253a05188c44910160405180910390a1565b600080548190819081908190819081907f0000000000000000000000000000000000000000000000000000000000000000906bffffffffffffffffffffffff808216916c010000000000000000000000009004167f000000000000000000000000000000000000000000000000000000000000000061058b64e8d4a51000603261067b565b939b6bffffffffffffffffffffffff9384169b509190921698509096509094507f000000000000000000000000000000000000000000000000000000000000000093507f000000000000000000000000000000000000000000000000000000000000000092509050565b60006020828403121561060757600080fd5b5035919050565b60008060006060848603121561062357600080fd5b835192506020840151801515811461063a57600080fd5b80925050604084015190509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176106925761069261064c565b92915050565b6000826106ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b808201808211156106925761069261064c56fea2646970667358221220281dbcf0c11792a93a5ef1bfe2f3d4b5d37b898989f73f07c2bf41e30326875264736f6c63430008150033",
"devdoc": {
"kind": "dev",
"methods": {
"constructor": {
"params": {
"duration_": "for how long rewards should run",
"initiator_": "address which has access to kickstart the rewards, if previousModel is address zero",
"previousModel_": "address of previously active lendingRewardsRateModel. can be zero address if none.",
"rewardAmount_": "total amount of underlying asset to be distributed as rewards",
"startTvl_": "tvl below which rate is 0"
}
},
"getRate(uint256)": {
"params": {
"totalAssets_": "amount of assets in the lending"
},
"returns": {
"ended_": "flag to signal that rewards have ended (always 0 going forward)",
"rate_": "rewards rate percentage per year with 1e12 RATE_PRECISION, e.g. 1e12 = 1%, 1e14 = 100%",
"startTime_": "start time of rewards to compare against last update timestamp"
}
}
},
"stateVariables": {
"DURATION": {
"details": "for how long rewards should run"
},
"INITIATOR": {
"details": "address which has access to call start() which kickstarts the rewards"
},
"MAX_RATE": {
"details": "maximum rewards rate is 50%. no config higher than this should be possible."
},
"PREVIOUS_MODEL": {
"details": "address of the previously active lending rewards rate model for smooth transition. Can be zero address if none."
},
"PREVIOUS_MODEL_END_TIME": {
"details": "end time of previous lending rewards rate model. 0 if there is no previous model."
},
"RATE_PRECISION": {
"details": "precision decimals for rewards rate"
},
"REWARD_AMOUNT": {
"details": "total amounts to be distributed. not needed but stored for easier tracking via `getConfig`"
},
"START_TVL": {
"details": "tvl below which rewards rate is 0"
},
"YEARLY_REWARD": {
"details": "annualized reward based on constructor input params (duration, rewardAmount)"
},
"endTime": {
"details": "when rewards will get over"
},
"startTime": {
"details": "when rewards got started"
}
},
"title": "LendingRewardsRateModel",
"version": 1
},
"userdoc": {
"events": {
"LogRewardsStarted(uint256,uint256)": {
"notice": "Emitted when rewards are started"
}
},
"kind": "user",
"methods": {
"constructor": {
"notice": "sets immutable vars for rewards rate config based on input params."
},
"getConfig()": {
"notice": "Returns config constants for rewards rate model"
},
"getRate(uint256)": {
"notice": "Calculates the current rewards rate (APR)"
}
},
"notice": "Calculates rewards rate used for an fToken based on a rewardAmount over a given duration. Rewards start once the allowed initiator address triggers `start()` and only accrue above a certain startTVL. Max rate cap is at 50%.",
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 192,
"contract": "contracts/protocols/lending/lendingRewardsRateModel/main.sol:FluidLendingRewardsRateModel",
"label": "startTime",
"offset": 0,
"slot": "0",
"type": "t_uint96"
},
{
"astId": 195,
"contract": "contracts/protocols/lending/lendingRewardsRateModel/main.sol:FluidLendingRewardsRateModel",
"label": "endTime",
"offset": 12,
"slot": "0",
"type": "t_uint96"
}
],
"types": {
"t_uint96": {
"encoding": "inplace",
"label": "uint96",
"numberOfBytes": "12"
}
}
}
}