FX Agent Designed to Refuse Most of the Time
An FX agent was developed on Celo to convert USDT into various Latin American currencies, but it is designed to refuse most transactions. The agent operates under strict constraints and uses a decision engine to record…

The agent was developed under the constraint that no personal_sign or eth_signTypedData could be used on the money path, and no CELO could be displayed in the UI. It leverages Celo's features, including stablecoins, a firm quote RFQ venue in Textile, and CIP-64 for stablecoin fee payments. The agent is designed to refuse conversions when the exchange rate does not meet a specified target, recording the refusal as evidence of its decision-making process. This approach ensures that the agent's output is not just a conversion but a documented refusal, which can be audited by finance teams. [1]
The decision engine uses a pure function to evaluate six gates before making a decision on whether to convert or refuse. These gates check factors such as the age of the quote, the depth of the book, and the daily cap on transactions. If the rate is below the target and the deadline has not passed, the agent refuses the conversion, recording the reference, the gap in basis points, and the cost avoided. This refusal is structured as a receipt that can be reviewed and verified by stakeholders. [1]
The agent uses CIP-64 to allow transactions to pay their fees in stablecoins, which is essential for an agent that operates on stablecoin funding without holding CELO. It also incorporates ERC-8021 for transaction attribution, ensuring that every transaction is tagged with a specific code that can be traced back to the agent. This tagging is built into the wallet client at construction, ensuring that the attribution is a permanent part of every transaction sent by the agent. [1]
The ledger used by the agent is a chain of JSONL entries, each with a hash that depends on the previous entry. This structure ensures that any modification to the ledger after the fact can be detected. The ledger is append-only and can be verified independently by anyone with access to the file. This design ensures that the agent's decisions are recorded in a way that is tamper-evident and verifiable, without relying on a centralized database or blockchain. [1]
Advertisement
The FX agent operates under a constraint that no personal_sign or eth_signTypedData can be used on the money path, and no CELO can be displayed in the UI. This constraint shapes the design of the agent, focusing it on a decision engine whose output is evidence rather than a traditional UI for moving money. The agent is built to refuse conversions when the quoted rate is below a specified break-even rate, ensuring that only favorable trades are executed. This mechanism allows the agent to produce receipts that detail the refusal, including the print, reference, bps gap, and the dollar cost avoided (source: 1). [1]
The decision engine evaluates six gates before making a decision to convert or refuse. These gates ensure that the agent only proceeds with a trade if certain conditions are met, such as the freshness of the quote, the depth of the book, and the dislocation of the price. If any of these conditions are not met, the agent refuses the trade and records the reason for the refusal. This approach ensures that the agent's decisions are transparent and verifiable, providing a clear audit trail for all transactions (source: 1). [1]
The agent uses CIP-64 to allow transactions to pay their fees in stablecoins, which is essential for an agent that operates on stablecoin funding without holding CELO. This feature ensures that the agent can operate efficiently without the need to hold a gas token it does not use. Additionally, the agent uses ERC-8021 for attribution, ensuring that every transaction is tagged with a unique identifier, making it easier to track and verify the agent's actions (source: 1). [1]
The FX agent was developed under the constraint that no personal_sign or eth_signTypedData could be used on the money path, and no CELO could be displayed in the UI. The agent uses a decision engine that evaluates six gates before making a decision on whether to convert or refuse. This engine is a pure function that ensures all policy is in one place and is testable without a chain, a mock, or a clock. The decision engine is designed to refuse conversions when the target rate is not met, and records the print, reference, bps gap, and the dollar cost avoided. This approach allows the agent to function as a decision engine rather than a cron job with a market order attached. [1]
Advertisement
The agent uses CIP-64 to allow transactions to pay their fees in stablecoins, which is essential for an agent that operates on stablecoin funding without holding CELO. The ledger used by the agent is a chain of JSONL entries, each with a hash that depends on the previous entry. This ledger is used to record the agent's decisions and ensure that no row is edited after the fact. The ledger is designed to be cheap, boring, and hard to fake, and it provides tamper evidence, ordering, and portability. The ledger is not consensus-based, but it is sufficient for an operator auditing their own agent. [1]
The FX agent's refusal logic is designed to produce receipts that finance teams can read and audit. The agent refuses conversions when the target rate is not met, and records the print, reference, bps gap, and the dollar cost avoided. This approach allows the agent to function as a decision engine rather than a cron job with a market order attached. The refusal logic is designed to ensure that the agent's decisions are verifiable and transparent, and that the agent's performance can be audited. [1]
Sources
Prepared with AI assistance from the cited sources.
The Cali Reporter newsletter
The stories worth your time.
California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.
More in Technology
- Modern Web Guidance 1.0 and Browser Compatibility
Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…
- Apache mod_http2 Vulnerability Detection with Nmap
A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.
- Securing Remote Vendor Access in Industrial Networks
Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.
