Lend and borrow
Order secrets
A sealed order opens with a 32-byte salt that only you hold. The app keeps it for you, and a downloaded copy reveals from any device or the CLI.
What is sealed#
At commit the program stores a 32-byte hash. At reveal you publish the rate tick, the size and the salt, and the program recomputes the hash.
SHA-256( "tenor:order:v1" ‖ side ‖ rate tick (u16 LE) ‖ size (u64 LE) ‖ salt ‖ owner ‖ auction )Owner and auction are inside the hash, so a commitment cannot be replayed by another wallet or in another auction. Without the salt, guessing the rate means trying every tick and size against a 32-byte random value.
Where the app keeps it#
The salt is drawn in your browser with crypto.getRandomValues and written to this browser's storage before the wallet is asked to sign. If you reject the signature, the stored secret is never used. Secrets are kept per network and order.
Download and import#
The confirmation panel offers Download reveal file, and every sealed order in Portfolio has a Reveal file link. It is a small JSON file in the same format the CLI writes:
{
"version": 1,
"programId": "HEHnHHGe3DLc1ceQX6JcF6ynNr134viKW9QR8KnzsB2h",
"owner": "<your wallet>",
"auction": "<auction address>",
"nonce": "0",
"side": 0,
"rateTick": 25,
"size": "100000000000",
"maxSize": "100000000000",
"collateralAmount": "0",
"collateralIndex": 0,
"salt": "<64 hex characters>",
"commitment": "<64 hex characters>"
}To use it on another device, connect the same wallet there and choose Reveal from a file on the desk, or Import reveal file next to the order in Portfolio. The app recomputes the commitment from the file and refuses it if it does not match.
Reveal from the CLI#
The same file works with the Tenor CLI:
tenor reveal --secret order.secret.json --keypair wallet.json --rpc https://your-rpc.example --genesis 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9dIf the salt is lost#
Nobody, including you, can reveal the order. After the reveal window it is refunded: USDC or collateral comes back in full and the bond goes to the series fee account.