The FeeCollector contract fails to account for RAAC token's transfer taxes in its fee collection process, leading to a systemic discrepancy between recorded and actual token balances. When fees are collected, the contract records the pre-tax amount rather than the actual received amount, causing an accumulating deficit in the system.
This vulnerability directly impacts the protocol's ability to properly distribute collected fees, as the actual balance will always be lower than the recorded amount. According to the protocol documentation, the FeeCollector is responsible for managing and distributing protocol fees, lending fees, performance fees, and other critical revenue streams. When these distributions fail due to insufficient balances, it could lead to stuck funds and disrupt the protocol's revenue distribution mechanism.
The core issue lies in the collectFee
function of the FeeCollector contract:
The RAAC token implements transfer taxes as shown in its contract:
When someone pays fees to the FeeCollector:
They initiate a transfer of 100 RAAC tokens
The RAAC token applies a 2% swap tax and 1% burn tax
FeeCollector receives 97 tokens but records 100 in its accounting
This 3-token difference accumulates with each fee collection
Later, when distributeCollectedFees
is called:
The distribution attempts to distribute the recorded amount (100) when only 97 tokens are actually available, causing the transaction to revert and potentially leaving funds stuck in the contract.
Manual Review
Hardhat
Modify the collectFee
function to track actual received tokens.
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.