DEX infrastructure

The Amaroo DEX infrastructure is the exchange built into Amaroo’s chains: one order book per coin, priced against ROO, matched in every block.

It rests on imaging. Amaroo’s own chains, the simplex chains, image foreign chains, the chains outside Amaroo such as Bitcoin: they record and check those chains’ block headers, each block’s short summary, in their own blocks. From that record, the network can check in consensus that a payment happened on a foreign chain, with no committee in the middle. Trades in a foreign chain’s coin settle on those checks.

There are two ways to trade. On the Settlement DEX (SDEX), orders meet on a public book. On the OTC path, a buyer takes a maker’s offer.

Where the books live

An order book is a coin’s list of orders: bids to buy and asks to sell, each priced in ROO, the network’s token. Every coin has one book. For a connected coin, one on a foreign chain Amaroo images, the book is kept on the simplex chain that images that coin’s chain.

There is one book per coin, not one per pair. Going from one coin to another takes two trades, one on each coin’s book, with ROO in between. The book is chain state, so any node can read it at any block.

The Settlement DEX (SDEX)

Orders rest on chain until they match. A bid locks the ROO it will spend. An ask, an offer to sell a coin from a foreign chain, locks ROO as collateral: a deposit the seller loses if they don’t pay.

Every block, each book matches at one clearing price, the price at which the most volume can trade. Everyone matched in that block gets that price, so being first or fastest within a block buys no better price.

After a match, the seller pays on the foreign chain, in one payment carrying a marker that ties it to the match. Once the payment is buried deep enough there, at a depth set for each chain, anyone can submit the proof of payment. Amaroo checks it against its imaged headers and releases the buyers’ ROO to the seller. If the seller never pays, a timeout gives the buyers their ROO back, plus a share of the seller’s collateral. The most anyone can lose is one leg of one open trade.

SDEX trades settle on the chains the assets live on, with no custodian. Your assets are traded and signed by your keys, from your wallet, and no party signs on your behalf. While a trade settles, the ROO it locks is held in escrow by the protocol.

The OTC path

OTC, over the counter, is a trade agreed between two parties instead of taken off the public book. A maker opens an offer and escrows ROO in it, priced off the book with a premium, an adjustment the maker sets. A buyer pays the maker on the foreign chain, and the proof of that payment releases the ROO to the buyer. The OTC path is designed so a first trade needs no ROO and no collateral.

A trade, end to end

From ETH on Ethereum to BTC on Bitcoin. Interfaces connect your wallets to the network, and on the way you hold pETH, then ROO, on Amaroo.

Normal

Fig. 1

Step 1 of 5: The pipe brings your ETH onto Amaroo.

Fig. 1: a trade, end to end (normal) Three lanes: Ethereum, Amaroo and Bitcoin, with a pETH book and a Bitcoin book on Amaroo, each priced in ROO. You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH. You sell the pETH for ROO on the pETH book, then move the ROO to the Bitcoin book, where your bid locks it. A seller’s ask, backed by locked ROO collateral, matches your bid, and the seller pays BTC to your Bitcoin address. Once the payment is buried deep enough on Bitcoin, the proof releases your ROO to the seller. The drawing shows the step named in the status line; the numbered steps describe all five.

Lanes: chains. Ladder: an order book, asks above bids. Padlock: held in escrow. Open: released. Squares: confirmations, up to the depth set for each chain.

  1. Step 1: The pipe brings your ETH onto Amaroo.

    You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH, backed one for one. The pipe is designed so that pETH is a claim on that ETH, redeemed by proof, with no committee in the middle.

  2. Step 2: Sell pETH for ROO.

    Your ask rests on the pETH book, priced in ROO. When a block matches it with a buyer’s bid, your pETH and their ROO change hands.

  3. Step 3: Move ROO to the Bitcoin book.

    Your ROO moves to the simplex chain that holds the Bitcoin book. There, your bid locks it and names your Bitcoin address.

  4. Step 4: The seller pays on Bitcoin.

    A block matches your bid with a seller’s ask, which has locked ROO collateral. The seller sends BTC to your Bitcoin address.

  5. Step 5: The proof releases the ROO.

    Once the payment is buried deep enough on Bitcoin, anyone can submit the proof. Your ROO goes to the seller, and the BTC is in your wallet.

Seller never pays

Fig. 1

Step 1 of 5: The pipe brings your ETH onto Amaroo.

Fig. 1: a trade, end to end (seller never pays) Three lanes: Ethereum, Amaroo and Bitcoin, with a pETH book and a Bitcoin book on Amaroo, each priced in ROO. You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH. You sell the pETH for ROO on the pETH book, then move the ROO to the Bitcoin book, where your bid locks it. A seller’s ask, backed by locked ROO collateral, matches your bid, and no BTC arrives. After the timeout, you get your ROO back, plus a share of the seller’s collateral. The drawing shows the step named in the status line; the numbered steps describe all five.

Lanes: chains. Ladder: an order book, asks above bids. Padlock: held in escrow. Open: released. Squares: confirmations, up to the depth set for each chain.

  1. Step 1: The pipe brings your ETH onto Amaroo.

    You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH, backed one for one. The pipe is designed so that pETH is a claim on that ETH, redeemed by proof, with no committee in the middle.

  2. Step 2: Sell pETH for ROO.

    Your ask rests on the pETH book, priced in ROO. When a block matches it with a buyer’s bid, your pETH and their ROO change hands.

  3. Step 3: Move ROO to the Bitcoin book.

    Your ROO moves to the simplex chain that holds the Bitcoin book. There, your bid locks it and names your Bitcoin address.

  4. Step 4: The seller doesn’t pay.

    A block matches your bid with a seller’s ask, which has locked ROO collateral. No BTC arrives.

  5. Step 5: The timeout refunds you.

    After the timeout, you get your ROO back, plus a share of the seller’s collateral. The most anyone can lose is one leg of one open trade.

Cancel

Fig. 1

Step 1 of 5: The pipe brings your ETH onto Amaroo.

Fig. 1: a trade, end to end (cancel) Three lanes: Ethereum, Amaroo and Bitcoin, with a pETH book and a Bitcoin book on Amaroo, each priced in ROO. You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH. You sell the pETH for ROO on the pETH book, then move the ROO to the Bitcoin book, where your bid locks it. Before a block matches it, you cancel your bid, and your ROO is unlocked. Once a block matches an order, it can’t be canceled: the seller pays and the proof settles the trade, or the timeout refunds the buyer. The drawing shows the step named in the status line; the numbered steps describe all five.

Lanes: chains. Ladder: an order book, asks above bids. Padlock: held in escrow. Open: released. Squares: confirmations, up to the depth set for each chain.

  1. Step 1: The pipe brings your ETH onto Amaroo.

    You send ETH to the pipe’s endpoint on Ethereum, which holds it, and Amaroo credits you pETH, backed one for one. The pipe is designed so that pETH is a claim on that ETH, redeemed by proof, with no committee in the middle.

  2. Step 2: Sell pETH for ROO.

    Your ask rests on the pETH book, priced in ROO. When a block matches it with a buyer’s bid, your pETH and their ROO change hands.

  3. Step 3: Move ROO to the Bitcoin book.

    Your ROO moves to the simplex chain that holds the Bitcoin book. There, your bid locks it and names your Bitcoin address.

  4. Step 4: Cancel before a match.

    Until a block matches it, your bid is yours to cancel. Canceling pays the network fee and unlocks your ROO.

  5. Step 5: A match runs to its end.

    Once a block matches an order, it can’t be canceled: the seller pays and the proof settles the trade, or the timeout refunds the buyer.

Each order pays the network fee in ROO. A wallet with none yet can start on the OTC path, designed so a first trade needs no ROO.

Fees

A fee buys a place in a block. Every transaction you send pays the network fee, in ROO: placing or canceling an order, moving ROO between simplex chains, submitting a proof. The match a block writes pays none. Payments on other chains pay those chains’ own fees, and there is no exchange fee.

Liquidity

Liquidity is orders, not parked capital. Users, desks and miners post it, and the depth you see is what is resting on the book now. Market makers rest bids and asks on both sides of a book and earn the spread, the gap between the prices they buy and sell at.

Why an order book, not a pool

A pool holds both assets of a pair and prices every trade along a curve, spreading capital across prices where no one is quoting. A book holds only orders: prices someone is willing to trade at. There is no curve to slide down: an order trades at its price or better, or it waits, and each block clears at one price. Why Amaroo makes the longer argument.

Terms

book
One coin’s list of orders to buy and sell, priced against ROO and kept as chain state.
clearing price
The one price a book matches at in a block: the price at which the most volume can trade.
collateral
ROO a seller locks with an ask, shared among the buyers if the seller never pays.
marker
A tag in a payment on a foreign chain that ties it to one match.
proof of payment
A proof, checked against a foreign chain’s imaged headers, that a payment happened on that chain and is buried to the depth set for it.
timeout
The deadline for a matched seller’s payment. After it, the buyers get their ROO back, plus a share of the seller’s collateral.
maker
On the OTC path, the party who opens an offer and escrows ROO in it.
premium
The adjustment an OTC maker sets on the book’s price when offering ROO directly.

Register interest