Tx lifecycle

What this explains

How a single action becomes a settled event on EDMA—end-to-end. You’ll see the business path your team feels and the chain path that secures it. Same model for both rails: Trade (milestones) and Tokens (settlements). The rule never changes: No EMT, no funds.

A. Trade lifecycle

Business view

  1. Action: A stage is ready to pass (e.g., On-Board). The attestor submits the BL + seal photo/number; the buyer gets a short review window (0–4h).

  2. Proof check: Files match the checklist in the MPA. If the buyer doesn’t block, the gate passes.

  3. Money flip: EDMA mints the EMT for that stage; the slice turns Locked EDSD → Unlocked EDSD and pays the same day. Seller sees the balance; funded-on-proof assignments tied to that stage settle automatically.

  4. Receipt: Both sides receive a human-readable receipt and a proof page. The burn line and hash are visible.

Chain view

  • The client submits two calls: proof.submit(evidence) → release(stage) (or a single helper that executes both after a pass).

  • The sequencer orders them into a block (~2s).

  • The PoV Gate compares the evidence hash to the MPA checklist; on match it emits a pass.

  • The EMT contract mints the stage token; the Treasury/Router flips the slice (Locked→Unlocked), posts the protocol fee line, and burns 50% of the stage’s fee in EDM (if the fee was prepaid in EDSD/USD, the burn half is converted to EDM at release).

  • The block is published; the batch and blob go to Ethereum in a few minutes. You don’t wait for L1 to move trucks.

Must-fund before shipping

  • After Pre-Ship EMT mints, EDMA requires the top-up for remaining milestones before it will accept pickup/forwarder/BL.

  • No funding, no shipping. Once funded, all remaining slices are visible as Locked EDSD by stage.

B. Tokens lifecycle

Business view

  1. Action: A buyer clicks Buy (or Retire).

  2. Proof check: The listing carries a PoV badge; One-Claim ensures the unit hasn’t been sold twice; buyer sees price and fee up-front.

  3. Settle: The trade (or retirement) settles in EDSD; the 4% protocol fee applies (2%/2% default split).

  4. Receipt: The proof page shows the listing’s PoV/One-Claim, the fee line, and the EDM burn (50% of the fee) with its hash.

Chain view

  • The sequencer orders tokens.settle(listing, …).

  • Contracts transfer the unit and mark it settled (or retired), charge the 4%, and burn 50% of that fee in EDM.

  • Batch/blob to L1 follows; receipts go out immediately.

C. Under the hood

  1. Ordering & inclusion: You submit via API/UI; the sequencer collects and orders the tx into a block (~2s target). If anything censors you, L1 forced inclusion lets anyone push your tx through the inbox; next batch must include it.

  2. Admissibility: The PoV Gate accepts only what matches the contract/listing: right files, right hashes, right checklist. One-Claim blocks duplicate evidence across routes and orders.

  3. State transitions: Trade: pass → mint EMT → flip Locked EDSD → Unlocked EDSD → protocol-fee line → burn 50% in EDM. Tokens: settle/retire → transfer or retire asset → protocol-fee line → burn 50% in EDM.

  4. Anchoring & receipts: The block is final on L2 for operations; the batch/blob posts to Ethereum (≈2–10 min). Receipts carry: stage/listing id, PoV hash, EMT id (Trade), fee & burn hash, net amounts, proof links.

  5. Webhooks & ERP sync: EDMA fires …milestone.passed, …release.posted, …settlement.posted, fee.burn.posted. Your ERP/TMS/WMS updates AP/AR, pickup/ETA, ASN/receipt, and ESG ledgers in seconds.

D. Failure paths & retries

  • Buyer blocks in the review window: The stage pauses with a clear reason; EDMA opens a case (see B5). Fix the file (or re-inspect) → resume. No burn, no release until pass.

  • Gate fails: The stage stays red and explains the fix (e.g., “Seal number doesn’t match packing”; “Temp out of range”). Only that slice pauses; other lots continue.

  • Pending Funds: Perfect proof cannot release if the top-up is missing. EDMA shows Pending Funds and a top-up deadline.

  • Revocation after pass (rare): Dependent future slices freeze; paid slices remain paid. The Dispute Pack records the delta; resume on clean record.

  • Sequencer outage: Forced inclusion on L1 inbox; permissionless exits after the challenge window. Your receipts continue to anchor to Ethereum as batches resume.

E. Idempotency, timing, and gas

  • Idempotency: send an Idempotency-Key on any POST that alters state (award, prefund, top-up, proof submit, release, exception resolve, assignment, cash-out). Retries are safe.

  • Business vs chain clocks: operational finality on L2 in seconds; L1 economic finality after the challenge window (e.g., 7 days). Withdrawals/bridges respect L1; day-to-day ops do not.

  • Gas: users don’t need ETH. The Paymaster covers gas in EDM/EDSD; it’s tiny and never part of the burn.

F. The lifecycle in one glance

  • Trade: proof arrives → PoV pass → EMT mints → Locked EDSD flips to Unlocked EDSD → fee posts → burn 50% in EDM → receipt + proof page → batch anchors to L1.

  • Tokens: settle/retire → fee posts → burn 50% in EDM → receipt + proof page → batch anchors to L1.

Drawing

Everything else—exceptions, tiers, governance, DeFi—sits around this sequence. It’s why the rail feels predictable and auditable: facts first, then cash. No EMT, no funds.

Last updated