Vault
Deposit

Deposit

Users deposit assets into their own isolated vault. The vault is non-custodial — the user retains ownership at all times.

How Deposits Work

Solana (wSOL)

  1. User connects Solana wallet (Reown AppKit)
  2. If no vault exists → initialize_policy + initialize_vault create a new vault PDA
  3. User signs deposit instruction
  4. wSOL transferred from user's token account to vault PDA
  5. Vault balance becomes available for the keeper to evaluate
User wallet → deposit instruction → Vault PDA (user-owned)
                                      ├── idle balance (undeployed)
                                      └── allocated positions (in venues)

EVM (Arc / GIWA)

  1. User connects EVM wallet
  2. If no vault exists → factory deploys a new HeronVault contract
  3. User approves token spend + signs deposit transaction
  4. Tokens transferred from user to their vault contract
  5. Vault balance becomes available for the keeper

First Deposit

On first deposit, the system also:

  • Sets the executor key (Heron's keeper key — can allocate but not withdraw)
  • Commits the Merkle mandate root (defines allowed venues)
  • Sets caps (per-action, epoch, position limits)
  • Optionally triggers a TEE attestation run

Amounts

ChainAssetMin DepositDecimals
SolanawSOLNo minimum9
ArcUSDCNo minimum6
GIWAWETHNo minimum18

API

The frontend uses GET /api/config?chain=solana&wallet=... to get the addresses needed for signing:

{
  "program": "BSPwK2zXA4K887pbm5ovxzVQS2rWJAaQkkiEU3TRY632",
  "token": "So11111111111111111111111111111111111111112",
  "mandateRoot": "...",
  "executor": "...",
  "decimals": 9
}

The actual transaction is signed client-side by the user's wallet — the backend never holds user funds.