Aave PCV Deposit#128
Conversation
|
|
||
| /// @notice returns total balance of PCV in the Deposit | ||
| function balance() public view override returns (uint256) { | ||
| return aToken.balanceOf(address(this)); |
There was a problem hiding this comment.
is that the balance of underlying tokens, or the amount of aTokens ? I think it's better if we return an amount in underlying tokens, it will be more convenient to find an oracle price for these
There was a problem hiding this comment.
Good call, shouldn't expect devs to know aTokens are rebasing
deploy/aavePCVDeposit.js
Outdated
There was a problem hiding this comment.
If you want, you could also write logging && console.log(...); & not have to bother with : undefined at the end
| await aaveEthPCVDeposit.deposit(); | ||
|
|
||
| await aaveEthPCVDeposit.claimRewards(); | ||
| const aaveBalanceAfter = await contracts.stAAVE.balanceOf(aaveEthPCVDeposit.address); | ||
|
|
||
| expect(aaveBalanceAfter.sub(aaveBalanceBefore)).to.be.bignumber.greaterThan(toBN(0)); |
There was a problem hiding this comment.
How come the rewards balance is not 0 if the deposit just happened ?
I guess you could add a small time fast-forward in your test, to check that you earn some interest?
There was a problem hiding this comment.
Time did fast forward at least 1 second/block between the deposit and the claim
f82b7a3 to
1b687b7
Compare
94d8adc to
f731887
Compare

An Aave PCV deposit similar to the Compound one. Uses WethPCVDeposit to support ETH deposits into Aave