Sealing
An order is sealed in the browser to a round of the drand beacon that hasn't been published yet. Until that round exists, nobody can read it.
1 The beacon
drand quicknet is run by the League of Entropy, whose members include Cloudflare, Ethereum Foundation, EPFL, Protocol Labs. It publishes an unchained BLS signature every 3 seconds on BLS12-381.
- chain hash
- 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971
- period
- 3 s
- genesis
- 1692803367 (unix seconds)
- scheme
- bls-unchained-g1-rfc9380
Round R is published at genesis + (R − 1) × period. Because each round's signature can be computed by nobody before the network signs it, anything encrypted to round R stays sealed until R arrives.
2 Timelock encryption
The order — pay mint, receive mint, amount, limit, salt — is encrypted with tlock-js to the batch's opening round, in binary age format, about 459 bytes. It fits beside the commitment in one transaction.
The plaintext never leaves the browser. It is kept in this browser's own storage so the trader can read their order before it opens.
The reference quote is worked out in the browser too, from the API's shared price snapshot: one read, the same for every visitor, that carries nothing about the order.
3 The seal
The seal is the order's hash, posted in the batch with the ciphertext carried in the commit transaction. At the opening the program checks every revealed plaintext against its seal, so nothing can be swapped after the fact.
A seal says nothing about the size, the pair or the side. That is why funding is its own step: the account is funded first, and the seal carries no amount.