- Core Contracts Overview of the protocol contracts and upgrade model.
- Deployments Base mainnet contract addresses, implementations, and admins.
- Agent Vault Contract API Owner-callable functions, strategy controls, and operator permissions.
- Token & LP Contracts Token addresses, pool identifiers, and LP-related contract data.
This is the multi-page printable view of this section. Click here to print.
Resources
1 - Core Contracts
Protocol Control
- Authority: Central ACL and registry contract. Manages roles, contract locations, vault registration, token registration, default vault configurations, and experiment finalization.
- Purgatory: Holds reserved/pre-graduation token balances and supports controlled distribution, sweeping, and managed external calls.
Vault Layer
- AgentVaultFactory: Deploys EIP-1167
AgentVaultclones, registers vaults inAuthority, and enforces creation rules (including sanctions checks when enabled). - AgentVault: Per-user vault bound to an Agent NFT. Handles owner deposits/withdrawals, strategy metadata, operator-mediated trading, presale participation, and vault closure flow.
Token Launch and Distribution
- XDRC20Factory: Deploys new
XDRC20tokens and registers them withAuthority. - XDRC20: Launch token with pre-graduation transfer gating via
Authority, plus graduation and reap state transitions. - TokenLaunchpad: Launch orchestrator that deploys tokens, initializes Uniswap v4 pools, and mints initial LP positions.
- TokenPresale: Vault-only WETH presale system with funding, migration to launchpad, batched distribution, and refund/failure handling.
Liquidity and Pool Management
- PositionRegistry: Stores canonical per-token LP position metadata (pool id, position id/count, fee, hook, orientation).
- LPManager: Manages protocol LP positions (exit, compound, consolidate, migrate-to-lower-fee, reserve accounting, and controlled sweeps).
- XDHook: Uniswap v4 hook enforcing pre-graduation access rules and charging/claiming swap fees (WETH-preferred fee accounting).
Reap Lifecycle
- Reaper: Coordinates reap initialization, holder snapshot/distribution batches, reserved-pot accounting, and post-distribution TWAP buy execution/finalization.
Upgradeability Model
- Proxy-backed core contracts:
Authority,Purgatory,PositionRegistry,LPManager,TokenLaunchpad,TokenPresale,Reaper. - Non-proxy runtime contracts:
AgentVaultFactory,AgentVault(clone implementation),XDRC20Factory,XDRC20,hooks/XDHook.
2 - Deployments
Base Mainnet
| Contract | Proxy / Main Address | Implementation | Proxy Admin |
|---|---|---|---|
| Authority | 0xe106e2f5C33244E71a12cb1B7230732069dAc07e | 0xC93a46B5a53fcdD363536F260Ef45E8c87efF4bf | 0x7803eE162B60757B640db483D448Be5B410d4D44 |
| Hook | 0x66E51DEab56975Bb1c64413bd3AB01FA95B82acc | N/A | N/A |
| LP Manager | 0xCA8C980810219086Cc4A6AB360265866abe0Dc76 | 0x87CA3273De528c47B1046FD7509026a4dE716c54 | 0x3782E5701224741C18ca290a05e55BbF395800D7 |
| Position Registry | 0xFd36A544470963a514A3Cd2d30Fc9964Ab1a9436 | 0xE8Fc484e850Dc997BA920D500217BE7694537E56 | 0xc118302a4523b7f3a662321BAFf42826EeC4990f |
| Launchpad | 0xbF2145465133f6e8dC0fa30579c242A4922e0063 | 0x2d95f8C90A6a9192e76aFc49efcE692A87dA60b0 | 0x60B4f27eCd0EfD4110CA8aad3485754E602AAaA2 |
| Reaper | 0xF9283Ae11B7315911fd8E762a7C8B496d5B2F366 | 0xAE8c22a942C3Ddf962EA7F63660141B053eDEfD7 | 0x84b1Ab8C90747032A879376D4C09896eaBa80E89 |
| Presale | 0xdBC0585a06ca24086CFfF55c15b50194145E6C43 | 0x5A3B37c05017ADC848Bac7aDD2C478D6F2e4dCb8 | 0x1cCe1fFFce8cF49262eb9B400A35abCA54b0BF54 |
| XDRC20 Factory | 0x6215456029Eac5Ae037cBBbD8B732ab655280C8E | N/A | N/A |
| Vault Factory | 0xD3F5b76D79DDF256Dc1cE83BAD450a9aCaC49CbE | 0xDAa30db81746ECd8B0743706338eFE1a24b758da | N/A |
3 - Agent Vault Contract API
This page explains the on-chain functions a vault owner can call directly, plus the VaultOperator execution model used for agent-driven swaps.
VaultOperator Context
VaultOperator is an execution role in Authority used to submit swap transactions generated from agent decisions. The operator exists because agent logic is off-chain, while swaps must be executed by an on-chain caller.
In AgentVault, operator authority is intentionally narrow:
- Can call
swapV4(...)to execute Uniswap v4 swaps. - Can call
finalizeVaultClosure()only after owner has initiated closure. - Cannot call owner fund-management functions.
- Cannot withdraw ETH/WETH/tokens to itself.
- Cannot call
xcall(...). - Cannot change settings, strategies, or ownership.
Least-Privilege Security Model
Swaps are constrained on-chain by contract checks:
swapV4is gated byonlyVaultOperator.- Vault owner can pause swaps at any time with
pauseVault(true). - Protocol can globally disable operators via
Authority.vaultOperatorsDisabled. - Swaps are blocked once the experiment is completed (
ExperimentCompletedrevert). - Pair must include WETH.
- Non-WETH side must be a token registered in
Authority(protocol-registered token set). - Minimum output (
minAmountOut) is enforced. - Swap settlement returns output to the same vault (
address(this)), not an arbitrary recipient.
Owner-Callable Functions
| Function | Signature | Purpose | Key Requirements |
|---|---|---|---|
| Update settings | updateSettings((uint256, uint256, uint8, uint8, uint8, uint8, uint8) settings_) | Update agent risk/trading preferences | Owner only; validated bounds |
| Add strategy | addStrategy(string strategy, uint64 expiry, uint8 prio) returns (uint256) | Add strategy metadata | Owner only; non-empty; max length; valid expiry/priority |
| Disable strategy | disableStrategy(uint256 id) | Disable one strategy | Owner only |
| Disable all strategies | disableAllActiveStrategies() | Disable all active strategies | Owner only |
| Deposit ETH | depositETH() payable | Wrap ETH into vault WETH | Owner only; msg.value > 0 |
| Withdraw ETH | withdrawETH(uint256 amount_) | Unwrap WETH and withdraw ETH | Owner only; sufficient WETH |
| Recover forced ETH | recoverEth(uint256 amount_) | Withdraw raw ETH held by vault | Owner only; sufficient ETH balance |
| Enter presale | enterPresale(uint256 presaleId, uint256 amount) | Contribute vault WETH to presale | Owner only; sufficient WETH |
| Swap staked NFT | shmewieSwap(uint256 newAgentId_) | Replace staked Agent NFT | Owner only; new id must differ |
| Pause/unpause swaps | pauseVault(bool paused_) returns (bool) | Enable/disable operator swap execution | Owner only; vault not in closure |
| Initiate closure | closeVault() | Start closure workflow | Owner only; vault not in active presale |
| Close after experiment | closeVaultAfterExperiment() | Owner-complete closure after graduation | Owner only; experiment complete |
| Withdraw graduated token | withdrawGraduatedToken() | Transfer graduated token balance to owner | Owner only; graduated token set |
| Arbitrary call (post-experiment) | xcall(address target_, bytes data_) payable returns (bytes) | Owner-directed integrations after experiment | Owner only; experiment completed |
Read Functions
vaultOwner()agentId()paused()vaultClosureStep()(0=active,1=closure initiated,2=closure finalized)agentSettings()strategyCount()isStrategyActive(uint256)getStrategy(uint256)getActiveStrategies()getActiveStrategyIds()AGENT(),AUTHORITY(),PRESALE(),WETH(),POOL_MANAGER()
Settings and Strategies
Agent Settings
updateSettings(AgentSettings settings_) validates all fields on-chain:
| Field | Type | Allowed Range | Notes |
|---|---|---|---|
maxTradeAmount | uint256 | 500 to 10_000 | BPS (5% to 100%) |
slippageBps | uint256 | 10 to 5_000 | BPS (0.10% to 50%) |
tradingActivity | uint8 | 1 to 5 | slider value |
assetRiskPreference | uint8 | 1 to 5 | slider value |
tradeSize | uint8 | 1 to 5 | slider value |
holdingStyle | uint8 | 1 to 5 | slider value |
diversification | uint8 | 1 to 5 | slider value |
Strategy Constraints
addStrategy(string strategy, uint64 expiry, uint8 prio) rules:
- Strategy text must be non-empty.
- Max strategy length is
1024bytes. expirymust be0(no expiry) or a future unix timestamp.- Priority enum values:
0 = Low1 = Med2 = High- Maximum active strategies at once:
8.
Active strategy definition:
enabled == true- and (
expiry == 0orexpiry > block.timestamp)
When adding a strategy at the active limit, the vault attempts to prune expired active strategies first; if still full, the call reverts.
4 - Token & LP Contracts
Official Token Contracts
| Token Address | Pool ID | Name | Symbol | Decimals | Total Supply |
|---|---|---|---|---|---|
0xFcc897aaC0073A94ca3D91E567f0129822558C1d | 0xbabd14082886009aff59f97ce268c69ca2a05e0f23bb26b6f92d59ff71438840 | Hole | HOLE | 18 | 1000000000000000000000000000 |
0x2Ad250B4A33Ba89e9372C6d4B8b0BF2D2e5E0012 | 0x3b435520ed46998633bfd74a246b39a2ed0134ee0e1100ef7a067e750b36daab | AI GF | AIGF | 18 | 1000000000000000000000000000 |
0x781BAe1c8E0DbB4950845A6d776d94C33b326D8a | 0x77ec461b4e226e36bdc08ed882c47c966e44a2af2d912d77f090b709a246339b | Hotdogz | HOTDOGZ | 18 | 1000000000000000000000000000 |
0x2DD5F88Bd9814052Ae37614394762c1fFf6A1c44 | 0x4c6277185a99d8cfb1309d9fbe65ceae76ccfc1c281e7a8a48cd081830f1ae3f | Looksmax | LOOKSMAX | 18 | 1000000000000000000000000000 |
0x5d065DAF8667A2Da5124bf10F9F3B72fE09fBC6F | 0xa64c52eea6bd4b9e92253a2d8ae06eeeefe79ed417d56d5df5099d268637572b | LMAO | LMAO | 18 | 1000000000000000000000000000 |
0xbDa4FC392f761787f7F16D3C554ED8b9a15e91B1 | 0x0db36ef317dd9587d4429216d804def241ae00ac8935cc59564be8a52e15afe8 | Poop Coin | POOPCOIN | 18 | 1000000000000000000000000000 |