The depositRAACFromPool function in the Stability Pool fails when transferring RAAC tokens because RAAC is a fee-on-transfer token. The current implementation assumes that the entire amount will be transferred, but due to swap and burn taxes applied during the transfer, the actual amount received is lower. This discrepancy triggers the strict balance check, causing the transaction to revert every time.
Root Cause:
The RAACToken applies a 1% swap tax and 0.5% burn tax during transfers:
Issue in depositRAACFromPool:
The post-transfer balance check expects the full amount:
However, since the RAACToken contract deducts the tax during the transfer, the actual tokens received by the Stability Pool are amount - totalTax. This mismatch causes the InvalidTransfer() revert.
Liquidity Disruption:
The inability to deposit RAAC tokens hampers the liquidity provisioning process, affecting the overall protocol stability.
Complete Deposit Failure:
All deposit attempts revert due to the strict equality check, rendering the Stability Pool non-functional for RAAC token deposits.
Manual Review
Adjust Balance Check to Use Actual Received Amount :
Instead of assuming the full amount is received, compare pre- and post-transfer balances dynamically:
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.