The RAACMinter contract contains a flaw in how it tracks and distributes minted rewards. The mintRewards function assumes that the contract holds the excessTokens balance. However, the tick function mints tokens directly to the stabilityPool instead of the contract. As a result, when mintRewards attempts to transfer the tokens, the safeTransfer call fails because the contract does not own the minted tokens.
In tick, new tokens are minted directly to stabilityPool:
This means the contract does not actually hold excessTokens, making the state inconsistent.
In mintRewards, the function assumes that excessTokens are within the contract and attempts to transfer them:
If excessTokens originated from tick, they are held by stabilityPool, so the contract does not have enough balance, and safeTransfer reverts.
The mintRewards function fails if excessTokens originated from tick.
Users expecting rewards will not receive them, breaking reward distribution.
The system inconsistently tracks excessTokens, making the contract state unreliable.
Manual code review.
Modify tick to mint tokens to this contract instead of stabilityPool:
This ensures excessTokens are correctly accounted for and transferable by mintRewards.
Alternatively, if tokens must be minted to stabilityPool, update mintRewards to pull tokens from stabilityPool:
This requires stabilityPool to approve transfers, adding complexity.
The first approach is cleaner and avoids unnecessary approvals while maintaining consistency in token ownership.
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.