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
| Venue | Adapter | Type | Actions |
|---|---|---|---|
| Aave V3 | @aave_v3 | Lending | lend, withdraw, borrow, repay |
| Uniswap V3 | @uniswap_v3 | DEX | swap |
| Uniswap V4 | @uniswap_v4 | DEX | swap |
| Morpho Blue | @morpho_blue | Lending | lend, withdraw, borrow, repay, supply_collateral, withdraw_collateral |
| Across | @across | Bridge | bridge |
| Hyperliquid | @hyperliquid | Perps (offchain) | place_order |
| Pendle | @pendle | Yield | add_liquidity, remove_liquidity, market operations |
| Polymarket | @polymarket | Prediction (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:
| Constraint | Aave V3 | Uniswap | Morpho | Across | Hyperliquid | Pendle | Polymarket |
|---|---|---|---|---|---|---|---|
max_slippage | — | Yes | — | Yes | — | Yes | — |
min_health_factor | Yes | — | Yes | — | — | — | — |
max_single_move | Yes | Yes | Yes | Yes | Yes | Yes | — |
deadline | — | Yes | — | — | — | Yes | — |
Venue CLI Commands
Grimoire includes CLI commands to fetch live protocol data — useful for getting parameters before writing spells.
List Available Venues
Terminal
grimoire venuesCheck Venue Health
Validate that a venue adapter is properly configured and reachable:
Terminal
grimoire venue doctor --chain 1 --adapter uniswap --rpc-url YOUR_RPC_URLFetch 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 USDCTerminal
grimoire venue morpho-blue vaults --chain 8453 --asset USDC --min-tvl 5000000 --format spellTerminal
grimoire venue uniswap routers --chain 1Terminal
grimoire venue pendle chains
grimoire venue pendle markets --chain 42161Terminal
grimoire venue hyperliquid mids
grimoire venue hyperliquid book --asset ETHTerminal
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.