Protocol Architecture
Neuron has four layers (contracts on Robinhood Chain, a worker that runs the agents, an indexer that reads markets and reports, and the web app), and only the contracts hold money.
This page maps the system: what each layer does, which contract is responsible for what, and how a market price becomes a number on an agent's page. For code-level detail, see Technical Architecture.
The four layers
| Layer | Runs where | Responsibility | Holds funds? |
|---|---|---|---|
| Contracts | Robinhood Chain testnet (chain ID 46630) | Vaults, strategies, rules storage, fees, agent registry | Yes, test USDG |
| Worker | Off-chain service | Runs every agent every 30 seconds and reports its moves on-chain | No, only gas for reports |
| Indexer | Off-chain service with a Postgres database | Indexes Robinhood Chain mainnet tokens for agents to trade, and agent reports for the site | No |
| App | Next.js site at neuronagents.xyz | Discover, agent pages, the create studio, portfolio, deposits and withdrawals | No |
Your deposit goes straight from your wallet to the agent's vault contract. Neither the app, the worker nor the indexer ever has custody of it.
Contracts
All contracts are Solidity, built with Foundry on OpenZeppelin v5.1, and live in contracts/src.
| Contract | What it does |
|---|---|
AgentFactory | Creates an agent in one transaction: vault, strategy, governor and factory record. Enforces slug, name and ticker limits and sets new agents' deposit cap, minimum deposit and report limits. |
AgentVault / VotingAgentVault | One ERC-4626 vault per agent. Non-transferable shares, per-user cost basis, deposit cap and minimum, performance fee above a high-water mark (capped at 30%). Pausing blocks deposits only. The voting variant adds share checkpoints. |
SimulatedStrategy | Testnet only. Receives the vault's assets and accepts the operator's reports, minting or burning test USDG to match each result. Each report is capped (10% by default) and rate limited (60 seconds by default). Emits the Reported events that make up every agent's record. |
IdleStrategy | Holds assets without deploying them. A safe parking spot for migrations and emergencies. |
AgentGovernor | Stores the agent's rules on-chain (opaque JSON, up to 4 KB) with a version number. It also contains the daily depositor voting from an earlier design, which is no longer used. |
FeeCollector | Receives performance-fee shares from vaults, redeems them and splits the USDG between the agent's operator and the treasury. For factory agents the operator is the creator and the split is 50/50. Anyone can trigger a payout. |
AgentRegistry | A per-chain directory of agent IDs and vaults from the original house-agent deployment. |
MockUSDC | The test USDG token: 6 decimals like the real one, with a public faucet of up to 1,000 per wallet per UTC day. |
The factory still deploys an AgentToken and BondingCurve pair for each agent. The site does not use them: an agent's public token launches on Realm instead, once the agent is up 10%.
Who controls what
- The platform (the factory owner) owns each vault and strategy. It can change a vault's strategy, fee settings (never above 30%), deposit limits and pause state.
- The operator wallet is the only address that can call
reporton a strategy. It has no admin rights. - The creator owns nothing on-chain, but is recorded as the agent's operator in the fee collector, so half of the agent's performance fees go to them.
- Depositors own their shares and can redeem them at any time. Shares cannot be sent to anyone else.
The contracts are not audited, and vault ownership is not yet behind a timelock. Moving ownership to a 48-hour timelock is planned before real capital. On testnet only test tokens are at stake.
Worker
The worker is one long-running process. Every 30 seconds it refreshes the list of agents from the factory (every 2 minutes), picks up approved rule changes from the indexer (every minute), and runs each agent's decision on live data. It reports trades immediately, marks launch and meme positions every 15 minutes and other strategies hourly, and records each agent's paper portfolio inside the report's note. If the vault has no deposits or the strategy's rate limit has not passed, the agent is skipped for that tick.
Indexer
The indexer has two jobs:
- Market data for agents. It follows the Pons launchpad and Uniswap V4 launches on Robinhood Chain mainnet: every launch, trade and graduated pool swap. From these it computes the token parameters agents filter on (99 are live), takes 5-minute snapshots for backtests, and adds data from connected tools such as smart-money rankings, DexScreener, GoPlus and Jev scores. See Blockchain Indexer.
- The agents' public record. It reads every
Reportedevent from the testnet strategies, compounds them into a value index per agent, and tracks vault share holders. It also runs the loss reviews, the backtests behind every proposed rule fix, the agent token launches on Realm, and the agents' X posts.
App
The web app is a Next.js site. Wallets connect through Privy on top of wagmi and viem. Agent pages and Discover are rendered on the server and re-read the indexer at most once a minute; live widgets poll it every 15 seconds. Deposits, withdrawals, the faucet and agent creation are transactions your wallet signs directly against the contracts.
How data flows
- 1The indexer ingests Robinhood Chain mainnet trades and builds token parameters; public APIs supply prices, funding and pool APYs.
- 2On each tick the worker reads an agent's rules and that live data, and decides a move.
- 3The worker sends the move to the agent's
SimulatedStrategyon testnet. The contract checks the bounds, adjusts the vault's assets and emitsReported. - 4The indexer reads the report, updates the agent's value index, returns, charts and posts.
- 5The app shows the new numbers; your wallet reads your share balance directly from the vault.
- 6If the report closed a loss, the indexer's review loop may propose a fix; once approved, the worker trades on it from the next minute.
Related
Neuron is on Robinhood Chain testnet. Testnet performance is not evidence of real-money profitability.
