Skip to content
Business logic Audit finding Intermediate

Users Will Lose Concur Rewards If The Shelter Mechanism Is Enacted On A Pool

If the shelter mechanism is activated, users' accrued Concur rewards become permanently locked because the MasterChef contract continues to allocate tokens to the sheltered pool and has no way to remove it. An attacker cannot directly exploit this, but users lose their unharvested rewards.

leastwood Follow

Originally disclosed on Code4rena

Submitted by leastwood

The shelter mechanism aims to protect the protocol’s users by draining funds into a separate contract in the event of an emergency. However, while users are able to reclaim their funds through the Shelter.sol contract, they will still have a deposited balance from the perspective of ConvexStakingWrapper.sol.

However, if the shelter mechanism is enacted before users are able to claim their Concur rewards, any accrued tokens will be lost and the MasterChef.sol contract will continue to allocate tokens to the sheltered pool which will be forever locked within this contract.

There is currently no way to remove sheltered pools from the MasterChef.sol contract, hence any balance lost in the contract cannot be recovered due to a lack of a sweep mechanism which can be called by the contract owner.

Proof of Concept

ConvexStakingWrapper.sol

MasterChef.sol

Recommended Mitigation Steps

Consider removing sheltered pools from the MasterChef.sol Concur token distribution. It is important to ensure massUpdatePools is called before making any changes to the list of pools. Additionally, removing pools from this list may also create issues with how _pid is produced on each new pool. Therefore, it may be worthwhile to rethink this mechanism such that _pid tracks some counter variable and not poolInfo.length - 1.

leekt (Concur) confirmed

Alex the Entreprenerd (judge) decreased severity to Medium and commented:

The warden has shown how the Shelter Mechanism can cause depositors to lose the unharvested field they were entitled to.

This is contingent on the Shelter being used by the admin.

For that reason (and because the finding is for loss of yield), I believe Medium Severity to be more appropriate.


The original report as published on Code4rena, by leastwood. 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 MasterChef contract lacks a mechanism to remove sheltered pools from reward distribution, so it keeps allocating tokens to them.

What the attacker needed

Shelter mechanism is enacted by admin; users have unclaimed rewards

The fix

The shelter mechanism should be redesigned so that sheltered pools are removed from MasterChef reward distribution, ensuring massUpdatePools is called before changes and that pool IDs are tracked with a counter rather than array length.

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 design flaw. When a pool is 'sheltered' to protect funds, the reward system still thinks it is active and keeps sending rewards there, but those rewards can never be claimed. So users lose the rewards they had earned but not yet collected.

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 leastwood

View all

70 more disclosed reports, best first.

More from Concur 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.