Private swap
A private swap trades HYPE for USDC, or USDC for HYPE, on a Uniswap v4 pool on Elysium, paid from your notes, with the output written back as a new note. One transaction, sent by the relayer.
The steps, in one transaction
- Your browser picks the notes to spend, gets a quote from the v4 pool and sets a price floor (
minOut) from your slippage setting and a deadline. - It draws a one-time owner key for the output note and seals that key to your note key.
- It proves a spend from the input pool with
recipient = TalosSwapand anactionholding the output pool, the v4 pool key,minOut, the deadline, the one-time owner key, a blinding and the sealed key. The action is part ofextDataHash. - The relayer sends it. The input pool checks the proof, keeps your change as a new note, takes the exit fee and sends the rest to TalosSwap.
- TalosSwap swaps the whole amount on the v4 pool through the PoolManager (exact input). If the output is below
minOut, the deadline has passed, or the swap cannot use the whole input, everything reverts. - TalosSwap pays the output into the other pool with
depositNote. The pool computes the commitment itself from the amount received, the owner key and the blinding, so the note holds exactly what the swap returned.
The output note
The swap output is only known on chain, so its opening is published in an OpenNote event (leaf index, amount, owner key, blinding). The owner key is new for every swap and only you hold its secret, which travels sealed to your note key. The note is linked to nothing else, and spending it later reveals nothing more than any other note.
If the price moves
A swap that would fill below your floor reverts in full: no note is spent, the relayer is not paid, your balance is unchanged. Prove again at the new price.
What the chain shows
The relayer as sender, two nullifiers in the input pool, the amount sent to TalosSwap, the v4 swap itself (amount in and out), and a new note in the output pool. Your wallet address does not appear.
Talos