The RAAC NFT contract has a vulnerability where users are charged fees twice when receiving a refund for overpayment during NFT minting. The first fee is charged when transferring the amount to the fund, and a second fee is charged when receiving the refund amount.
When a user mints an NFT and sends more tokens than the required price, the contract attempts to refund the excess amount. However, due to the tax mechanism in the RToken contract's _update function, fees are charged twice:
First fee charged when transferring payment to contract
Second fee charged when receiving refund of excess amount
The relevant code:
Users who overpay when minting NFTs end up paying more in fees than intended due to the double taxation. This results in financial loss for users and makes the actual cost of minting higher than advertised.
Manual code review
Consider removing the refund mechanism and instead directly deducting the required amount. You can use the price value instead of _amount.
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.