CompoundStakingFactory
The staking contract that donates earned interest to the DAO.
The contract allow stakers to deposit Token (DAI) or withdraw their stake in Token (DAI) the contracts buy cToken (cDAI) and can transfer the daily interest to the DAO.
Events
Deployed
Emitted when new clone of the Compound staking contract was deployed.
Parameter name | Annotation |
---|---|
proxy | The ERC1167 clones factory. |
cToken | The compound token which is accepted in the deployed staking contract clone. |
impl | The amount of claimers claims. |
cloneAndInit
The function instantiates and initalizes an EIP 1167 proxy contract as minimal clone of the staking contract at public field impl
.
Parameter name | Annotation |
---|---|
_cToken | The compound token to be used for staking in this contract. |
_ns | The NameService contract address which holds all the necessary addresses. |
_maxRewardThreshold | The amount of blocks that need to pass in order to user would get their rewards with 1x multiplier instead of 0.5x. |
_tokenUsdOracle | The address of the TOKEN/USD oracle. (TOKEN is the underlying token of |
_compUsdOracle | The address of the AAVE/USD oracle. |
_tokenToDaiSwapPath | The UniswapV2 swap path from TOKEN to DAI. (TOKEN is the underlying token of |
There is another overloaded version of the signature:
Here you can specify the _impl
of the clone proxy.
predictAddress
The function is to compute the address of the proxy clone of the staking contract to deploy.
Parameter name | Annotation |
---|---|
_impl | The imlementation of the staking contract. |
cToken | First parameter of the constructor for |
paramsHash | The keccak256 hash of remaining parameters of the constructor for |
Returns: an address of the clone to be deployed.
Last updated