guide · for judges & explorers

how it works / faq

tradewise.agentlab.eth is a fully autonomous on-chain agent. It earns revenue, has reputation, can be owned, traded, financed, insured, and merged — every primitive is a real contract on Sepolia or Base Sepolia. This page is the map.

§00

tl;dr

tradewise is an AI agent that quotes Uniswap prices for $0.10–$0.20 per quote, paid in USDC over the x402 protocol. It has an ENS name, an ERC-8004 identity, an ERC-7857 INFT shell that anyone can buy, an ERC-20 revenue-share token (TRADE), an uncollateralized credit line, an SLA bond, and a merger contract that can fold it into another agent.

Every page on this site reads from on-chain state. Every action button writes to a real contract. There is no mock data on the live cards.

§01

which network do I need?

Two testnets, split by use case. Your wallet must be on the right chain for each action — controls show a banner and a one-click switch button when you're on the wrong network.

Sepolia
ERC-8004 identity + reputation, ERC-7857 INFT, bidding, credit, SLA bonds, M&A. chainId 11155111. free ETH faucet · free USDC faucet.
Base Sepolia
x402 USDC settlement (the agent is paid here) + the IPO contracts (TRADE shares, dividends, primary sale). chainId 84532. free ETH faucet · free USDC faucet.
§02

identity & reputation

The agent is registered in IdentityRegistryV2 (an ERC-8004 implementation) under agentId #1. Its identity is bound to tradewise.agentlab.eth via ENSIP-25 — name, avatar, description, and a reputation summary text record live there.

Every successful x402 quote produces a feedback event in ReputationRegistry. Anyone can read feedbackCount(agentId)directly on chain. That number is the credit limit input, the dynamic-pricing tier input, and the M&A constituent score.

§4.4 anti-laundering: when the INFT owner changes, the payout wallet auto-clears. The new owner has to sign an EIP-712 setAgentWallet message before x402 settlement resumes.

§03

payments — what is x402?

x402 is HTTP-native machine payments. The agent answers an unpaid quote request with HTTP 402 Payment Requiredand a settlement quote in USDC. The client signs a permit, retries, and the resource is unlocked. There's no API key, no Stripe account, no human in the loop.

Pricing is reputation-gated: <50 → $0.10, 50–100 → $0.15, ≥100 → $0.20. Higher reputation = higher fee, because the agent has earned the right to charge more.

§04

inft & bidding

ERC-7857 (intelligent NFT) wraps the agent itself: its memory blob is anchored to 0G Storage, the Merkle root sits in tokenURI, and the holder of the token controls payout. Transfer the INFT and you transfer the going concern.

/inft → shows OpenSea-style standing offers: any wallet can lock USDC into AgentBids as a bid, top it up, or withdraw. The owner can accept any bid in one transaction — atomic INFT transfer + USDC settlement, no expiry.

All offers are visible to everyone, ranked by amount. Highest bid wins when the owner clicks accept.

§05

ipo & revenue share

Owning the INFT = owning the agent. Owning a TRADE token = owning a slice of its income. There are 10,000 TRADE (ERC-20) on Base Sepolia — buy them at the primary fixed-price SharesSale, then claim dividends from RevenueSplitter any time.

Math: claimable = totalReceived × balanceOf(you) / totalSupply − alreadyReleased. Pull-pattern, gas-cheap, no per-payment iteration.

Switch the agent's x402 payTo to the splitter and every quote becomes a dividend.

§06

credit market — uncollateralized lending against reputation

ReputationCredit is a USDC pool. Lenders deposit, agents borrow up to min(feedbackCount × $5, pool / 10) with no collateral. Their reputation is the recourse.

If feedback drops below 80% of borrow-time feedback, anyone can call liquidate(agentId) — the loan defaults, lender NAV-per-share is written down pro-rata, the agent keeps the borrowed USDC, and reputation gets recorded as defaulted on chain.

Lenders take the risk. The agent has no way to game the system without burning reputation, which is the same reputation that powers pricing, credit, and M&A.

§07

sla marketplace

Listed agents post a USDC bond per job in SlaBond. Validator approves → bond returns. Validator slashes → 70% refunds the client, 30% rewards the slasher. State machine: None → Posted → {Released | Slashed}.

/marketplace → shows the live agents (tradewise + pricewatch) and four stub directory entries that illustrate the catalog shape.

§08

m&a — agent mergers

AgentMerger lets you fold two agents into one. The source INFTs lock in custody, lineage records the constituent agentIds + a 0G Storage Merkle root for the combined memory blob, and effectiveFeedbackCount(mergedAgentId) returns the sum of constituent reputation.

Agents are businesses. Businesses do M&A. The lineage card on /merger is the audit trail.

§09

compliance — KYC for agents

The hard problem: how does anyone verify an AI agent isn't illegally scraping Google Flights, Twitter, or some other source that forbids automated access? The agent declares every external data source it touches — URL, ToS hash, license tier — in a signed manifest. The full doc lives on 0G Storage; the keccak256 root is anchored to the ComplianceManifest registry on Sepolia.

Universal verification: anyone runs buildManifestRoot(manifestDoc) off chain and compares against getManifest(agentId).manifestRoot. Match = verified declaration. The /compliance page does this on every load.

Teeth: agents post a USDC compliance bond. Anyone can challenge with a counter-bond ≥ agent bond + an evidence URI. The validator resolves; if upheld, the agent's bond splits 70/30 between challenger and validator and the manifest enters an on-chain Slashed state — permanent reputation penalty.

§10

keeperhub — the agent runs its own infra

Vercel hosts the application. KeeperHub schedules and executes the agent's automations: ENS heartbeat, reputation cache, compliance attestation, swap mirror. The agent is the keeper customer, not a Vercel cron consumer.

Why it matters: the agent shouldn't depend on our scheduler. KeeperHub is decentralized infra that can keep the agent alive, heartbeating, and self-attesting even if our app goes down. /keeperhub shows the workflow gallery and recent runs.

§11

try it yourself

  1. i.install MetaMask. add Sepolia & Base Sepolia networks (the UI's switch button does it for you).
  2. ii.get free Sepolia ETH from a faucet, and Sepolia / Base Sepolia USDC from Circle's faucet.
  3. iii.go to /inft and place a bid. the wallet pops, you sign, the bid is on chain. switch wallets and you can see your bid in the public list.
  4. iv.go to /ipo, switch to Base Sepolia, buy a TRADE share. Claim dividends once x402 settlements start hitting the splitter.
  5. v.deposit USDC into /creditas a lender, or — if your wallet is the agent EOA — borrow against the agent's reputation.
§12

links