Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Venues & Adapters

Venues are the protocols Grimoire can interact with. Each venue has an adapter that translates your spell actions into protocol-specific calls.

Supported Venues

VenueAdapterTypeActions
Aave V3@aave_v3Lendinglend, withdraw, borrow, repay
Uniswap V3@uniswap_v3DEXswap
Uniswap V4@uniswap_v4DEXswap
Morpho Blue@morpho_blueLendinglend, withdraw, borrow, repay, supply_collateral, withdraw_collateral
Across@acrossBridgebridge
Hyperliquid@hyperliquidPerps (offchain)place_order
Pendle@pendleYieldadd_liquidity, remove_liquidity, market operations
Polymarket@polymarketPrediction (offchain)place_order

Using a Venue in a Spell

Declare venues in your spell's venues block:

spell MyStrategy {
  venues: {
    lender: @aave_v3
    dex: @uniswap_v3
  }

  on manual: {
    dex.swap(USDC, ETH, 1000)
    lender.lend(ETH, 0.5)
  }
}

The alias (e.g., lender, dex) is your choice — you can swap the adapter behind it without changing your spell logic.

Constraint Support

Not all constraints are supported by every adapter. Here's what's available:

ConstraintAave V3UniswapMorphoAcrossHyperliquidPendlePolymarket
max_slippageYesYesYes
min_health_factorYesYes
max_single_moveYesYesYesYesYesYes
deadlineYesYes

Venue CLI Commands

Grimoire includes CLI commands to fetch live protocol data — useful for getting parameters before writing spells.

List Available Venues

Terminal
grimoire venues

Check Venue Health

Validate that a venue adapter is properly configured and reachable:

Terminal
grimoire venue doctor --chain 1 --adapter uniswap --rpc-url YOUR_RPC_URL

Fetch Venue Data

Each venue has its own snapshot commands:

Aave V3:
Terminal
grimoire venue aave health --chain 1 --address 0x...
grimoire venue aave reserves --chain 1 --asset USDC
Morpho Blue:
Terminal
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spell
Uniswap:
Terminal
grimoire venue uniswap routers --chain 1
Pendle:
Terminal
grimoire venue pendle chains
grimoire venue pendle markets --chain 42161
Hyperliquid:
Terminal
grimoire venue hyperliquid mids
grimoire venue hyperliquid book --asset ETH
Polymarket:
Terminal
grimoire venue polymarket markets
grimoire venue polymarket book --market <conditionId>
grimoire venue polymarket midpoint --market <conditionId>

Use --format spell on supported commands to get output formatted for direct use in spell parameters.