Selling & the Queue
Depositing
Selling starts with a plain SETH transfer to the SethVault on Sepolia. The
vault’s receive() function accepts the deposit only if:
msg.value > 0andmsg.value >= minDepositSethRaw(the minimum, currently 1 SETH), and- the sender is a normal wallet — an externally-owned account (
msg.sender == tx.originand the sender has no contract code).
On success the vault emits:
event SethReceived(address indexed from, uint256 amount, uint256 acceptedTotal);This event is the only thing that creates a queue order.
From deposit to queue order
The indexer ingests each SethReceived event and creates exactly one queue
order, keyed by its (blockNumber, logIndex) so it’s stable across restarts
and reorgs. Orders are ordered first-in, first-out — the earliest deposit is
the first to sell.
Your exact queue position is finalized once the deposit confirms on-chain; other deposits landing at the same time can shift it.
Getting sold
As buys arrive, the matcher walks open orders oldest-first and fills them (see Buying & Fills). A single order can be sold across multiple buys and can span more than one pricing tier. For each slice sold, the seller accrues a USD-owed balance computed at the tier price in effect at the time of that sale — later price or tier changes never reprice past sales.
Your order moves through these states:
| State | Meaning |
|---|---|
| Queued | In line, nothing sold yet. |
| Filling | Partially sold. |
| Sold | Fully sold; awaiting payout. |
| Complete | Sold and paid out. |
The house reserve is not a queue order
The vault also holds an owner-funded reserve used to backstop buys. It is topped up through a separate function:
function fundReserve() external payable onlyOwner; // emits ReserveFundedBecause reserve top-ups emit ReserveFunded (not SethReceived), they are
never turned into seller queue orders. This keeps the reserve from competing
with real sellers for fills or payouts.
Where your SETH goes
Sold SETH is delivered to buyers by the vault owner calling sendSeth(to, amount) on Sepolia (driven automatically by the delivery worker). The vault
tracks lifetime acceptedSethRaw (deposited), sentSethRaw (delivered), and
reserveFundedSethRaw (reserve) so balances are always auditable on-chain.