What durian.market is

A constant-product market maker on Rand Protocol: the arithmetic of Uniswap v2, with pools that are public and payers who are not.

Every pool pairs RAND with one RPL token and holds the two reserves in a vault the program owns. A trade sells one side into the pool and takes the other out at the pool’s curve, keeping x · yfrom falling; 0.30 % of what is sold stays in the pool for the people who supplied it. A trade between two tokens runs through RAND, both pools in one transaction. Liquidity is added and removed in proportion, for share tokens that only the program can mint.

What is public, and what is private

The chain keeps every pool’s reserves in the open, because every trade moves the price and hiding it would buy nothing. So, for each trade, anyone can see:

  • the amounts in and out, and the pool’s reserves before and after;
  • the public key the payout note is sent to (your wallet’s address, as with any note the chain computes for you).

Nobody can see:

  • which notes paid for the trade, and so which wallet paid, or what else it holds;
  • the balance of any address, this site included: the page never knows what you own, and the wallet checks it when you approve.

One thing to know: because payouts go to your wallet’s key, two trades paid out to the same address can be linked to each other by that key, even though neither can be linked to what paid for it.

How a trade is proved

The program never computes anything on chain. Your wallet does the arithmetic, then declares the whole transition in the clear — the pool cell it read and the value it read, the value it writes, what it pays in, what it takes out — and proves that the program accepts exactly that transition. Validators verify the proof; they never run the program.

out · (1000 · r_in + 997 · in) ≤ 997 · in · r_out

The proof is two large ones (the bundle’s and the call’s), too large for a browser, so Rand Wallet proves through its paired prover. That takes a couple of minutes; the page shows the time elapsed, and cannot show a percentage, because it cannot see the prover.

Why a trade can need a re-quote

A trade is proved against the exact reserves it read. If another trade reaches the pool first, the reserves have moved, the read no longer matches, and the chain refuses the transaction. Nothing has left your wallet: the transaction was never included. The page notices the pool moved, quotes again from the new reserves, and tells you whether the new quote is still inside your slippage tolerance before you approve it again. For a pool with occasional trades this is rare; for a busy one it is a queue in which the faster prover wins.

This deployment

Unless the network banner says otherwise, this is a development or test deployment: the tokens here have no value, and the chain may be reset. Use it to try the thing, not to keep anything in it.

What this site does, and does not, talk to

  • It reads pools, tokens and receipts from one Rand node, through this site’s own /api/rpc.
  • It sends nothing to the chain itself: every trade goes through the Rand Wallet extension, which asks you first.
  • It loads no third-party script and reports nothing anywhere: no analytics, no telemetry.