Loops House



Naira Desk

Agents on Open Rails Hackathon
Team
1 member- NAOwner
Nasihudeen Jimoh
Overview
Naira Desk is an autonomous agent that trades the naira on Celo. It makes a market in cNGN/USD₮ from a community-funded Textile FX vault, takes mispriced Textile quotes through its own contract, and decides when to quote, when to be careful and when to stop, using naira news and street rates it buys through buy. Every trade, payment and decision is public and linked to its Celo transaction.
What it does
In Lagos, a bureau de change (BDC) quotes both sides of the naira, watches the street rate, and grabs a good price when another dealer offers one. Naira Desk does the same job onchain, around the clock:
- Makes a market. It runs its own Textile FX Operator Vault for cNGN/USD₮. Liquidity providers deposit USD₮ or cNGN and get vault shares. Textile's Stitch bot quotes from the vault at the agent's price, read from the agent's own price feed, and Textile's Warp service co-signs every fill. The operator can't withdraw LP funds; the contract enforces it.
- Takes mispriced quotes. Every 15 seconds the agent compares what Textile makers ask for cNGN, wBRL and wARS with what Uniswap pays. When a gap beats the gas, its Taker contract buys the quote and sells it to Uniswap in the same transaction. The trade reverts unless the Taker ends with more USD₮ than it started with, and the contract can only ever pay out to the operator's wallet.
- Pays for what it knows. Every few hours, and immediately when the price jumps or cNGN drifts from the naira, the agent pays through buy for fresh X posts on the naira and CBN news, plus an AI rating of them. It reads the official and parallel street rates people are quoting and compares them with the onchain price. Then it sets the vault's mode:
- Normal: quote as usual.
- Caution: quote carefully.
- Halted: stop quoting for at least two hours, by making its price feed return an error so Stitch stops.
- Reviews its suppliers onchain. Once a day it rates each buy service it paid on that service's ERC-8004 identity, scored on how many paid calls delivered.
- Sells its own data. Other agents can buy its naira rate, which combines onchain cNGN, the official and street rates and its risk call, for $0.005 over x402. The agent settles each payment itself.
Live proof (Celo mainnet)
- Dashboard: https://naira-desk.vercel.app. It shows a live agent heartbeat, the rates, every risk decision, the vault, the Taker, reviews and sales, each linked to Celoscan.
- Agent: ERC-8004 #9908, wallet
0xE4D88C9A86bd42D4f5D05a234E6D56f71bB58582. 22 transactions, every one taggedcelo_1944046be211, and the wallet refuses to sign anything untagged. - Vault:
0xD7137d85607BE18628CE00B1020895cEBceEAD6C. 4 fills, 3 from independent takers. - Taker contract:
0xcf024F46d1756498f3ffD04F1Da4793eE1eFdA57, verified on Sourcify. 4 profitable trades so far, and trading live. - Research: 40 paid buy calls, 39 risk decisions, and 10 onchain supplier reviews.
How it was built
-
Agent (Node 24, TypeScript, viem): it combines
- a cNGN pricer, with a Uniswap TWAP checked against Luno and Textile;
- a risk desk with three modes, driven by paid buy research;
- a trader loop for the Taker;
- daily ERC-8004 reviews;
- an x402 paywall that settles EIP-3009 payments itself;
- a price feed for Stitch.
Every transaction goes through a wallet client that appends the ERC-8021 attribution tag and refuses to sign without it.
Taker contract (Solidity, Foundry): it fills a Textile firm quote made out to itself and sells to Uniswap's SwapRouter in one call. It proves control to Textile through EIP-1271 and only vouches for Textile's own taker-control message. Its tests replay real Textile fills on a Celo mainnet fork.
Indexer (viem, node:sqlite): it reads vault events, fills and Taker trades from chain, up to the safe head only, so a chain reorganisation can't undo a row. It serves the dashboard's numbers.
Dashboard (Next.js 16, React 19, Tailwind, shadcn/ui, Recharts): a terminal-style live view, with every number linked to its transaction.
Infrastructure: the agent, indexer and Stitch run 24/7 on Northflank; the dashboard runs on Vercel.