Skip to content
Business logic Audit finding Intermediate

Wrong aave usage of claimRewards

The Aave yield manager contract incorrectly passed the payment token instead of the aToken when claiming rewards, so the rewards would be unclaimable. An attacker could not directly exploit this, but it would cause a loss of rewards for users.

jonah1005 Follow

Originally disclosed on Code4rena

Submitted by jonah1005

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

YieldManager’s logic in L161-L170

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

Recommend changing to

  address[] memory rewardsDepositedAssets = new address[](1);
  rewardsDepositedAssets[0] = address(aToken);

DenhamPreen (Float) confirmed:

Great catch!

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

moose-code (Float) commented:

Oof yeah! Good one :)

Devil in those documentation details :)

The original report as published on Code4rena, by jonah1005. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the code used the underlying payment token address instead of the aToken address when calling Aave's claimRewards function.

Impact

The rewards would be unclaimable, meaning users would lose the rewards they were entitled to.

What the attacker needed

None

The fix

The code should be changed to pass the aToken address instead of the payment token address when claiming rewards.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a smart contract bug where a function that collects rewards from a lending platform was given the wrong kind of token address. Because the platform expects a special token that represents a deposit, the rewards could not be collected. The mistake was in the code, not in how an attacker could break in.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by jonah1005

View all

39 more disclosed reports, best first.

More from Float Capital contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.