The RAACToken contract implements a transfer tax mechanism which when applied that can lead to unexpected behavior in the StabilityPool contract when transferring tokens. Specifically, if the transfer tax is enabled, the InvalidTransfer error in the depositRAACFromPool function of the StabilityPool contract will always revert due to the way the tax is applied during token transfers. This creates a situation where the expected balance after a transfer does not match the actual balance, leading to potential denial of service.
The RAACToken contract has a transfer tax mechanism that is applied in the _update function. This function checks if the sender or receiver is whitelisted or if the fee collector is disabled. If none of these conditions are met, it applies a tax to the transfer amount. The relevant code snippet from the RAACToken contract is as follows:
In the StabilityPool contract, the depositRAACFromPool function checks if the balance after a transfer matches the expected balance:
If the transfer tax is enabled, the postBalance will not equal preBalance + amount, causing the transaction to revert.
This vulnerability can lead to a denial of service for the depositRAACFromPool function in the StabilityPool contract. If the transfer tax is enabled, any attempt to deposit RAAC tokens from the liquidity pool will fail, preventing the contract from functioning as intended. This could impact the liquidity and overall usability of the system, as managers may be unable to deposit tokens when needed.
Manual code review
utilise manageWhitelist in RAACToken to implement logic that allows the RAACMinter address is whitelisted in the RAACToken contract to avoid the transfer tax being applied during deposits from the liquidity pool as currently there isn't one.
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.