3 txs
8 calls
constructor
constructor(address _stable, address _core, address _staked, address[5] _receivers, uint32[5] _weights)
functions
core
viewfunction core() view returns (address)
pendingReceivers
viewfunction pendingReceivers(uint256) view returns (address)
pendingValidAt
viewfunction pendingValidAt() view returns (uint256)
pendingWeights
viewfunction pendingWeights(uint256) view returns (uint32)
receivers
viewfunction receivers(uint256) view returns (address)
stable
viewfunction stable() view returns (address)
staked
viewfunction staked() view returns (address)
totalAssets
viewfunction totalAssets() view returns (uint256)
totalMinted
viewfunction totalMinted() view returns (uint256)
totalRevenue
viewfunction totalRevenue() view returns (uint256)
totalWeights
viewfunction totalWeights() view returns (uint256)
weights
viewfunction weights(uint256) view returns (uint32)
applyDistribution
nonpayablefunction applyDistribution()
deposit
nonpayablefunction deposit(uint256 amount)
reconcile
nonpayablefunction reconcile()
redeem
nonpayablefunction redeem(uint256 sharesStaked)
revokePendingDistribution
nonpayablefunction revokePendingDistribution()
setDistribution
nonpayablefunction setDistribution(address[5] _receivers, uint32[5] _weights)
events
Deposit
event Deposit(uint256 amount, uint256 sharesCore, uint256 sharesStaked, uint256 totalMinted)
Distribution
event Distribution(address indexed receiver, uint256 amount, uint256 ratio)
Redeem
event Redeem(uint256 amount, uint256 sharesCore, uint256 sharesStaked, uint256 totalMinted)
Revenue
event Revenue(uint256 amount, uint256 totalRevenue, uint256 totalMinted)
RevokeDistribution
event RevokeDistribution(address indexed caller)
SetDistribution
event SetDistribution(address indexed caller)
SubmitDistribution
event SubmitDistribution(address indexed caller, address[5] receivers, uint32[5] weights, uint256 timelock)
errors
AlreadyPending
error AlreadyPending()
ForwardCallFailed
error ForwardCallFailed(address forwardedTo)
MismatchLength
error MismatchLength(uint256 receivers, uint256 weights)
NoPendingValue
error NoPendingValue()
NothingToReconcile
error NothingToReconcile(uint256 assets, uint256 minted)
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
TimelockNotElapsed
error TimelockNotElapsed()
creation bytecode
0x60e06040523480156200001157600080fd5b5060405162001f4038038062001f40833981016040819052620000349162000310565b6001600160a01b0380861660805284811660a052831660c05262000059828262000064565b505050505062000446565b600060088190555b60058163ffffffff161015620000d057818163ffffffff1660058110620000975762000097620003d8565b602002015163ffffffff1660086000828254620000b5919062000404565b90915550819050620000c78162000420565b9150506200006c565b50620000e0600283600562000149565b50620000f06007826005620001a6565b5060405133907ff085c57737528946971c505b4c9d6f7ca7ab5925b0cee78d8cb75797f36f362890600090a26200014560006009819055600a819055600b819055600c819055600d556000600e556000600f55565b5050565b826005810192821562000194579160200282015b828111156200019457825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200015d565b50620001a29291506200023f565b5090565b600183019183908215620001945791602002820160005b838211156200020357835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302620001bd565b8015620002355782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000203565b5050620001a29291505b5b80821115620001a2576000815560010162000240565b6001600160a01b03811681146200026c57600080fd5b50565b60405160a081016001600160401b0381118282101715620002a057634e487b7160e01b600052604160045260246000fd5b60405290565b600082601f830112620002b857600080fd5b620002c26200026f565b8060a0840185811115620002d557600080fd5b845b818110156200030557805163ffffffff81168114620002f65760008081fd5b845260209384019301620002d7565b509095945050505050565b60008060008060006101a086880312156200032a57600080fd5b8551620003378162000256565b809550506020808701516200034c8162000256565b60408801519095506200035f8162000256565b9350607f870188136200037157600080fd5b6200037b6200026f565b8061010089018a8111156200038f57600080fd5b60608a015b81811015620003b8578051620003aa8162000256565b845292840192840162000394565b50819550620003c88b82620002a6565b9450505050509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156200041a576200041a620003ee565b92915050565b600063ffffffff8083168181036200043c576200043c620003ee565b6001019392505050565b60805160a05160c051611a226200051e6000396000818161013b015281816102bd015281816109bf01528181610a0301528181610b7c0152610bd2015260008181610279015281816103a8015281816108d5015281816109190152818161099d01528181610c4e0152610ca401526000818161018f0152818161042b0152818161055d0152818161079201528181610829015281816108b301528181610ae701528181610d3a01528181610ddc01528181610e5d01528181610f360152818161114c015281816113e4015261149e0152611a226000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063a2309ff8116100a2578063bfd772fc11610071578063bfd772fc1461023d578063c5d3b71514610250578063db006a7514610259578063ef4087a31461026c578063f2f4eb261461027457600080fd5b8063a2309ff814610205578063b5f163ff1461020e578063b6b55f2514610221578063bf2d9e0b1461023457600080fd5b806329aa0025116100e957806329aa0025146101b15780633fdd9b82146101c45780638338350a146101cc5780638f0d7e35146101f4578063926323d5146101fc57600080fd5b806301e1d1141461011b5780630b76619b14610136578063206daf311461017557806322be3de11461018a575b600080fd5b61012361029b565b6040519081526020015b60405180910390f35b61015d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161012d565b610188610183366004611802565b610421565b005b61015d7f000000000000000000000000000000000000000000000000000000000000000081565b61015d6101bf366004611838565b610635565b610188610655565b6101df6101da366004611838565b610736565b60405163ffffffff909116815260200161012d565b610188610766565b61012360085481565b61012360005481565b6101df61021c366004611838565b610778565b61018861022f366004611838565b610788565b61012360015481565b61015d61024b366004611838565b610acd565b610123600f5481565b610188610267366004611838565b610add565b610188610f2c565b61015d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906307a2d13a9082906370a0823190602401602060405180830381865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190611851565b6040518263ffffffff1660e01b815260040161034e91815260200190565b602060405180830381865afa15801561036b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038f9190611851565b6040516303d1689d60e11b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307a2d13a90602401602060405180830381865afa1580156103f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041b9190611851565b91505090565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e1487a8c336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160006040518083038186803b15801561049057600080fd5b505afa1580156104a4573d6000803e3d6000fd5b506104b792505050565b60405180910390fd5b600f54156104d8576040516324d9026760e11b815260040160405180910390fd5b6002546001600160a01b031661053f576040805160a081810190925261053b9184906005908390839080828437600092019190915250506040805160a081810190925291508490600590839083908082843760009201919091525061102b915050565b5050565b61054c6009836005611647565b5061055a600e82600561169d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d33219b46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105dd9190611851565b6105e79042611896565b600f55336001600160a01b03167f281992c4893624a98b0dd2363058366a77210bc570ab81a92f2fb5a9620fa9138383600f54604051610629939291906118a9565b60405180910390a25050565b6009816005811061064557600080fd5b01546001600160a01b0316905081565b600f54806000036106795760405163e5f408a560e01b815260040160405180910390fd5b8042101561069a5760405163333bd2cb60e11b815260040160405180910390fd5b6040805160a08101918290526107339160099060059082845b81546001600160a01b031681526001909101906020018083116106b35750506040805160a08101918290529350600e925060059150826000855b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116106ed579050505050505061102b565b50565b600e816005811061074657600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b61073361077161029b565b60006110fe565b6007816005811061074657600080fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e1487a8c336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160006040518083038186803b1580156107f757600080fd5b505afa15801561080b573d6000803e3d6000fd5b5050604051631bf8922760e11b8152306004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506337f1244e9150604401600060405180830381600087803b15801561087757600080fd5b505af115801561088b573d6000803e3d6000fd5b50505050806000808282546108a09190611896565b909155506108fa90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611256565b604051636e553f6560e01b8152600481018290523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636e553f65906044016020604051808303816000875af115801561096a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098e9190611851565b90506109e46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611256565b604051636e553f6560e01b8152600481018290523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636e553f65906044016020604051808303816000875af1158015610a54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a789190611851565b600054604080518681526020810186905290810183905260608101919091529091507f9b776d199f09c774f5b205c9bc2ac6f40d508c347aaea919867eeaf06ebef0e9906080015b60405180910390a1505050565b6002816005811061064557600080fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e1487a8c336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160006040518083038186803b158015610b4c57600080fd5b505afa158015610b60573d6000803e3d6000fd5b50505050610b76610b6f61029b565b60016110fe565b50610bac7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381169083611256565b604051635d043b2960e11b815260048101829052306024820181905260448201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ba087652906064016020604051808303816000875af1158015610c23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c479190611851565b9050610c7e7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0381169083611256565b604051635d043b2960e11b815260048101829052306024820181905260448201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ba087652906064016020604051808303816000875af1158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d199190611851565b90508060005410610dba57604051630852cd8d60e31b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b158015610d8657600080fd5b505af1158015610d9a573d6000803e3d6000fd5b5050505080600080828254610daf919061193b565b90915550610ee39050565b60005415610e4557600054604051630852cd8d60e31b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b158015610e2857600080fd5b505af1158015610e3c573d6000803e3d6000fd5b50506000805550505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610eac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed09190611851565b90508015610ee157610ee181611310565b505b600054604080518381526020810185905290810185905260608101919091527fcd5724ecb235738d75e64e4e9a5d6c1267b8185de028b82f12175e7ff215360f90608001610ac0565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663d6900a54336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160006040518083038186803b158015610f9b57600080fd5b505afa158015610faf573d6000803e3d6000fd5b50505050600f54600003610fd65760405163e5f408a560e01b815260040160405180910390fd5b60405133907f0d77b8ec4f035b07683b8c222653c321da1049b00e82006b1190ee5d94bddfdf90600090a261102960006009819055600a819055600b819055600c819055600d556000600e556000600f55565b565b600060088190555b60058163ffffffff16101561108e57818163ffffffff166005811061105a5761105a61186a565b602002015163ffffffff16600860008282546110769190611896565b909155508190506110868161194e565b915050611033565b5061109c600283600561173a565b506110aa6007826005611782565b5060405133907ff085c57737528946971c505b4c9d6f7ca7ab5925b0cee78d8cb75797f36f362890600090a261053b60006009819055600a819055600b819055600c819055600d556000600e556000600f55565b6000805483111561121b5760008054611117908561193b565b9050806001600082825461112b9190611896565b9091555050604051631bf8922760e11b8152306004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906337f1244e90604401600060405180830381600087803b15801561119857600080fd5b505af11580156111ac573d6000803e3d6000fd5b50505050806000808282546111c19190611896565b90915550506001546000546040805184815260208101939093528201527f704210ad0e772a9d53df2583519901ff427ae202d6faf3d36e4432740c7112449060600160405180910390a161121481611310565b9050611250565b811561122957506000611250565b60005460405163454717e360e01b81526104ae918591600401918252602082015260400190565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526112a78482611587565b61130a57604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526113009085906115d6565b61130a84826115d6565b50505050565b60005b600581101561053b576000600282600581106113315761133161186a565b01546001600160a01b031690506000600783600581106113535761135361186a565b60088104919091015460079091166004026101000a900463ffffffff16905060006001600160a01b038316611389575050505050565b83600414806113ca57506004841080156113ca5750600060026113ad866001611896565b600581106113bd576113bd61186a565b01546001600160a01b0316145b1561145e576040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611433573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114579190611851565b9050611478565b60085461146b8684611971565b6114759190611988565b90505b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156114e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150b91906119aa565b50826001600160a01b03167fa8ee3e5c0b1fd681042265199e8b28cf463b81bc21f6658d4c73e741aeabd3f58260085485670de0b6b3a764000061154f9190611971565b6115599190611988565b6040805192835260208301919091520160405180910390a2505050808061157f906119d3565b915050611313565b6000806000806020600086516020880160008a5af192503d915060005190508280156115cc575081156115bd57806001146115cc565b6000866001600160a01b03163b115b9695505050505050565b600080602060008451602086016000885af1806115f9576040513d6000823e3d81fd5b50506000513d9150811561161157806001141561161e565b6001600160a01b0384163b155b1561130a57604051635274afe760e01b81526001600160a01b03851660048201526024016104ae565b826005810192821561168d579160200282015b8281111561168d5781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061165a565b506116999291506117dc565b5090565b60018301918390821561168d5791602002820160005b838211156116fd57833563ffffffff1683826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026116b3565b801561172d5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026116fd565b50506116999291506117dc565b826005810192821561168d579160200282015b8281111561168d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061174d565b60018301918390821561168d5791602002820160005b838211156116fd57835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302611798565b5b8082111561169957600081556001016117dd565b8060a0810183101561125057600080fd5b600080610140838503121561181657600080fd5b61182084846117f1565b915061182f8460a085016117f1565b90509250929050565b60006020828403121561184a57600080fd5b5035919050565b60006020828403121561186357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561125057611250611880565b6101608101818560005b60058110156118ea5781356001600160a01b0381168082146118d457600080fd5b84525060209283019291909101906001016118b3565b50505060a082018460005b600581101561192957813563ffffffff811680821461191357600080fd5b84525060209283019291909101906001016118f5565b50505082610140830152949350505050565b8181038181111561125057611250611880565b600063ffffffff80831681810361196757611967611880565b6001019392505050565b808202811582820484141761125057611250611880565b6000826119a557634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156119bc57600080fd5b815180151581146119cc57600080fd5b9392505050565b6000600182016119e5576119e5611880565b506001019056fea264697066735822122066b05d4f2bec24e30251b352eafdb6ac9c0c83237a87f83ee71c1863c75a3ebd64736f6c63430008140033000000000000000000000000dde3ec717f220fc6a29d6a4be73f91da5b718e55000000000000000000000000ce22b5fb17ccbc0c5d87dc2e0df47dd71e3adc0a0000000000000000000000000b5281e1fa7fc7c1f0890f311d5f04d55c0fd63c000000000000000000000000e1abbc0e434faadeadf69b3c6af25a930dec86c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000