GoodAaveStaking V2 (USDC)
Supporters / stakers can stake their USDC which is sent to permissionless protocols which earn interest. The FundManager has permissions to collect interest-earned from this contract.
Last updated
Supporters / stakers can stake their USDC which is sent to permissionless protocols which earn interest. The FundManager has permissions to collect interest-earned from this contract.
Last updated
Emitted when staker
stake value
tokens of token
.
Parameter name | Annotation |
---|---|
Emitted when staker
withdraws their stake value
tokens of token
.
Parameter name | Annotation |
---|---|
Emitted when fundmanager transfers interest collected from DeFi protrocol.
Parameter name | Annotation |
---|---|
Function that calculates current interest gains of this staking contract.
Allows a staker to deposit Tokens (in this case DAI). Notice that approve
is needed to be executed before the execution of this method.
Can be executed only when the contract is not paused.
Withdraws the sender staked Token (in this case USDC).
Can be executed only when the contract is not paused.
Withdraw staker G$ rewards + GDAO (GOOD) rewards to the caller (staker).
Withdraw staker GDAO (GOOD) rewards to the caller (staker).
Collects gained interest (in G$) by fundmanager.
The function is to calculate Token (in this case USDC) price in USD.
Returns: worth of Tokens in USD, the decimals are 8.
The function that can provide information about minted and pending rewards in G$ of the _staker
.
Returns: The first element of the tuple is Minted value and the second is Pending value in G$; 2 decimals.
Function to get interest transfer cost for this particular staking contract.
Returns: Gas cost in wei.
Parameter name | Annotation |
---|---|
Return parameter name | Annotation |
---|---|
Parameter name | Annotation |
---|---|
Parameter name | Annotation |
---|---|
Parameter name | Annotation |
---|---|
Return parameter name | Annotation |
---|---|
Parameter name | Annotation |
---|---|
Parameter name | Annotation |
---|---|
staker
The address of the staker.
token
The address of the staking token.
value
The value to be staked.
staker
The address of the staker.
token
The address of the staking token that beign withdrawn.
value
The value to be withdrawn.
recipient
The recipient address of the interest
iTokenGains
The amount of intereset accrued.
tokenGains
The amount of interest worth in underlying token value.
actualTokenRedeemed
Actual token redeemed in Uniswap V2 (max 0.3% of liquidity) to token (in this case USDC).
actualRewardTokenEarned
Actual amount of reward tokens earned.
interestCollectedInDAI
The DAI amount of USDC tokens sent to the reserve as interest from converting token and optionally reward token in Uniswap V2.
_returnTokenBalanceInUSD
Determine return token balance of staking contract in USD.
_returnTokenGainsInUSD
Determine return token gains of staking contract in USD.
iTokenGains
Gains in iToken (in this case cUSDC).
tokenGains
Gains in token (in this case USDC).
tokenBalance
Total tokens locked.
balanceInUSD
Locked tokens worth in USD.
tokenGainsInUSD
Gains in USD.
_amount
The amount of Token (in this case USDC) or iToken (in this case cUSDC) to stake (it depends on _inInterestToken
parameter).
_donationPer
The % of interest staker want to donate.
_inInterestToken
Specificy if stake in iToken (in this case cUSDC) or Token (in this case USDC).
_amount
Amount to withdraw in Token (in this case USDC) or iToken (in this case cUSDC).
_inInterestToken
If true
_amount
is in iToken (in this case cUSDC) and also returned in iToken otherwise use Token (in this case USDC).
_recipient
The recipient of iToken (in this case cUSDC) gains.
actualTokensRedeemed
Collected interest from token.
actualRewardTokenRedeemed
Collected interest from reward token.
actualDai
Total Token (in this case USDC amount equal to DAI amount) received from swapping token + reward token.
_oracle
Chainlink oracle usd/token oralce.
_amount
Amount of Token to calculate worth of it.
_decimals
Decimals of Token.
_staker
Account to get rewards status for.