Listed from the MCP registry; nobody on Odel publishes it.

Is this yours? Claim it
MCP server: One MCP server.

IFSO

@ifsodevMCP server · External

Conditional USDG payments on Robinhood Chain: look up, explain and prepare if-so payments.

Blockchain datav1.0.0MITTypeScript
Freeno charge per call

One address for any MCP client. No sign-in needed on this server.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: only reads or looks up information.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Tools

None listed · checked 21 Nov 2026

Odel could not list its tools without signing in.

Try it in the Inspector
README13 min read

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.

Repository map

PathWhat 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.tsCommand 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.mdIntegration guide for the website: every API call, the signing steps and the copy rules
SECURITY.mdReporting, scope, trust assumptions, owner powers, accepted risks, review history
CHANGELOG.mdWhat changed, newest first
.github/, .githooks/CI workflows and the pre-commit checks

Contracts

ContractWhat it does
IfsoEscrowHolds 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
IfsoConditionEvaluatorChecks 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
IfsoOutcomeResolverBonded 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
FeeRouterSplits the flat creation fees 80 / 10 / 5 / 5 between work, treasury, perks and burn

Networks

NetworkUseChain id
Robinhood ChainProduction (addresses in Deployment below)4663
Robinhood Chain testnetRehearsal before production46630
Local anvilTests and rehearsals only31337

The token is USDG (6 decimals). Chain facts used by the code are re-checked on chain before every deploy.

Setup

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.

bash
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.

Tests

SuiteCommandCovers
Contractscd contracts && forge testUnit, fuzz and quick invariant tests
InvariantsFOUNDRY_PROFILE=invariant forge test --match-test invariant10,000 runs at depth 50
ForkRHC_FORK_RPC=<rpc> forge test --match-path 'test/fork/*'Real USDG, Chainlink and Stock Token state; skipped without the variable
Appcd app && bun testParser, builder, signatures, relay, API, bot copy, keeper, price watcher and indexer on a private anvil
Typescd app && bunx tsc --noEmitType check
Extra checks in CISee .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

Trust assumptions and owner powers

Short version; the full table, scope and accepted risks are in SECURITY.md.

PartyCanCannot
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 delayMove, redirect or freeze escrowed USDG, or stop refunds, claims and decisions
Panel multisigDecide disputed outcome questions within 72 hoursTouch any other payment. Silence means VOID
Resolver serviceRegister questions and propose results with a bond that anyone can disputeHold user funds
Referee (chosen per payment)Release to the recipient or return to the senderAnything else
USDG issuerFreeze any address, including the escrowOutside 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.

Limits

LimitValue
Launch cap per side of a payment1,000 USDG (maxAmount, new payments only; exits never depend on it)
Creation fee and resolver feeAt most 5 USDG each (hard cap in the contract)
Outcome dispute window2 hours; panel decision window 72 hours
Panel change delay48 hours
Contract sizeBelow 24,576 bytes each
Batch plansUp to 5,000 rows, with per-level limits described in FRONTEND.md

AI agents (MCP)

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.

ToolWhat it does
ifso_versionBuild, chain id, contract addresses and fees (the same answer as GET /v1/version)
ifso_get_paymentState of one payment by id, read from the chain (ids up to 78 digits, as a string)
ifso_list_conditionsCondition types, example commands, price tickers, timing rules and the contract's amount limits
ifso_prepare_paymentPreview plus the unsigned USDG approve and create transactions, or the gasless typed data to sign
ifso_list_paymentsPayments where an address is the sender or the recipient, newest first, 20 at a time with a cursor (the dashboard's list)
ifso_quote_feesCreation 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_paymentOne 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/.

x402 pay on delivery (v2.1)

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.

  • The seller is paid once releaseAt passes with no dispute: anyone can call releaseUndisputed, and IFSO's releaser does.
  • Before 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.
  • A window needs a referee and at least one day between releaseAt and expiry (factory check code 15).
  • A retried settle lands at the same address (the terms hash is the payment identifier); a full duplicate is swept back to the buyer.
  • The flat fee for these agent payments is 0.02 USDG; ordinary payments keep 0.25 USDG.
  • People can make the same kind of payment without x402: 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.
RouteWhat it does
POST /v1/v2/x402/requirementsPaymentRequirements and the ifso-conditional extension for a buyer, seller, referee and amount
POST /v1/v2/x402/checkChecks an offer against IFSO's own v2.1 factory before signing
GET /v1/v2/x402/status/:termsHashpending, settled, duplicate_swept, released, disputed or returned
GET / POST /v1/v2/vaults/:vault/disputeThe typed data the buyer signs to dispute; the relay that sends it (IFSO pays the gas)
GET / POST /v1/v2/vaults/:vault/claimA 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/x402IFSO 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):

ContractAddress
IfsoVaultFactory (v2.1, block 110058942)0x71AD50225006Dd6168AC2F0479946416b72a7c76
IfsoVault (v2.1 template, cloned per payment)0x9910E2C240D2090F904b1d9DfE31170654b5CdfD

Reporting a vulnerability

Follow SECURITY.md. Please do not open a public issue for a vulnerability and do not test against live deployments.

Deployment

NetworkChain idStatus
Robinhood Chain4663live 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):

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>.

Getting your money back without the website

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:

SituationFunctionWho can call it
The expiry time has passed and nothing decided the paymentrefund(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 passedsettle(id, 0x, false)Anyone
A price payment after its deadlinesettle(id, proof, false), where the proof is the price round numberAnyone (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 linkclaim(id, yourAddress, signature)Anyone (the signature fixes the recipient)

With the block explorer (no software)

  1. Open the escrow address on the Robinhood Chain explorer (Blockscout) and choose the Contract tab, then Write contract.
  2. Connect your wallet.
  3. For a refund, open 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).
  4. For 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.

With the command line (needs only Bun and a public RPC)

bash
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.

Similar modules

Browse Blockchain data