Why Is the Inclusion of a “Salt” or “Nonce” Critical in the Commitment Process?
The inclusion of a random salt (or nonce) prevents a brute-force attack on the commitment. Without a salt, an attacker could calculate the hashes of all possible simple orders (e.g.
"buy 1 ETH at $2000") and compare them to the on-chain commitment, thus revealing the order. The salt makes the commitment unique and unpredictable, ensuring that the attacker cannot guess the hidden order details by simply pre-calculating common transaction hashes.