Escrow-less marketplace with LMSR-settled disputes, live on Gnosis mainnet (and what a full dispute cycle actually costs in gas)

I deployed a marketplace protocol on Gnosis mainnet a few weeks ago and ran a full
lifecycle through it, including a dispute carried all the way to a verdict. Posting
the gas numbers here because I could not find comparable figures anywhere, and the
design might be of interest to people thinking about trust-minimised commerce.

The problem with escrow

Escrow solves fraud by introducing a third party who holds the money and decides who
was right. That party has to be trusted, has to be paid, and becomes the single thing
worth attacking or capturing. Every “decentralised escrow” I have looked at ends up
reintroducing it as a jury, a multisig, or a DAO vote.

What this does instead

There is no escrow at all. The buyer pays, and the contract forwards the money to the
seller in the same transaction. What backs the transaction is capital the seller had
to lock up front.

  • Seller locks an Integrity Bond of 1.5x the price before a listing can exist.
    It sits in the contract, not with the seller.
  • Buyer pays P. The contract deducts 0.5% and forwards 0.995P to the seller atomically.
  • Anyone can open a dispute by buying “Seller Guilty” shares. When cumulative Guilty
    purchases reach 0.5P, a dispute market opens automatically. No admin, no moderator,
    nothing to appeal to.
  • In that same state transition the seller’s bond is forced to put a matching 0.5P on
    “Seller Innocent”. The seller is not asked. The market opens at an unbiased 50/50
    with 1P of depth, half of it the seller’s own money betting on their innocence.
  • Both opening positions are locked. Neither side can sell them, only redeem or
    forfeit at resolution. Only post-open buys are tradeable.
  • Resolution requires one side to hold 93% for a cumulative hour. The clock pauses
    the moment anyone bets back and never resets, so no single large buy can flip it.
  • On a Guilty verdict the remaining 1.0P of the bond is slashed to the buyer, on top of
    what their shares redeem.

The buyer’s arithmetic at P = 1.5 xDAI:

paid for the job -1.5
opened the dispute -0.75
shares redeem (0.75 buys 1.5 of shares at a 50/50 open, 1:1 payout) +1.5
slashed from the seller’s bond +1.5
net +0.75

The victim does not merely get made whole, they end up ahead, and it comes out of the
scammer’s own bond almost to the wei. The gap is the 0.5% protocol fee.

The part I find most interesting: pushing the market from 50% to 93% costs money, but
whoever does it buys shares between 0.5 and 1.0 and redeems at 1.0. Being right is
profitable, and it pays out of the losing side’s stake. So a stranger with no
connection to the victim has a paid reason to take their side. A victim with no
capital is not defenceless.

Gas, measured on mainnet

Measured against the deployed bytecode, not estimated:

operation gas
createListing 240,134
settlement.pay 136,661
confirmCompletion 24,790
fundGuiltySide (also opens the LMSR market) 516,488
spectralMarket.buy 115,921
pokeSettlement 56,225
finalizeDispute 44,575
redeem 35,140
one honest sale end to end 161,451

The full run was 14 transactions: one bond deposit, one listing, four sales, a dispute
opened, pushed past 93%, resolved and collected. Total gas spend was 74,813,340,386
wei, about 0.0000748 xDAI
, at an observed gas price of 0.000000674 gwei. Opening an
entire LMSR prediction market for half a million gas is the number that surprised me
most.

The capital requirement is scale-free. Peak liquidity needed is 4.966x the price at any
size, identical to fifteen significant figures across seven orders of magnitude of P.
The contracts impose no price floor beyond rejecting zero.

What I am not claiming

  • No paid audit, and there will not be one. What replaces it is an immutable 100 xDAI
    per-transaction hardcap compiled into the contract. It bounds the blast radius of any
    path rather than pretending there are none.
  • Every transaction on it so far is me against my own wallets. They are labelled as
    rehearsals on the track record page. This has zero users and I am not going to dress
    that up.
  • I am the author, deployer 0xC8bfedCC142b0C915CA83E214a71d6607C89d310. All nine
    contracts are source-verified on gnosis.blockscout.com.

What I am after

One transaction where the counterparty is not me. I am offering a small dev job,
Solidity review or a small feature with Foundry tests, priced at 1.5 xDAI, purely so
that transaction exists. If you would rather just try to break it, tell me and I will
list a job and deliberately not deliver so you can take the payout.

Either way, I would rather be told what is broken now than after someone loses money
that matters to them.

Site: https://walendria.org
Whitepaper: Whitepaper — The 29 | Walendria Protocol
Track record: Track record | Walendria Protocol

1 Like