Launch app

Docs / Protocol

Reveal

In the 5 reveal blocks of the batch, you call:

reveal(uint256 index, uint256 market, uint8 side, uint256 amount, uint256 limitPx, bytes32 salt)

index is the position of the commitment in your list for that batch, returned by commit.

Checks, in order

  1. The current phase is reveal, in the batch the commitment was made in.
  2. The preimage hashes to the stored commitment.
  3. The side is 0 or 1, the amount and limit are non-zero and fit in 128 bits.
  4. The market exists and is enabled.
  5. The market's book for this batch has fewer than 96 orders.
  6. Your free balance covers the amount: USDG for a buy, the stock for a sell.

Any failed check reverts, and the commitment stays unrevealed.

Effects

  • The commitment slot is cleared, so it cannot be revealed twice.
  • The 1 USDG bond goes back to your free balance.
  • The amount moves from free to locked.
  • The order is appended to the market's book with the matching fee in force at that moment. A fee change that lands before settlement does not touch it.
  • A price sample is recorded for the market if none was recorded in this block.

What becomes public

Everything. From the moment reveal lands until the batch settles, the order is readable on-chain and through the Revealed event. This window is the main privacy limit of version 1; see Guarantees.