Skip to content

Both or nothing

A trade room for two on Gno.land. Put in GNOT, tokens or NFTs. Once you both mark the same contents ready, everything swaps in one transaction.

Watch a trade cross

One trade from start to finish, on the same scene every room shows. Each rule is in the contract, not in a promise. All the rules

  1. Open a room for two

    Invite one account, or leave the seat open and share the link. The room is a contract on Gno.land: nobody runs it for you, and nobody can bend it.

  2. Put in what you give

    GNOT, tokens and NFTs, up to eight per side. Deposits sit in the contract, not with the other person and not with us.

  3. Ready covers exactly what you see

    Press Ready and your lantern lights. It applies to the contents of both bags as they are right now, and to nothing else.

  4. Change anything, and Ready clears

    If the other side takes something back, the lantern goes out and the room moves to a new revision. Nothing can settle on terms you have not seen.

  5. The second Ready swaps everything

    When both lanterns are lit, everything crosses in one transaction, less 0.5% on coins and tokens. No middleman, no third step, no waiting.

  6. Every trade leaves a receipt

    Each room has a public page, and its settlement is a transaction anyone can open. This one happened on Onyx testnet.

    Room 1 settled in block 1,435,335.

    The taker received 1.0945 GNOT and the maker 1.99 wrapped GNOT, after the fee.

Built for trading with strangers

You never send first and hope. The contract holds both sides until both agree on the same contents.

  • 2wrapped GNOT
    2UnverifiedGNOT?

    gno.land/r/someone/gnot.GNOT

    Calls itself GNOT, but it is a different token.

    Fakes stay out

    Anyone can register a token under any name, so a room checks the full contract path, never the name. Ordinary rooms take only verified assets, and the window flags anything that imitates one.

  • Their price

    2for2

    Name your price

    Put your side in and say what you want for it. Anyone can accept in one signature, and the trade settles in that same transaction.

  • Before the swap

    Every deposit goes home to its owner.

    Walk away any time

    Until the swap either side can take items back or cancel. After the room expires anyone can cancel it, and the deposits still go only to their owners.

On the board now

People post what they give and what they want. Open a room with any of them.

See the board
  • Reading the board…

The swap is one function

This is Lock, word for word from the realm. When the other side already locked the same revision, it calls settle, which sends every deposit across.

// Lock records that the caller agrees to swap the room exactly as it is at
// version. It fails if the room has changed since. When the other side
// already holds a lock on the same version, this call settles the room and
// returns "settled"; otherwise it returns "locked".
func Lock(cur realm, roomID uint64, version uint64) string {
	who := callerOf(cur)
	refuseCoins(cur)
	assertNotPaused()

	r := mustRoom(roomID)
	r.assertLive()
	mine, theirs := r.sideOf(who)
	if r.taker.owner == "" {
		panic("waiting for a counterparty to join")
	}
	if version != r.version {
		panic("the room changed: review version " + idString(r.version) + " and lock again")
	}
	if len(r.maker.assets) == 0 || len(r.taker.assets) == 0 {
		panic("both sides need at least one asset")
	}
	r.assertStillVerified()
	if mine.locked == version {
		return "locked"
	}
	mine.locked = version

	chain.Emit("Locked",
		"id", idString(r.id),
		"party", who.String(),
		"version", idString(version),
	)

	if theirs.locked == version {
		r.settle(cur, who)
		return StatusSettled
	}
	return "locked"
}

Try a trade in two minutes

Trade with the gnome trader in a practice room. No wallet, nothing on chain, the same rules.