The RAACNFT minting system contains vulnerability in its payment handling mechanism. When users mint NFTs representing real estate assets, the contract fails to properly validate final token balances after processing payments and refunds. This creates a potential discrepancy between the house price and actual tokens retained.
This vulnerability affects the fundamental tokenization mechanism of real estate assets. Incorrect token handling could lead to NFTs backed by incorrect collateral amounts, breaking the protocol's economic model.
The vulnerability centers on the mint() function in RAACNFT.sol where payment validation occurs:
We can see the contract lacks atomic validation that exactly price
tokens remain after the operation completes.
Attack Flow
Attacker calls mint()
with an amount larger than the house price
Contract transfers full amount from user
Contract mints NFT
During refund, contract fails to verify final balance matches house price
Potential token loss occurs due to incorrect balance retention
The mint
function processes transfers and refunds without ensuring the contract retains exactly the house price amount. This breaks the core invariant that each NFT must be backed by its precise house price in tokens.
Think of the RAACNFT minting system like a real estate escrow process. When buying a house, the exact purchase price must be transferred no more, no less. However, the current implementation is like an escrow agent who doesn't verify the final balance after processing refunds.
Let's say A user attempts to mint an NFT representing a $500,000 house. They approve 600,000 RAAC tokens, expecting a 100,000 token refund. The contract accepts the payment, mints the NFT, and attempts the refund but never validates that exactly 500,000 tokens remain locked as collateral.
Technical Deep Dive The mint()
function in RAACNFT.sol handles three critical operations
Just as a bank reconciles its ledger after every transaction, the contract should verify its final token balance matches the house price exactly. Instead, it assumes the transfers worked correctly without verification.
We can see this isn't just about incorrect balances, it breaks the fundamental premise of tokenized real estate. Each RAACNFT must be backed by exactly its corresponding house value in RAAC tokens. Any discrepancy undermines the entire protocol's economic model and could affect lending, liquidations, and price discovery.
The contract fails to properly validate that the contract retains exactly the house price after refunding excess payment. This could lead to:
Incorrect token balance retention
Potential loss of funds during refund process
The key issue is in the payment handling
The solution requires adding balance validation that acts like a final escrow check
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.