4.2 Buyer Flow

  1. Buyer inputs GOAL to spend (or CASH desired).

  2. The UI shows an estimate (net of any GOAL transfer fees) and proposes minCashOut.

  3. On chain, the Exchange:

    • pulls GOAL from the buyer;

    • scans ticks from best to worst, filling listings in FIFO;

    • pays each seller immediately in GOAL for the filled amount;

    • transfers the aggregated CASH to the buyer from the Bank.

  4. If final cashOut < minCashOut โ†’ the swap reverts (atomicity, no partial surprises).

Average price is returned (in bps of CASH/GOAL).

Last updated