Normal behavior: claimCorrupted() should close the correction window only after value has actually moved out of the pool to recoveryAddress.
I observed that the pool owner can set recoveryAddress to the pool itself. When claimCorrupted() later transfers tokens to recoveryAddress, the ERC20 transfer becomes a self-transfer. The pool balance does not decrease, but claimsStarted is set and corruptedReserve is reduced to zero. This closes the moderator correction window even though no external value movement occurred.
The missing validation is that recoveryAddress cannot be address(this). With a standard ERC20, transferring from the pool to itself creates no net balance change.
Likelihood:
This occurs when the pool owner sets recoveryAddress to the pool address and the pool later resolves as bad-faith CORRUPTED.
The path uses normal protocol functions and a standard ERC20. No fee-on-transfer behavior, reentrancy, token callback, or rebasing token is required.
Impact:
claimCorrupted() can set claimsStarted = true and zero corruptedReserve without any funds leaving the pool.
The moderator correction window can be closed even though the stated reason for closing finality, irreversible value movement, did not occur.
Create this file:
Run:
Observed output:
The PoC proves that:
recoveryAddress can be set to address(pool).
claimCorrupted() sets claimsStarted = true.
corruptedReserve is marked as swept.
The pool token balance is unchanged because the transfer was a self-transfer.
Moderator correction is blocked even though no external value moved.
Disallow the pool itself as a recovery address during initialization and updates.
Apply the same validation in initialize() before storing the initial recoveryAddress.
As defense in depth, recovery/sweep functions can also check that the pool balance decreased by the expected amount after transfer, or only update finality/accounting after confirming that funds actually left the pool.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.