Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong aave usage of claimRewards #49

Open
code423n4 opened this issue Aug 11, 2021 · 2 comments
Open

Wrong aave usage of claimRewards #49

code423n4 opened this issue Aug 11, 2021 · 2 comments
Labels

Comments

@code423n4
Copy link
Contributor

Handle

jonah1005

Vulnerability details

Impact

Aave yield manager claims rewards with the payment token. According to aave's document, aToken should be provided.
The aave rewards would be unclaimable.

Proof of Concept

YieldManager's logic:
https://github.com/code-423n4/2021-08-floatcapital/blob/main/contracts/contracts/YieldManagerAave.sol#L161-L170

Reference:
https://docs.aave.com/developers/guides/liquidity-mining#claimrewards

Tools Used

None

Recommended Mitigation Steps

Change to

    address[] memory rewardsDepositedAssets = new address[](1);
    rewardsDepositedAssets[0] = address(aToken);
@code423n4 code423n4 added 2 (Med Risk) bug Something isn't working labels Aug 11, 2021
code423n4 added a commit that referenced this issue Aug 11, 2021
@DenhamPreen
Copy link
Collaborator

Great catch!

This contract is going to be upgradable but really applicable within this context 👍

@moose-code
Copy link
Collaborator

Oof yeah! Good one :)

Devil in those documentation details :)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants