StabilityPool.sol contract's reward calculation is vulnerable to manipulation through direct token transfers, allowing malicious users to artificially inflate rewards for targeted users by sending RAAC tokens directly to the contract.
The vulnerability exists in the calculateRaacRewards
function:
Key issues:
totalRewards
uses direct contract balance via balanceOf()
Any user can modify this balance by transferring RAAC tokens directly to the contract
No tracking of legitimate vs donated rewards
No protection against balance manipulation
Attackers can artificially inflate rewards for specific users
Fair distribution mechanism can be bypassed
Economic exploitation of the reward system
Unfair advantage for malicious users
Protocol's reward tokenomics compromised
Manual code review and Hardhat testing framework were used to identify and verify this vulnerability. The PoC demonstrates how an attacker can manipulate reward calculations by simply transferring tokens to the contract:
User makes legitimate deposit
Attacker transfers RAAC tokens directly to StabilityPool
User's rewards are artificially inflated
No mechanism prevents or detects this manipulation
Modify the reward calculation function to track legitimate rewards internally:
Additionally:
Add nonReentrant
modifier to reward-related functions
Implement reward rate limits
Add emergency pause for suspicious reward activity
✅ Severity: High
Direct financial impact through reward manipulation
No existing protection mechanisms
Easy to exploit
✅ Likelihood: High
Simple to execute
No technical barriers
High incentive for attackers
✅ Impact: Severe reward distribution manipulation
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.