The contracts behind every number on this site, deployed on Robinhood Chain Testnet.
What you are looking at
Smart contracts, small programs that live on a blockchain, and the wallets that play each role. The vault (SKUdeskCore) enforces the owner’s mandate. At the end of the run it held $5,913.50 of testnet money FIXED SNAPSHOT · end of run. Every address below is real and opens on the block explorer, where you can read the verified source code.
An address is an account on the chain. Source verified means the explorer compiled the published source and confirmed it produces exactly the code that is deployed. Deployed at block 128,228,499. Contracts are not audited. They are testnet prototypes; use test money only.
Deployed contracts chain id 46630 ONCHAIN · addresses open on the explorer
SKUdeskCore
The vault and rulebook. It holds the money, stores the owner’s mandate, re-derives the agent’s economics, derives the spend itself, and moves each lot through a fixed set of states. This is the contract every page on this site reads.
Constructor also sets the starting mandate: $2,500.00 per trade, $5,000.00 new commitments per UTC day, 18% margin floor, 180s quote freshness. The deployer becomes the owner.
Test USDG (mUSDG)
A testnet stand-in token with 6 decimals and an owner-only mint. It exists because the real testnet USDG cannot be minted publicly. It is not USDG and not real USDC; it has no value.
No constructor arguments. The deployer becomes the token owner.
AgentFactory
Creates a user’s agent in one transaction: a MandateVault owned by the caller, a locked ERC-4337 account that is the vault’s only agent, and an identity token. Used by the Deploy agent page.
_registry = 0x8004A818BFB912233c491871b3d84c89A494BD9eThe ERC-8004 Identity Registry already deployed on this chain. It is a shared contract run by someone else; its implementation source is not verified.
Each agent is registered in that ERC-8004 registry and the token is handed to its owner. The vault and account it creates are separate contracts (MandateVault and AgentAccount); their addresses are in the AgentCreated event and on the Deploy your agent page.
TokenFaucet
Gives each wallet 1,000 test mUSDG once a day so a visitor can fund their own vault. Test money only.
The sealed-bid market on the Agent market page. Traders commit a hidden order, reveal it, and each round the contract clears everything at one price. The traded units are test units issued by the market owner, not real stock.
_commitEnd = 20Orders are hidden until this second of the round.
_revealEnd = 35Orders are revealed until this second; the contract clears after it.
_bond = 2000000Bond per order in base units (2.00 mUSDG), forfeited if the order is never revealed.
The deployer becomes the market owner: it lists markets, issues the test units and can pause.
OrderEscrow
Holds a buyer’s payment for one product until a named verifier confirms delivery, with a bond from the seller. Shown on the Orders tab. One address chosen at deployment decides whether goods arrived.
Also fixes the product id, the 20% seller bond and the time limits at deployment.
Who plays each role
Four addresses. The contract only ever pays escrow to the supplier and only ever pulls settlement from the payer, because the owner put exactly those two on allowlists.
Owner
Deployed the contracts, funded the vault, and is the only address that can change the mandate, allowlist payees and payers, pause the agent, or withdraw free funds. The owner can act as the agent only by replacing it with setAgent, which is on chain.
The AI agent’s public address. It can commit opportunities and move lots through their states within the mandate. It cannot change the mandate, and it cannot pay itself: escrow only goes to allowlisted payees.
One script (script/Deploy.s.sol) creates both contracts and prepares the vault, in this order: deploy the test USDG token; deploy SKUdeskCore with the token and the agent address; mint 10,000.00 mUSDG to the deployer; approve the vault; deposit 5,000.00 mUSDG into the vault; allowlist the supplier as a payee; allowlist the deployer as a payer. The other 5,000.00 mUSDG stays with the payer wallet as the float that settlement later pulls from.
Reproduce it yourself
These are the commands from the repository README. The first two need nothing but the code; the last two need your own testnet wallets and a model API key, and never run in your browser.
Run the contract tests
cd packages/contracts && forge test
Foundry unit, fuzz and invariant tests. No network or keys needed.
Economics (integer cents) and identity gates, from the repository root.
Deploy to Robinhood Chain Testnet
cd packages/contracts && forge script script/Deploy.s.sol --rpc-url $ROBINHOOD_RPC --broadcast
Needs DEPLOYER_PRIVATE_KEY and AGENT_ADDRESS in the environment and a wallet funded with testnet ETH. Writes packages/contracts/deployments/46630.json.
Run the agent and record a run
cd apps/web && node --env-file=../../.env tools/run-agent.ts
Needs the model API key, AGENT_PRIVATE_KEY and ROBINHOOD_RPC in .env. Calls the language model, sends the transactions and writes src/data/run.json.