Trading
How a trade lands
Every stage between pressing Buy and seeing it bought, and whose each one is.
The path of a trade#
From the moment you press Buy, a trade passes through two hands: Nectar's, which prepares, signs and delivers it, and the chain's, which orders it into a block and publishes that block.
Saving a trade checks your wallets, settings and the token's route side by side. Pricing simulates your exact trade through the router; signing reads the wallet's nonce, the gas and the fees from every RPC at once and takes the first answer, so one slow RPC never holds a trade up.
Sent to every RPC at once#
Elysium is an Arbitrum Orbit chain with a single sequencer. Until the official mainnet RPCs open, the public RPCs are relays with their own queues and rules. Nectar sends the same signed trade to all of them at the same moment, and the first one to deliver it wins.
- It can only land once. It is one signed transaction with one nonce: however many RPCs carry it, the chain accepts it once and refuses the copies.
- A silent RPC is asked again. If an RPC times out or answers with a server error, it is sent the same trade again every 2 seconds for up to a minute, in the background. An RPC that answers anything, even a refusal, is not asked again.
- A refusal costs nothing. An RPC that refuses or never answers does not slow the trade: the others already have it.
Seeing it land#
Once a trade is sent, Nectar asks every RPC for its receipt four times a second, in one batched request per RPC for every trade in flight. The first RPC to have it confirms the trade, and the trade panel, the toast and the trades feed update straight away. A receipt is only counted for the exact transaction asked about, once it is mined.
When a trade takes longer#
Almost all of a trade's time is the chain's. Before the Nov 9 mainnet opening, Elysium's sequencer has been slow to include trades from the public relays at busy times, and to publish its blocks: the newest block has trailed the clock by up to 9 seconds and arrived in bursts. Every app reading the chain sees the same delay.