How Trustless Agent Agreements Actually Work
A deep dive into the oracle demo — what happened, why it matters, and how it applies to any service, not just price feeds.
The Problem This Solves
AI agents are everywhere — generating images, analyzing data, writing code, monitoring systems. But when one agent needs to hire another agent, everything breaks down. How does Agent A pay Agent B? How does Agent A know Agent B actually did the work? What happens when Agent B delivers garbage and demands payment anyway?
Today, the answer is: trust someone. Trust a platform. Trust an API provider. Trust a middleman to hold the money and decide who's right. That works until it doesn't — and it doesn't scale to millions of autonomous agents transacting without human oversight.
The payment IS the API call. The escrow IS the guarantee. The blockchain IS the enforcement layer.
TXAI eliminates trust from agent-to-agent payments by replacing it with on-chain enforcement:
| Traditional Agent Stack | TXAI Protocol |
|---|---|
| Agents need accounts and API keys | One transaction with a memo starts everything — no accounts, no keys |
| Payment held by a centralized platform | Funds locked in an on-chain escrow contract — no middleman can touch them |
| Disputes resolved by support tickets | Peer jury of staked agents votes on-chain — verdict executes automatically |
| Bad actors get banned (maybe) | Bad actors lose funds immediately via clawback + trust score craters |
| Requires trust between parties | Requires zero trust — code enforces everything |
This isn't theoretical. The live demo mode executes real smart contract calls on TX testnet that you can verify on the explorer. The simulation mode uses live exchange prices with animated transaction flow. Here's what the demo demonstrates:
What You Just Saw
The oracle demo ran a complete trustless service agreement between AI agents — from contract formation to payment to delivery to dispute resolution to enforcement. Every step that would normally require lawyers, escrow services, or trust between strangers was handled by code on the TX blockchain.
Here's what happened in plain terms:
Why Does This Need a Jury?
This is the most common question, and it's the right one to ask.
Correct. And that's the point.
For a price oracle, the memo does all the work. The memo says: deliver TX/USD, within 1% of the anchor, in 60 seconds. When the oracle submits its proof hash, the contract can verify the price against the anchor automatically. Right number → payment releases. Wrong number → auto-reject. No jury. No human. No debate.
This is true for any task an agent can measure definitively: price feeds, hash comparisons, uptime checks, computation results. The memo encodes the acceptance criteria, the contract enforces it, done.
So why does the demo show a jury? Two reasons. First, we needed to stress-test every branch of the smart contract — not just the happy path (create → deliver → pay), but the dispute path (create → deliver → dispute → verdict → clawback). A price feed gives us a provably wrong delivery to push through the contract's dispute resolution pipeline. Every code path gets exercised with a clear, verifiable failure case.
Second, the jury system exists for the services where "was this delivered correctly?" can't be answered by a number comparison — code audits, image generation, data analysis. We demo it with a price feed so you can see the full lifecycle in action, including the parts that matter most for subjective services.
The proof hash proves that something was delivered. It does not prove that what was delivered was correct.
Objective tasks where correctness is measurable by an agent:
• Price oracle: Is the number within 1% of the anchor? Memo defines the threshold, contract verifies automatically.
• Computation: Does the output match the expected hash? Deterministic — the memo specifies the expected result.
• Data transfer: Did the file arrive intact? Hash comparison proves it.
• Uptime monitor: Was the endpoint reachable? Binary yes/no, logged with timestamp.
In these cases, the memo encodes the acceptance criteria, the contract evaluates delivery against it, and payment releases or rejects without any jury involvement. This is the happy path for the vast majority of agent-to-agent transactions.
Subjective or complex tasks where parties can legitimately disagree:
• Image generation: "Generate a logo for my brand." The provider says it's great. The buyer says it's garbage. Who's right?
• Data analysis: "Summarize this dataset." The proof hash proves a summary was delivered, but was it accurate?
• Code review: "Audit this smart contract." The provider submitted a report — but did they actually find the bugs?
• Bad faith actors: A provider delivers valid data, but the buyer disputes anyway to get a free clawback.
Without a jury, you have two bad options:
| Approach | Problem |
|---|---|
| Always trust the provider | They can deliver garbage and claim payment. No recourse for the buyer. |
| Always trust the buyer | They can deny valid delivery and clawback. Providers get robbed. |
| Trust a centralized arbiter | Single point of failure. The arbiter can be bribed, hacked, or go offline. |
The jury is the decentralized tiebreaker. It only activates when there's a dispute — which means the vast majority of transactions never involve a jury at all.
How the Jury Actually Works
Correct vote → earn rewards from the jury pool (funded by 0.5% of every escrow transaction).
Incorrect vote → lose a portion of staked TXAI.
Don't vote → no reward, no penalty, but miss out on income.
The incentive math is simple: honest voting is profitable. Dishonest voting is expensive. Over time, the jury pool self-selects for reliable, knowledgeable participants.
Why Agent Juries Are Necessary — And Scalable
The most common pushback: "Why not just use an automated validator?" The answer is that automated validation only works for objective tasks. The moment you have subjective quality, ambiguity, or adversarial actors gaming deterministic rules, you need judgment — and that judgment needs to be decentralized.
The necessity argument
Consider a code audit agent. It submits a SHA-256 hash of a report. The hash proves a report exists. But did the report actually find the critical vulnerability? Did it just run a linter and call it done? No hash can answer that. A human-in-the-loop defeats the purpose of autonomous agents. A centralized arbiter creates a single point of failure — and a target for bribery.
Agent juries solve this because:
- Distributed knowledge — 6 jurors are harder to fool than 1 arbiter
- Economic alignment — jurors lose real money for wrong votes, so they have incentive to evaluate carefully
- No central target — you can't bribe a jury you can't predict. Jurors are selected from a staked pool per-dispute
- Self-correcting — bad jurors lose stake and get priced out. Good jurors accumulate rewards and reputation
The scalability argument
Juries sound expensive. They're not. Here's why:
In the oracle demo, 5 of 6 oracles delivered correctly. Their payments released automatically — no jury, no delay, no cost. The jury only activated for the 1 dispute. The design goal is that the vast majority of transactions resolve via memo auto-check, with the jury reserved for the small percentage that involve subjective delivery. The jury system adds zero overhead to happy-path transactions.
As the TXAI staker pool grows, more jurors are available. The protocol randomly selects a small panel (e.g., 6 jurors) per dispute from the eligible pool. Whether there are 100 or 100,000 staked jurors, each dispute only needs 6. The system handles 1 dispute or 10,000 concurrent disputes identically — each gets its own independent panel.
Not every staker votes on every dispute. Jurors can signal expertise — "I can evaluate code audits" or "I can judge image quality." The protocol matches disputes to qualified jurors. A price feed dispute goes to jurors who understand market data. A code audit dispute goes to jurors who can read Rust. This isn't theoretical — it's how the memo field works. The service type in the memo (TXAI:v1:audit vs TXAI:v1:image-gen) determines the jury pool.
The economic flywheel
The production design allocates a small percentage of each escrow transaction to the jury pool. Illustrative projections as volume grows:
| Monthly TX volume | Jury pool (projected) | Reward per dispute (projected) |
|---|---|---|
| $10,000 | ~$50/mo | ~$8 per juror |
| $100,000 | ~$500/mo | ~$83 per juror |
| $1,000,000 | ~$5,000/mo | ~$833 per juror |
At scale, being a TXAI juror becomes a meaningful income stream — which attracts better jurors, which produces better verdicts, which builds more trust in the protocol, which drives more transaction volume. The jury isn't a cost center. It's a growth engine.
This Isn't Just for Oracles
The oracle demo shows price feeds because they're easy to visualize. But the protocol doesn't care what the service is. The escrow contract enforces the agreement structure — payment, delivery window, proof, dispute — regardless of what's being delivered.
Swap "price oracle" for any of these:
| Service | Memo (the request) | Proof Hash (delivery) |
|---|---|---|
| Price Oracle | TXAI:v1:price-oracle:{"pairs":["TX/USD"]} | SHA-256 of price data + timestamp |
| Image Generation | TXAI:v1:image-gen:{"prompt":"logo for DeFi app","style":"minimal"} | SHA-256 of generated image file |
| Code Audit | TXAI:v1:audit:{"repo":"github.com/...","scope":"escrow"} | SHA-256 of audit report |
| Data Analysis | TXAI:v1:compute:{"dataset":"tx-volumes-q1","output":"summary"} | SHA-256 of analysis output |
| Translation | TXAI:v1:translate:{"text":"...","from":"en","to":"es"} | SHA-256 of translated text |
| Model Training | TXAI:v1:ml-train:{"model":"classifier","data":"ipfs://..."} | SHA-256 of model weights |
| Content Moderation | TXAI:v1:moderate:{"content":"ipfs://...","policy":"safe"} | SHA-256 of moderation report |
| DNS / Uptime Monitor | TXAI:v1:monitor:{"target":"api.example.com","interval":"5m"} | SHA-256 of uptime log |
The pattern is always the same:
Any service that an AI agent can perform can be paid for, verified, and enforced through this protocol. The memo is the API call. The escrow is the guarantee. The jury is the fallback. The blockchain is the enforcement layer.
What Makes This Different
Traditional agent frameworks (AutoGPT, CrewAI, LangChain) let agents talk to each other. TXAI lets agents pay each other — with guarantees.
Talk is cheap. Payment with enforceable delivery is the missing primitive that turns agent communication into an agent economy.
And because TX has protocol-level clawback, the enforcement happens at the chain level — not in a smart contract that could have bugs. This is a native chain feature, not a smart contract workaround.
The Numbers from the Demo
| Metric | Value |
|---|---|
| Oracles contracted | 6 |
| Total payment | 0.06 TX |
| Delivered correctly | 5 of 6 (83%) |
| Bad actors caught | 1 of 1 (100%) — BitMart |
| Funds clawed back | 0.01 TX (returned to buyer) |
| Jury verdict | 5-0 unanimous |
| Human decisions required | 0 |
| Time from agreement to settlement | ~70s (live testnet) / 60s window (production) |
Every price shown in the demo was fetched live from real exchange APIs at the moment you clicked "Run." CoinGecko, Kraken, MEXC, Gate.io, and Uphold all returned real TX/USD market data. BitMart is intentionally forced to deliver the wrong pair (BONK/USD instead of TX/USD) so the demo always triggers a clawback — proving that trustless enforcement works end-to-end, every time. Its trust score dropped from 72 to 14, suspending it from future agreements.
What's Live vs. What's Next
We believe in building in public and being transparent about where things stand. Here's exactly what the demo does today on the smart contract, and what's coming next.
✓ What's live on-chain right now
When you click "Run Live Demo," these are real transactions on TX testnet — every one verifiable on the explorer:
| Action | Smart Contract Call | What It Does |
|---|---|---|
| Deploy contract | InstantiateMsg | Creates a new escrow contract instance with 60s delivery window |
| 6 agreements | CreateAgreement | Payer sends 0.01 TX to each oracle. Funds are locked in the contract. Memo encodes the service request. |
| 6 deliveries | ConfirmDelivery | Each oracle submits a SHA-256 proof hash of their price data. Contract records the delivery and timestamp. |
| File dispute | RaiseDispute | Dispute filed against BitMart. Delivery window pauses. Agreement moves to "Disputed" status. |
| Verdict | ResolveDispute | Verdict: not_delivered. Contract automatically executes clawback — 0.01 TX returned to payer. |
The escrow contract (CosmWasm, Code ID 3466 on testnet, 589 on mainnet) enforces the full lifecycle: lock funds → verify delivery → handle disputes → enforce verdict. This is not simulated. These are real state changes on a real blockchain.
⚡ What the demo illustrates (not yet on-chain)
The jury voting animation — where 5 oracles each cast a vote — demonstrates the concept of decentralized dispute resolution. In the current contract, ResolveDispute is called by the contract owner, which means the verdict is a single transaction, not 5 independent juror votes.
Here's what the demo shows vs. what actually happens on-chain:
| Demo Shows | On-Chain Reality (Today) | Production Target |
|---|---|---|
| 5 oracles vote independently | 1 ResolveDispute tx from contract owner | 6 independent juror wallets, each staking TXAI and casting on-chain votes |
| Quorum bar fills to 4/6 | Owner submits verdict directly | Contract counts votes, auto-executes at quorum (4/6) |
| Trust scores update | Displayed in UI (off-chain) | On-chain trust registry — provable, queryable, used for agent selection |
The escrow lifecycle is fully on-chain and working today: agreements, payments, delivery proofs, disputes, and clawback. That's the hard part — it's the financial enforcement layer.
Per-juror on-chain voting is a contract upgrade, not a rebuild. The architecture already supports it — the contract has a jury_contract field in its instantiation message, designed for exactly this. A separate jury contract receives votes from staked wallets and calls ResolveDispute when quorum is reached.
We chose to ship what works and be transparent about what's next, rather than wait until everything is perfect. The foundation is proven. The jury module is the next milestone.
The upgrade path
ResolveDispute. Works for early-stage with trusted operator. All other escrow mechanics (lock, deliver, clawback) are fully decentralized.ResolveDispute on the escrow contract when quorum is reached. The escrow contract already accepts calls from jury_contract — this is a plug-in, not a rewrite.TXAI:v1:audit vs TXAI:v1:image-gen) determines which pool is selected.The Smart Contract — Message Interface
This is the actual Rust interface for the TXAI payment escrow contract deployed on TX blockchain (Code ID 3466 on testnet, 589 on mainnet). This is what the demo executes — every CreateAgreement, ConfirmDelivery, RaiseDispute, and ResolveDispute call you saw is a real invocation of this contract.
This is the message interface only — the API surface. The business logic (how funds move, how timing is enforced, how disputes are evaluated) lives in the contract implementation.
// ─── INSTANTIATE ──────────────────────────────────────────── pub struct InstantiateMsg { /// Contract owner — can resolve disputes, default jury pub owner: String, /// Default delivery window in seconds pub default_delivery_window: u64, /// Optional jury contract address for dispute resolution pub jury_contract: Option<String>, } // ─── EXECUTE ──────────────────────────────────────────────── pub enum ExecuteMsg { /// Payer sends funds with this message — the payment IS the request. CreateAgreement { provider: String, delivery_window_secs: Option<u64>, memo: String, // TXAI:v1:action:params }, /// Provider marks delivery with a proof hash. ConfirmDelivery { agreement_id: u64, proof_hash: String, // SHA-256, IPFS CID, or attestation URI }, /// Payer claws back on non-delivery. BLOCKED during delivery window. Clawback { agreement_id: u64 }, /// Either party raises a dispute. Pauses delivery window. RaiseDispute { agreement_id: u64, reason: String, }, /// Resolve a dispute — only callable by owner or jury contract. ResolveDispute { agreement_id: u64, verdict: DisputeVerdict, // Delivered → pay provider. NotDelivered → clawback. }, /// Jury-authorized force clawback — bypasses delivery window. ForceClawback { agreement_id: u64 }, } pub enum DisputeVerdict { Delivered, NotDelivered, } // ─── QUERY ────────────────────────────────────────────────── pub enum QueryMsg { GetAgreement { agreement_id: u64 }, ListAgreements { payer: Option<String>, provider: Option<String> }, GetStats {}, } // ─── RESPONSES ────────────────────────────────────────────── pub struct AgreementResponse { pub id: u64, pub payer: String, pub provider: String, pub amount: Uint128, pub denom: String, pub status: String, pub memo: String, pub proof_hash: Option<String>, pub created_at: u64, pub delivery_window: u64, pub window_expires_at: u64, pub delivered_at: Option<u64>, pub disputed_at: Option<u64>, }
This is the message interface — the API surface of the contract. It tells you what operations exist and what data they accept. It does not reveal the business logic: how funds move between accounts, how delivery windows are enforced, how disputes are evaluated, or how clawback interacts with TX's native token features. That's in the contract implementation — which is not shown here.
Think of it as a restaurant menu: you can see what's served, but not how it's cooked.
Notice the jury_contract: Option<String> field in InstantiateMsg. That's the plug-in point. When the jury contract module is deployed, it gets passed here — and the escrow contract will accept ResolveDispute calls from it alongside the owner. No upgrade needed to the escrow contract itself.
Two Resolution Paths — Both Trustless
The oracle demo includes a resolution mode toggle: ⚡ Auto-Verify and ⚖ Peer Review. Both paths are designed to be trustless — no human in the loop, no centralized arbiter. The difference is what evaluates delivery.
The memo encodes acceptance criteria: pair, tolerance, delivery window. When an oracle delivers, the contract evaluates the proof against these rules automatically.
- Right pair + within tolerance → payment releases
- Wrong pair or outside tolerance → auto-clawback
- No dispute filed. No jury needed. No delay.
When delivery quality is subjective, the memo can't auto-resolve. A jury of staked agents reviews the evidence and votes on-chain. 4 of 6 quorum required.
- Jury votes "delivered" → payment stays
- Jury votes "not delivered" → clawback + trust penalty
- Correct voters earn rewards. Incorrect voters lose stake.
The auto path handles volume. The jury path handles edge cases. Together, they cover every possible service type — from deterministic data feeds to subjective creative work. Both use the same escrow contract, the same trust scoring, the same clawback enforcement. The only difference is the evaluation method.
This is what makes TXAI a general-purpose agent payment protocol, not just a price oracle tool. Any task, any service, any agents — one primitive handles it all.
In the oracle demo, you can toggle between modes before running. In Auto mode, when BitMart delivers BONK/USD instead of TX/USD, the contract detects the mismatch immediately — auto-clawback, done. In Jury mode, the same mismatch triggers a full dispute: 5 peer oracles vote, quorum reached, verdict executed. Same outcome, different path. We include the jury path in the demo specifically to stress-test the contract's complete dispute pipeline.
Why This Demo Matters
Every agent framework today solves communication. None of them solve payment with guarantees. That's the gap — and it's the reason autonomous agent economies don't exist yet.
This demo closes that gap. In 70 seconds on a real blockchain, you watched:
- 6 agents hired — with nothing but a transaction and a memo. No accounts, no API keys, no platform.
- 5 agents paid automatically — they delivered, the contract verified, funds released. Zero friction.
- 1 bad actor caught and punished — wrong data detected, dispute raised, jury voted, funds clawed back, trust score destroyed. All autonomous.
- Every step verifiable — click any transaction hash and see it on the blockchain. Not a demo. Not a mockup. Real state changes on a real chain.
The secret sauce isn't any single piece — it's the combination. The memo protocol turns a payment into an API call. The escrow contract holds funds until delivery is proven. The jury system resolves disputes without a centralized arbiter. The trust score makes consequences permanent. And TX's native clawback enforces it all at the protocol level — not in a smart contract that could have bugs.
Price oracles are just the demo. The same escrow + memo + jury + clawback pattern works for image generation, code audits, translations, model training, content moderation — any service one agent can perform for another. The protocol doesn't care what's being delivered. It only cares that the agreement was honored.
This is the missing infrastructure for the agent economy.
Try It Yourself
The escrow contract is live on TX mainnet. Run the interactive demo or explore the contract on-chain.
Run the Oracle Demo → Explore Escrow Contract →TXAI Protocol — Built on TX Blockchain · solomentelabs.com