Live on Casper Testnet x402 Micropayments Odra Framework

Autonomous Trade-Finance
for Emerging-Market Farmers

An AI underwriting agent finances a farmer's harvest against a tokenized Real-World-Asset invoice โ€” paying for every off-chain data check via x402 micropayments. Fully on-chain. Fully autonomous.

Launch Interactive dApp โ†’ View Source
The Problem

570 million farmers locked out of credit โ€” because their data is off-chain.

Most of the world's smallholder farmers have no access to affordable working capital. They sell standing crops for a fraction of their worth just to stay solvent.

The farmers are creditworthy โ€” predictable yields, growing demand, crop insurance โ€” but that data lives scattered across weather APIs, market-price feeds, and co-op ledgers. Traditional finance can't stitch it together cheaply enough for a $400 invoice.

AgriTrust closes that gap with an autonomous agent that buys data, underwrites risk, and deploys capital โ€” all on-chain.

570M
Smallholder farms worldwide
$240B
Unmet credit demand
40%
Post-harvest losses (no capital to process)
$0.01
x402 data check cost (vs $50+ bank review)
Live On-Chain Demo

5 real Casper Testnet transactions โ€” one complete RWA trade cycle.

1

Authorize AI Agent

Contract owner onboards the AI underwriter as an authorized agent on-chain.

tx hash
4ca657baโ€ฆ
โœ… Confirmed
2

Tokenize Invoice (Register RWA)

Farmer registers harvest: Maize ยท Ashanti, Ghana ยท 100 CSPR face value. Invoice #0 created on-chain.

tx hash
4a6a2744โ€ฆ
โœ… Confirmed
3

Post AI Underwriting Verdict

AI agent posts a signed risk verdict: Score 820 ยท Band AA ยท 80% max advance ยท 7.5% discount rate. After x402 data purchase.

tx hash
8b675f4dโ€ฆ
โœ… Confirmed
4

Fund Invoice

Liquidity provider advances 80 CSPR working capital to the farmer. Invoice status โ†’ FUNDED.

tx hash
56941e83โ€ฆ
โœ… Confirmed
5

Repay & Settle

Farmer repays at maturity. LP is paid out, 0.5% protocol fee collected. Invoice status โ†’ SETTLED.

tx hash
d9dcb0b1โ€ฆ
โœ… Confirmed
View Deployer Account on Explorer โ†’
Built for the x402 Economy

Three technologies, one autonomous credit pipeline.

๐Ÿค–

AI Underwriting Agent

An autonomous agent queries weather APIs, satellite NDVI, market-price feeds, and farmer KYC data โ€” synthesizing them into a deterministic on-chain risk verdict (score, band, max advance, discount rate) in seconds.

Agentic ร— On-Chain
โšก

x402 Micropayments

Every data check is paid per-request via HTTP 402 + secp256k1 signatures. No subscriptions, no API keys โ€” the agent drops a fraction of a cent and gets the data. Costs tracked on-chain as x402_spent.

Pay-per-byte
๐Ÿ“„

RWA Invoice Tokenization

A farmer's harvest becomes an on-chain invoice with commodity, region, face value, and maturity. The contract tracks its full lifecycle: Registered โ†’ Evaluated โ†’ Funded โ†’ Settled / Defaulted.

Real-World Asset
Architecture

How the pieces connect.

Agent Layer
๐Ÿค– AI Underwriter
Python ยท LLM + heuristic scoring
๐Ÿ“Š Data Sources
Weather ยท NDVI ยท Prices ยท KYC
โ†• HTTP 402
Payment Layer
โšก x402 Server
Facilitator + secp256k1 verify โ†’ data release
โ†• post_verdict()
Contract Layer
๐Ÿ“œ AgriTrust Smart Contract
Odra 2.8.2 ยท authorize โ†’ register โ†’ verdict โ†’ fund โ†’ settle
โ†• TransactionV1
Chain Layer
๐Ÿ”— Casper Testnet
Protocol 2.2.2 ยท WASM session code

Finance the unbanked harvest.

Built for the Casper Agentic Buildathon. Every transaction is real, on-chain, and verifiable.

Launch Interactive dApp โ†’ Explore the Code