The mint() function in RAACNFT contract lacks slippage protection when minting NFTs based on house prices. The price is fetched from an oracle but there's no mechanism to ensure the price hasn't changed unfavorably between the time a user initiates the transaction and when it's executed.
The core issue lies in how the mint() function handles price validation:
Users specify _amount they're willing to pay. The function only checks if _amount is sufficient (price > _amount) but there's no upper bound check on the price
The lack of slippage protection means users have no way to specify their maximum acceptable price, forcing them to either:
Risk transaction failure by sending exact amounts
Over-collateralize their transactions significantly
Accept any price as long as it's below their sent amount
This is particularly problematic because house prices can be volatile and oracle updates can be frequent, making it difficult for users to predict the actual execution price of their mint transaction.
Users lose value through unfavorable price executions
Manual Review
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.