Skip to content
Business logic Audit finding Intermediate

AuraBalRewardPool charges a penalty to all users in the pool if the AuraLocker has been shut down

When the AuraLocker is shut down, users claiming rewards from AuraBalRewardPool cannot lock their rewards and are forced to take a 20% penalty. An attacker cannot exploit this; it is a design flaw that unfairly penalises users due to admin actions.

IllIllI Follow

Originally disclosed on Code4rena

Submitted by IllIllI, also found by csanuragjain

Users are charged the penalty due to admin actions, and they have no way to avoid it

Proof of Concept

When claiming their rewards, users are charged a penalty if they take the reward directly, rather than by passing it into the auraLocker. Those are the only two options:

File: contracts/AuraBalRewardPool.sol   #1

176       function getReward(bool _lock) public updateReward(msg.sender) returns (bool) {
177           uint256 reward = rewards[msg.sender];
178           if (reward > 0) {
179               rewards[msg.sender] = 0;
180               if (_lock) {
181                   auraLocker.lock(msg.sender, reward);
182               } else {
183                   uint256 penalty = (reward * 2) / 10;
184                   pendingPenalty += penalty;
185                   rewardToken.safeTransfer(msg.sender, reward - penalty);
186               }

AuraBalRewardPool.sol#L176-L186

If the pool has been shut down, the auraLocker.lock() call will always revert, which means the user must take the penalty path:

File: contracts/AuraLocker.sol   #2

258       function _lock(address _account, uint256 _amount) internal {
259           require(_amount > 0, "Cannot stake 0");
260           require(!isShutdown, "shutdown");

AuraLocker.sol#L258-L260

Recommended Mitigation Steps

Don’t charge the penalty if the locker has been shut down.

0xMaharishi (Aura Finance) acknowledged, but disagreed with severity and commented:

The auraBAL reward pool only runs for 2 weeks at the beginning of the protocol. It’s highly unlikely the AuraLocker will be shut down.


The original report as published on Code4rena, by IllIllI. 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

The reward claim function does not check whether the locker is shut down before applying the penalty for not locking.

Impact

Users are forced to pay a 20% penalty on their rewards when the locker is shut down, with no way to avoid it.

What the attacker needed

AuraLocker is shut down; user has pending 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 report. Users earn rewards in a pool, and they can either lock those rewards for extra benefits or take them immediately with a 20% penalty. If the locking feature is turned off by an admin, users have no choice but to pay the penalty, even though they did nothing wrong.

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 IllIllI

View all

119 more disclosed reports, best first.

More from Aura Finance 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.