How Is the “Reveal” Transaction Verified by the Smart Contract on the Blockchain?
When the user submits the "reveal" transaction, they send the original, unhashed order details (price, amount, salt) to the smart contract. The contract then independently takes these revealed details, computes the hash of them using the same cryptographic function, and compares this newly computed hash to the original commitment hash stored on-chain.
If the two hashes match, the smart contract verifies the integrity of the order and executes the trade.