ATOMIC SETTLEMENT

Two parties. One transaction. Both legs or neither.

Both or Neither settles a bilateral swap between two named counterparties. Not a pool, not an order book, no liquidity provider in the middle. Party A holds one asset, party B holds another, they agree a rate, and the exchange happens in a single transaction that either completes for both of them or reverts for both of them.

We wrote it against Ethereum because that is the toolchain we knew. We are rebuilding it because a public chain is the wrong venue for a private trade.
3,726Bytecode bytessolc 0.8.24, optimizer on, limit 24576
5Functionspropose, fund, settle, cancel, get
2Parties per swapno third party ever holds funds
9Tests writtenFoundry suite, written not yet run

WHAT RUNS NOW

The Solidity version, exactly as it stands.

A bilateral escrow contract in Solidity. It compiles, the logic is complete, and it has not been deployed anywhere. Everything below is checkable against the source, which is in the repository.

ContractBilateralSwap.sol, 131 lines, no inheritance, no proxy, no admin
Compilersolc 0.8.24 with optimizer, 3,726 bytes of bytecode
SettlementOne settle call moves both legs. Partial settlement is not reachable.
Failure modeEither party can cancel after the deadline and both deposits return
CustodyThe contract holds during the window. No admin key exists that can move funds.
Tests9 written against Foundry covering settle, cancel, deadline and access paths. Not yet run.
DeployedNowhere. Not on mainnet, not on a testnet.

We would rather say the contract is not deployed than point at a testnet address nobody can find. Every line above can be checked by cloning the repository and compiling it, which takes about a minute.

Both or Neither is built and operated from Indonesia. It is not an exchange, a broker, or a money services business. It does not custody assets outside the duration of a settlement window, holds no financial services or commodity trading licence, and nothing on this page is an offer to trade or a solicitation to do so.