Skip to content
Business logic Audit finding Intermediate

Fees from delisted pool still in reward handler will become stuck after delisting

When a pool is delisted, its reference is removed from the address provider, so the reward handler's dynamic list of pools no longer includes it. Consequently, unclaimed fees for that pool remain stuck in the contract and cannot be burned or distributed.

0x52 Follow

Originally disclosed on Code4rena

Submitted by 0x52

Unclaimed fees from pool will be stuck.

Proof of Concept

When delisting a pool the pool’s reference is removed from address provider:

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/Controller.sol#L63

Burning fees calls a dynamic list of all pools which no longer contains the delisted pool:

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/RewardHandler.sol#L39

Since the list no longer contains the pool those fees will not be processed and will remain stuck in the contract

Recommended Mitigation Steps

Call burnFees() before delisting a pool.

danhper (Backd) confirmed

Alex the Entreprenerd (judge) commented:

The warden has shown how, by removing a pool before calling burnFees, the removed pool will not receive the portion of fees that it should.

Because this finding related to loss of yield, I believe Medium Severity to be appropriate.


The original report as published on Code4rena, by 0x52. 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 delisting process removes the pool from the address provider before its accumulated fees are burned, so the reward handler's dynamic list no longer includes the pool and its fees are skipped.

Impact

Unclaimed fees from a delisted pool become permanently stuck in the reward handler contract, resulting in a loss of yield for that pool.

What the attacker needed

Pool must be delisted; fees must be unclaimed

The fix

The delisting process should call burnFees() before removing the pool from the address provider.

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.

A smart contract holds fees for various pools. When a pool is removed from the list of active pools, the function that processes fees no longer sees it, so the fees already collected for that pool are never processed and stay locked in the contract.

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 0x52

View all

211 more disclosed reports, best first.

More from Backd Tokenomics 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.