Loops House


Ayo
A price feed that decides which Textile corridor is worth quoting, and turns the rest off.

Agents on Open Rails Hackathon
Team
1 member- OLOwner
Olarewaju Akeem
Overview
Textile's filler guide says a filler's results are decided by its price feed: compare more than one source, your quotes are only as good as your feed. Stitch, the reference bot every operator starts from, turns that into static configuration - one feed URL, one spread, set once at install. Ayo is the feed instead of the configuration.
WHAT I MEASURED. Every Celo corridor, every thirty seconds, 27 Oct to 1 Nov: 22,880 observations. Reproducible from the repo with one command.
Spreads do not sit still. wARS travelled 129x across the window. cNGN was 28.4bp one morning and 0.22bp the same evening. No number typed at install time is right for long.
At a $25 clip, after the 1bp protocol fee and gas, cNGN - the corridor Stitch preloads and most operators pick - was below cost or unquotable 96.6% of the time, and another corridor paid more 79.7% of the time. IDRX was net-positive 83.1% of the time and almost nobody is on it.
THE CAPITAL FLOOR. Gas is a basis-point cost, not a flat one: half a cent is 5bp on a $10 fill and 0.5bp on a $100 one. To win a request you must quote inside the market, no wider than half the venue spread. To make money you must quote wider than your costs. Below some clip size those two constraints stop overlapping - every price that wins is a loss, and every price that profits is outside the market. Solved against measured spreads: IDRX needs $14, wBRL $47, wARS $50, and cNGN is impossible at any size because half its median spread is less than the protocol fee alone. I have not seen that number published anywhere.
WHAT IT DOES. Ayo prices all five corridors each poll, costs each at the clip actually being traded, and gates them through the one lever Stitch already respects: freshness. A corridor that clears its costs gets a current timestamp and Stitch quotes it. One that does not gets an honestly old one, and Stitch stands down by itself - no restart, nothing to supervise. It also leans the published price when the book is lopsided, which moves Stitch's bid and ask together and walks inventory back toward balance. That was added after five days of quoting left the wallet entirely in cNGN and unwinding it cost about 1% of the book.
WHAT THE NAIRA BASIS ACTUALLY IS. Mento runs a separate naira market on the same chain in NGNm. For five days I described the cNGN-NGNm gap as a plumbing artefact - a fact about two different tokens, with information only in its drift from its own mean. That was the honest reading of what Celo alone can show, and it was the wrong description.
Nigeria has two dollar prices: the official rate, and the street rate people actually transact at. Neither anchor is on-chain, so no amount of on-chain measurement settles it. So the agent bought them. Reading the official and street rates against Textile and Mento at the same moment: cNGN sits 2.32bp from the street rate and 217.93bp from the official rate - 94x further. The corridor is priced off the parallel market, which means that basis is substantially Nigeria's parallel-market premium, and this agent had been sampling a piece of Nigerian macroeconomics every thirty seconds without knowing what it was looking at.
The practical consequence for any filler: sanity-check a naira corridor against an official or bank-sourced USD/NGN rate, which is what most price APIs return by default, and you read a permanent 200bp+ error as a mispricing. You then either stand down constantly or quote into a gap that is not there.
WHAT IT PAYS FOR (x402 on Celo mainnet, from the tagged wallet). Two things this feed needs cannot be coded around, so it buys them.
-
An independent naira anchor. naira-rates/usd-ngn sells the official rate plus street rates from Quidax and Luno P2P books, 0.01 USAT a call. That purchase is what produced the finding above. The seller takes USAT and nothing else, so the agent first swaps USDT for USAT on Uniswap - the token you hold and the token a seller accepts are not the same token, which is an ordinary problem for any agent buying from more than one seller.
-
An hour of stateful compute. Ayo refuses to report a basis mean before 120 samples, and the hosted copy is serverless with no disk, so it can never warm up and stands down on the naira forever. 120 samples at 30s is about an hour; a gateway lease is 3600 seconds. One lease is one warmup, so it rented an e2-micro for 0.016753 USDT - tx 0xb3cebffdac96c89e3440eb7b7e1960a949a0406952b777ff08459ee3bd09e7ed.
That rental returned nothing. The script printed only at completion and was sized at 54 minutes inside a 60-minute lease, so when the lease expired the output was destroyed. The payment is real and on-chain; the data it bought does not exist. The repo says so, and the committed calibration is labelled as local observation rather than bought observation. Two findings from getting x402 working on Celo were filed upstream as celo-org/buy-skill#77, including a correction of my own mistaken report.
Read those payments through their ERC-20 Transfer logs, not the tx sender: x402 settles as an EIP-3009 authorisation, so the gateway's facilitator broadcasts and pays gas while the agent wallet is the payer.
HONEST RESULT. This ran on a book around $12 - under IDRX's $14 floor, the cheapest corridor on the venue. At that size the correct behaviour is to stand down and wait for the moments when a spread gaps wide enough to pay for a small clip, and that is what it did. I did not out-earn anyone. I measured why a book this size cannot, bought the data that corrected my own central claim, and built the agent that acts on both.
Running on Celo mainnet from 0xc3A2AE793B4aCC88620E538201913A7F042edA0D. Stitch prices off ayo-navy.vercel.app/feed/; ayo-navy.vercel.app/debug shows every corridor's decision and the reason for it.