Listed from the MCP registry; nobody on Odel publishes it.
Is this yours? Claim itUnreachable. The endpoint has not answered since 21 Nov.
Conditional USDG payments on Robinhood Chain: look up, explain and prepare if-so payments.
One address for any MCP client. No sign-in needed on this server.
At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
Odel could not list its tools without signing in.
Ifso holds USDG in a non-custodial escrow contract on Robinhood Chain and sends it to the recipient only when a condition is met: a date, a price, a match result or market resolution, both sides agreeing, or a referee's decision. If the condition is not met by the expiry time, anyone can send the money back to the sender. Claim links, a Telegram bot and a web API sit on top of the contracts. The contracts do not depend on any of them.
This repository holds the Solidity contracts (contracts/), the Bun services (app/) and the website (web/), which
talks to the API from the visitor's browser.
New to wallets? ifso.tech/start walks through a first if-so payment in 5 steps.
| Path | What it holds |
|---|---|
contracts/ | Foundry project: Solidity 0.8.28, no external dependencies, not upgradeable. Sources, tests (unit, fuzz, invariant, fork), deploy scripts, CI tools, threat model, invariants |
app/ | Bun, Hono, tRPC, Drizzle, BullMQ, viem and grammY: API, Telegram bot, keeper, price watcher, outcome resolver, indexer, notifier |
web/ | Next.js 16 website: landing pages, dashboard (create, history, approvals, refunds), claim page and wallet-link page, wired to the API through @ifso/client |
app/src/client/ | @ifso/client, a browser package for the website (typed API calls, signing helpers, claim page) |
app/scripts/ifso-cli.ts | Command line tool to read, refund, settle and claim with only an RPC (see the last section) |
app/scripts/server/ | Scripts for one Ubuntu server: provision, deploy with rollback, systemd units, Caddy, backups |
app/scripts/release/ | The release runner for the 72 hourly tech updates: install, arming, pipeline with rollback, preflight, sandbox proof; see its README.md |
FRONTEND.md | Integration guide for the website: every API call, the signing steps and the copy rules |
SECURITY.md | Reporting, scope, trust assumptions, owner powers, accepted risks, review history |
CHANGELOG.md | What changed, newest first |
.github/, .githooks/ | CI workflows and the pre-commit checks |
| Contract | What it does |
|---|---|
IfsoEscrow | Holds USDG until the condition decides: release to the recipient, return to the sender, or return each side its own amount. Creation by allowance, EIP-2612 permit, EIP-3009 authorisation or batch. Anyone can refund after expiry, and refunds are never paused |
IfsoConditionEvaluator | Checks TIME, PRICE (Chainlink round proofs, Pyth adapter off by default) and OUTCOME conditions. Keeps the registry of feeds and resolvers; changes to it apply to new payments only |
IfsoOutcomeResolver | Bonded results with a 2 hour dispute window and a fallback panel. If the panel stays silent the question is VOID and each side gets its own money back |
FeeRouter | Splits the flat creation fees 80 / 10 / 5 / 5 between work, treasury, perks and burn |
| Network | Use | Chain id |
|---|---|---|
| Robinhood Chain | Production (addresses in Deployment below) | 4663 |
| Robinhood Chain testnet | Rehearsal before production | 46630 |
| Local anvil | Tests and rehearsals only | 31337 |
The token is USDG (6 decimals). Chain facts used by the code are re-checked on chain before every deploy.
Requirements: Foundry 1.8.4, Bun 1.4 or later, Docker (for the local Postgres 16 and Redis 7), and optionally Halmos and Slither for the extra checks in CI.
git clone <this repository> && cd <this repository>
docker compose up -d # Postgres on 5442, Redis on 6389
cd app && cp .env.example .env && bun install
bun run db:migrate
bun run api # HTTP API
bun run worker # keeper, price watcher, resolver, indexer, notifier
bun run bot # Telegram bot with long polling, for local work
Every setting is documented in app/.env.example. Hot keys (relayer, keeper, resolver) are encrypted keystores with a
password file each; a raw private key in the environment is accepted only on a local chain.
| Suite | Command | Covers |
|---|---|---|
| Contracts | cd contracts && forge test | Unit, fuzz and quick invariant tests |
| Invariants | FOUNDRY_PROFILE=invariant forge test --match-test invariant | 10,000 runs at depth 50 |
| Fork | RHC_FORK_RPC=<rpc> forge test --match-path 'test/fork/*' | Real USDG, Chainlink and Stock Token state; skipped without the variable |
| App | cd app && bun test | Parser, builder, signatures, relay, API, bot copy, keeper, price watcher and indexer on a private anvil |
| Types | cd app && bunx tsc --noEmit | Type check |
| Extra checks in CI | See .github/workflows/ | Format, size limit, NatSpec, owner powers listed in SECURITY.md, Slither allowlist, Semgrep on app/ (own rules, exact-match allowlist), mutation score, Halmos proofs, coverage, secret scan, banned-word copy test |
Short version; the full table, scope and accepted risks are in SECURITY.md.
| Party | Can | Cannot |
|---|---|---|
| Owner multisig (2 of 3) | Set creation and resolver fees (each at most 5 USDG), pause new payments, set or remove the launch cap, choose which feeds and resolvers new payments may use, replace the panel after a 48 hour delay | Move, redirect or freeze escrowed USDG, or stop refunds, claims and decisions |
| Panel multisig | Decide disputed outcome questions within 72 hours | Touch any other payment. Silence means VOID |
| Resolver service | Register questions and propose results with a bond that anyone can dispute | Hold user funds |
| Referee (chosen per payment) | Release to the recipient or return to the sender | Anything else |
| USDG issuer | Freeze any address, including the escrow | Outside the control of this project; stated on every create and claim page |
The contracts have not had an external audit. They have had internal reviews, listed in SECURITY.md.
| Limit | Value |
|---|---|
| Launch cap per side of a payment | 1,000 USDG (maxAmount, new payments only; exits never depend on it) |
| Creation fee and resolver fee | At most 5 USDG each (hard cap in the contract) |
| Outcome dispute window | 2 hours; panel decision window 72 hours |
| Panel change delay | 48 hours |
| Contract size | Below 24,576 bytes each |
| Batch plans | Up to 5,000 rows, with per-level limits described in FRONTEND.md |
The API serves an MCP server at https://api.ifso.tech/mcp (Streamable HTTP, POST, no sign-up and no key). It reads and
prepares only: it never signs, never holds a key and never sends a transaction. The person signs in their own wallet.
| Tool | What it does |
|---|---|
ifso_version | Build, chain id, contract addresses and fees (the same answer as GET /v1/version) |
ifso_get_payment | State of one payment by id, read from the chain (ids up to 78 digits, as a string) |
ifso_list_conditions | Condition types, example commands, price tickers, timing rules and the contract's amount limits |
ifso_prepare_payment | Preview plus the unsigned USDG approve and create transactions, or the gasless typed data to sign |
ifso_list_payments | Payments where an address is the sender or the recipient, newest first, 20 at a time with a cursor (the dashboard's list) |
ifso_quote_fees | Creation fee and result fee for a condition kind, from the same contract read as GET /v1/version; with an amount, the total and the limits |
ifso_explain_payment | One payment in plain words: what it waits for, the deadline, who can do what next and when it comes back |
Add it to Claude Code: claude mcp add --transport http ifso https://api.ifso.tech/mcp. Claude Desktop: Settings,
Connectors, Add custom connector, URL https://api.ifso.tech/mcp. Any other MCP client: {"mcpServers": {"ifso": {"type": "http", "url": "https://api.ifso.tech/mcp"}}}. Opening the address in a browser shows the same setup, and
the site's /mcp page explains it with copy buttons.
Setup guides for Claude Code, Claude Desktop, ChatGPT, Cursor, VS Code, Windsurf and Gemini CLI: ifso.tech/mcp.
Limits: 60 messages a minute per network (plus the API's read budget), 64 KB per request, 20 messages per batch; a
browser page on another site is refused. Code: app/src/api/routes/mcp.ts and app/src/api/mcp/.
v2.1 adds a release window to a v2 payment, so an x402 seller is paid on delivery. The seller's 402 offers plain x402
exact (EIP-3009 USDG on Robinhood Chain, eip155:4663) whose payTo is the payment's own v2.1 address, plus an
ifso-conditional extension with the full terms. Any facilitator that settles USDG on Robinhood Chain lands the money
there with no code change. The buyer recomputes the address from the terms before signing, so a server cannot swap the
recipient, the refund address or the condition.
releaseAt passes with no dispute: anyone can call releaseUndisputed, and IFSO's releaser does.releaseAt the buyer can dispute, directly or by signature (decideBySig action 5, relayed by anyone). Then only
the referee decides; if the referee stays silent, the money comes back to the buyer at expiry. The buyer's own OK pays at
once and the seller's decline sends the money back.releaseAt and expiry (factory check code 15).POST /v1/v2/prepare (and the MCP tool ifso_prepare_v2_payment)
take an optional releaseAt (unix seconds) with the APPROVE_REFEREE condition. Without an expiry, the money comes
back 2 days after the window if a dispute is never decided. A bad window gets its own code: WINDOW_NEEDS_REFEREE,
WINDOW_IN_PAST, WINDOW_TOO_LONG or WINDOW_TOO_CLOSE_TO_EXPIRY. The website calls this "Pay on delivery" and
charges the ordinary fee.| Route | What it does |
|---|---|
POST /v1/v2/x402/requirements | PaymentRequirements and the ifso-conditional extension for a buyer, seller, referee and amount |
POST /v1/v2/x402/check | Checks an offer against IFSO's own v2.1 factory before signing |
GET /v1/v2/x402/status/:termsHash | pending, settled, duplicate_swept, released, disputed or returned |
GET / POST /v1/v2/vaults/:vault/dispute | The typed data the buyer signs to dispute; the relay that sends it (IFSO pays the gas) |
GET / POST /v1/v2/vaults/:vault/claim | A v2 or v2.1 claim link: what it holds and what the link key signs; the relay that binds the recipient (IFSO pays the gas) |
GET /v1/echo/x402 | IFSO Echo: answers a 402, then a receipt once paid, and sends the payment back (the fee is kept) |
MCP tools (read and prepare only): ifso_prepare_x402_conditional, ifso_check_x402_offer, ifso_dispute,
ifso_release_status. TypeScript SDK with an Express middleware (onPaymentVerified / onPaymentSettled hooks):
packages/x402-conditional (MIT, not published yet). The live v2 factory keeps working next to v2.1: payments made
there are tracked and finished as before. Everything v2.1 is off unless V21_ENABLED=1.
v2.1 mainnet addresses (the fee sink is the FeeRouterV2 listed under Deployment; both verified on Sourcify):
| Contract | Address |
|---|---|
| IfsoVaultFactory (v2.1, block 110058942) | 0x71AD50225006Dd6168AC2F0479946416b72a7c76 |
| IfsoVault (v2.1 template, cloned per payment) | 0x9910E2C240D2090F904b1d9DfE31170654b5CdfD |
Follow SECURITY.md. Please do not open a public issue for a vulnerability and do not test against live deployments.
| Network | Chain id | Status |
|---|---|---|
| Robinhood Chain | 4663 | live since 2026-11-06 (commit d6b7a57, block 107148809), escrow 0x0Ee8278eA68dD41eaa8291F92FEAC1550Cc66E5e, owned by the owner multisig 0xd21656B6ddA03246E63903Bc23F26494fAfc59d1; Sourcify match on all 4 contracts |
Mainnet contracts (Robinhood Chain, 4663):
| Contract | Address |
|---|---|
| IfsoEscrow | 0x0Ee8278eA68dD41eaa8291F92FEAC1550Cc66E5e |
| IfsoConditionEvaluator | 0x527187721ebA582E721014aeF57c4beC95DAdCA9 |
| IfsoOutcomeResolver | 0xCA729a22d6bcd7E7C56d20A270af1baEb37C8AE8 |
| FeeRouter | 0xdB9E99AC28B5CC8C9e771FDdc4E0a09F08D90D25 |
| IfsoVaultFactory (v2, block 110013881) | 0xAA4AC76fAdeC7e19f3fb8167ecB3A78fdf42DFf3 |
| FeeRouterV2 (v2) | 0x2F6B5BE42D34215B320A19D7Fb9dE3736e8007ED |
| IfsoVault (v2 template, cloned per payment) | 0x695b95a3c864174a1CfAB11984aeAed8498943f3 |
Verified source: https://repo.sourcify.dev/4663/<address> for each address above.
| Robinhood Chain testnet | 46630 | rehearsal deployment v2 (commit 2cd783d), escrow 0x154Fb83621180f9Dfe80EC3382107C864e79626F (Sourcify match on all 4 contracts; test tokens only) |
Addresses, deploy block, transaction hashes, constructor arguments and the commit of every deployment are recorded
in contracts/deployments/<chainid>.json (4663.json for mainnet and 46630.json for the testnet; the site keeps an equal copy in
web/src/config/deployments/, made by bash web/scripts/sync-deployments.sh and checked by a test). The deploy script reads no private key (it signs with
forge script --account <keystore> or --ledger), refuses to run on 4663 or 46630 unless IFSO_ARMED=1 and
contracts/.armed-<chainid> both exist, hands every contract to the owner multisig and asserts the result.
After a deploy: forge script script/PostDeployCheck.s.sol --rpc-url <rpc> re-checks it and
bash script/verify-sourcify.sh <chainid> publishes the source on Sourcify. A local rehearsal on anvil:
bash script/local-deploy.sh <port>.
The contracts do not depend on the website, the Telegram bot or any Ifso server. If those are gone, your money is still
in the escrow contract and you can get it out yourself. You need your payment number (the id) and a wallet that holds a
little ETH for gas on Robinhood Chain. The escrow address for each deployed network is in contracts/deployments/<chainid>.json
and in the Deployment table above (chain 4663 is Robinhood Chain; it has no file until it is deployed), and its verified
source is on Sourcify and the block explorer.
Which function to call:
| Situation | Function | Who can call it |
|---|---|---|
| The expiry time has passed and nothing decided the payment | refund(id, senderAlt, counterAlt) | Anyone. The money always goes to the sender's refund address (or the alternate one if you pass true). |
| A date payment whose date has passed | settle(id, 0x, false) | Anyone |
| A price payment after its deadline | settle(id, proof, false), where the proof is the price round number | Anyone (the CLI below builds the proof) |
| You are the sender and the payment was marked cancellable (or a challenge nobody accepted) | cancel(id) | The sender |
| You received a claim link | claim(id, yourAddress, signature) | Anyone (the signature fixes the recipient) |
refund, enter the id as a number, leave senderAlt and counterAlt as false, and send. If the
explorer says the call would fail, the expiry has not passed yet: check getEscrow(id) under Read contract
(expiry is a Unix time, status 1 means open).cancel and settle for a date payment (proof 0x), the same steps apply.Price payments and claim links need a proof or a signature that is awkward to produce by hand. Use the command line below.
cd app && bun install
bun scripts/ifso-cli.ts status <id> # what state is it in, when can it be refunded
bun scripts/ifso-cli.ts refund <id> [--alt-sender] [--alt-counter] # after expiry
bun scripts/ifso-cli.ts settle <id> # date, price or result payments: builds the proof
bun scripts/ifso-cli.ts claim <id> --link-file - --recipient <your address> # paste the claim link, then Ctrl-D
bun scripts/ifso-cli.ts claim-void <id> [--side sender|counter] # a voided challenge side that is still held
bun scripts/ifso-cli.ts list --sender <your address> # your payments, read from chain logs
The tool uses https://rpc.mainnet.chain.robinhood.com by default (--rpc <url> to change it) and reads the escrow
address from contracts/deployments/<chainid>.json (or pass --escrow <address>). It needs no database, no Redis and no
Ifso server. It never holds a key and never sends anything: it checks the call with a dry run, then prints the
to, data and value plus a ready cast send line (Foundry) that you run with your own keystore or Ledger, for example
cast send <escrow> "refund(uint256,bool,bool)" <id> false false --rpc-url <rpc> --keystore <file>. Add --json for
machine-readable output. Claim links keep their secret after the #; the tool uses it on your computer only and never
prints it.
License: MIT.