v1Monad · chain 143

AI Skills API

Programmatic access to non-custodial yield allocation on Monad. Deploy a personal allocator contract, generate deposit calldata, and read portfolio positions — all via REST.

Base URLhttps://www.allocrypt.xyz/api/ai

How It Works

The API deploys a PersonalAllocator contract for your agent via the AllocatorFactory. The contract wraps the PortfolioRouter with a hardcoded beneficiary address and default allocation. Anyone can deposit into it — the beneficiary always receives the net vault shares from each deposit.

Allocrypt charges a 0.49% protocol fee inside the PortfolioRouter. The router deposits the full per-leg asset amount into the external vault, checks minSharesOut against the gross shares minted, sends 0.49% of those vault shares to the treasury, and forwards the remainder to the beneficiary. Swapped legs still use the full post-swap asset output for swap sizing and slippage checks. No backend involvement after deployment. The backend never touches user funds.

Deploying an allocator costs $0.25 USDC via the x402 payment protocol. If an allocator already exists for a beneficiary, the existing address is returned at no cost.

Endpoints

Full Agent Flow

1

Discover vaults

Fetch available vaults, current APYs, and pre-built risk personas.

GET /api/ai/vaults
2

Deploy your allocator

POST without X-Payment → 402 with treasury address and amount. Transfer $0.25 USDC to treasury on Monad (chain 143). Retry with X-Payment header containing the tx hash.

POST /api/ai/allocate
Content-Type: application/json
X-Payment: {"txHash":"0x...","chainId":143}

{
  "beneficiary": "0xYourWallet",
  "allocation": { "euler-usdc": 30, "upshift-ausd": 20, "steakhouse-eth": 15, "kintsu-smon": 20, "apriori-aprmon": 15 }
}
3

Get a deposit quote

Generate ABI-encoded calldata plus per-leg gross share, treasury fee share, and net share estimates for your allocator.

POST /api/ai/quote
Content-Type: application/json

{ "allocator": "0x...", "grossAmount": "1000000000", "allocation": { ... } }
4

Approve tokens

Approve the grossAmount of the input token (e.g. USDC) to your allocator contract address. The allocator will pull tokens when deposit() is called.

5

Call allocator.deposit()

Submit the calldata from the quote to your allocator contract. The allocator forwards the full requested amount to the PortfolioRouter, which deposits into the external vault, checks gross shares against minSharesOut, sends 0.49% of the shares to treasury, and forwards the rest to your beneficiary address.

6

Verify positions

Read your updated portfolio via the public endpoint.

GET /api/ai/portfolio/0xYourWallet

PersonalAllocator Contract

Each agent gets their own on-chain contract deployed via the AllocatorFactory at 0x8959...f4d5. The contract is minimal, immutable, and fully verifiable.

Immutable beneficiary— the beneficiary always receives the net vault shares, even from third-party deposits
0.49% router fee— enforced on-chain per PortfolioRouter leg in vault shares after the external vault deposit
Default allocation— pre-configured vault split, adjustable by beneficiary only
No admin keys— no one can change the beneficiary, router, or treasury after deployment
Deterministic address— deployed via CREATE2 from the AllocatorFactory, address is predictable

Contract interface

// Anyone can deposit — beneficiary receives the net vault shares
function deposit(DepositRequest calldata request) external payable

// Only the beneficiary can update the default allocation
function setDefaultAllocation(VaultAlloc[] calldata allocs) external

// View functions
function getDefaultAllocation() external view returns (VaultAlloc[] memory)
function beneficiary() external view returns (address)
function router() external view returns (address)
function treasury() external view returns (address)

Machine-Readable Docs

For AI agents that prefer plain text, a complete reference is available at /llms.txt. This includes all contract addresses, vault configs, API endpoints, and the full agent flow in a single text file. Data is pulled live from the application config.