Method
What runs, what is checked, what is not.
- 01 RequestYou choose buy or sell, the asset, the amount, your price limit and how long the request stands. The limit stays with your agent.
- 02 MatchCounterparties on the other side are tested for size and price overlap after the fee; each one gets a reason in numbers.
- 03 RevisionsThe agents (or the people) propose terms. Each proposal is revision n with hash H(n) = keccak(tag, H(n-1), deal, n, proposer, side, price, fee, recipient, expiry, note hash); revision 1 chains from the deal's own hash.
- 04 ChecksBuyer budget: gross ≤ max gross. Seller minimum: gross − fee ≥ min net. Plus expiry, balances and allowances. checkDeal() returns them as bits.
- 05 ApprovalSeller and buyer each approve one revision number and hash. Any new revision voids older approvals; either side may withdraw.
- 06 Settlementsettle() or approveAndSettle() moves the asset seller → buyer, net buyer → seller and fee buyer → recipient with transferFrom, in one transaction, and checks each arrival.
Fee and net
fee = ⌊gross × feeBps / 10,000⌋ · net = gross − fee
The fee is optional, at most 100 basis points (1 %), and goes to a third-party recipient named in the revision (a broker or the operator of an agent). It cannot go to the buyer or the seller. Rounding is down, so the seller never pays more than the stated rate. Semvio itself charges nothing and the room has no fee switch.
The smallest gross that leaves a seller at least a given net is computed exactly (minGrossForNet), so the agent can turn a seller's minimum net into a gross floor. The site and the contract share the same integer math; tests run fixed vectors on both.
Reason codes
One bit per reason, the same on the site and in the contract
| Bit | Name | Meaning |
|---|---|---|
| 0 | No such deal | The deal number does not exist in this room. |
| 1 | Deal closed | The deal was already settled or cancelled. |
| 2 | Deal expired | The deal's validity window has ended. |
| 3 | Offer expired | The current revision's own expiry has passed: propose a new revision. |
| 4 | Seller has not approved | The seller has not approved this exact revision. |
| 5 | Buyer has not approved | The buyer has not approved this exact revision. |
| 6 | Seller balance too low | The seller's wallet holds less of the asset than the deal amount. |
| 7 | Seller allowance too low | The seller has not allowed the room to move the asset amount yet. |
| 8 | Buyer balance too low | The buyer's wallet holds less of the quote token than the gross price. |
| 9 | Buyer allowance too low | The buyer has not allowed the room to move the gross price yet. |
| 10 | Over the buyer's budget | The gross price is above the buyer's maximum. |
| 11 | Under the seller's minimum net | After the agreed fee, the seller would receive less than their minimum. |
| 12 | Token has no code | One of the token addresses is not a contract on this network. |
| 13 | Fee above 1 % | The agreed fee may be at most 100 basis points. |
| 14 | Fee recipient not valid | A fee needs a third-party recipient (not the buyer or the seller); no fee means no recipient. |
| 15 | Zero amount | Amounts must be above zero. |
| 16 | Offer window not valid | An offer must expire in the future and no later than the deal itself. |
| 17 | Not the current revision | Someone proposed a newer revision; review that one instead. |
| 18 | Not a party | Only the seller, the buyer or (for proposals only) their appointed agent may do this. |
| 19 | Revision limit reached | A deal may collect at most 64 revisions. |
A reverted transaction leaves no event, so the site runs checkDeal() and checkTerms() as free reads first and shows these bits before your wallet opens.
The contract
SemvioDealRoom (+ library SemvioFeeMath)
- · openDeal, proposeRevision, approve, approveAndSettle, settle, withdrawApproval, cancel, setAgent; views getDeal, dealsOf, checkDeal, checkTerms, previewRevisionHash, quote, minGrossForNet.
- · Non-custodial: transferFrom straight between the two wallets; the room's balance is zero before and after every call. No payable function.
- · No admin, no protocol fee, no upgrade, no pause over other people's deals. Reentrancy guard on every state change; effects before token calls.
- · Tokens that return nothing are handled; tokens that return false revert; fee-on-transfer tokens are refused (each arrival must equal the amount sent). Native ETH is not supported: wrap it to WETH.
- · Agents may only propose for their side. Removing an agent takes effect for the next transaction, even in the same block.
- · Limits: deal window up to 30 days, offer expiry inside it, 64 revisions per deal.
- · No independent security review yet. Start with small amounts.
Robinhood Chain (4663): 0xf69e694c36535b7509c35f9a64ae63620a760e4f
Robinhood Chain Testnet (46630): not deployed yet
Data sources
What is read live, and from where
| Block, gas price | JSON-RPC of each network (official endpoint first, public fallbacks), through the site's rate-limited read relay. |
| ETH reference price | Chainlink ETH / USD on Robinhood Chain, 0x78f3556b67e17df817d51ef5a990cdaf09e8d3a9, with its update time. |
| Stock tokens | Listed only when the proxy code hash is 0x6c1fdd40…, its ERC-1967 beacon is 0xe10b6f6b…, its supply is above zero and Chainlink lists a feed for it (feed directory) that answers now. A ticker alone proves nothing. Feeds follow market hours and can be a day old on weekends; the age is always shown. |
| WETH / USDG | WETH and USDG (Global Dollar, 6 decimals) on mainnet; on the testnet, WETH whose ETH balance is checked against its supply live. |
| Deals | The room's views and logs; the revision chain is re-hashed on the server and compared with what the room stores. |
| Practice desks | Sample data: six desks whose limits sit around the reference price. Labelled wherever they appear. |
Board, sessions and alerts
What the server keeps, and how it checks you
- · Sign-in: one EIP-4361 message (no gas) for semvio.xyz, chain 4663, valid at most 4 hours. The server checks the signature, a fixed list of domains (never the request's Host header), the chain, the expiry and that you did not sign out, on every request. EOA wallets only.
- · Tier: balanceOf × 1000 ≥ totalSupply on the $SEMVIO contract, read at each holder action (cached 30 seconds per wallet). Before launch everyone is on the free tier.
- · Board: public requests (side, asset, size, indicative unit price, validity). Limits per wallet by tier, per network and for the whole site; a full board refuses new posts and never drops anyone's request. Holder requests are listed and matched first.
- · Storage: a shared store when configured; otherwise this server's memory (bounded, with expiry), and the page says data may be lost on restart.
- · Alerts: derived from the deal room's events for your wallet on request; nothing is stored about you on the server. Browser notifications only while a tab is open.
Status
- Deal card, revisions, checks, approvals, practice settlementPrototype
- On-chain deals on Robinhood Chain and Robinhood Chain TestnetPrototype
- Deterministic agent proposing inside one limitPrototype
- Matching board: post a request, see crossing requests on the other side, open the dealPrototype
- Holder tier (0.1 % of $SEMVIO supply, read on chain): board priority, templates, team workspacePrototype
- Alerts: bell inbox and browser notifications from the room's eventsPrototype
- Automatic negotiation between two real users' agents on the boardConcept
- Language-model assistant that drafts notesConcept