When the Smart Contract Works, but the Payment Is Wrong: A Collusion Attack in MealForward (Part 1)
Recently, I've been working on MealForward , a community meal voucher project built for the Monad Hackathon. The idea is straightforward: donors deposit funds into an on-chain escrow contract, authorized issuers distribute meal vouchers, and recipients redeem those vouchers at participating restaurants using temporary QR codes. Once a restaurant confirms a meal has been delivered, the escrow…
Recently, I have been investigating MealForward, a community meal voucher system developed for the Monad Hackathon. The project functions as follows: donors provide funds to an on-chain escrow contract, authorized issuers distribute meal vouchers, and consumers redeem those vouchers at participating restaurants using temporary QR codes.
Following a restaurant's confirmation that a meal has been served, the escrow contract transfers the corresponding payment to the restaurant. While examining the smart contracts, a peculiar query emerged: What occurs if a smart contract performs precisely as intended but still results in the incorrect payment? This inquiry broadened our focus beyond Solidity-level security to encompass collusion attacks, on-chain/off-chain consistency, EIP-712 authorization, delayed settlement, and trust assumptions. Here's the progression of our investigation.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.