- Intent-Based Swaps: Token transformations with automatic route optimization
- Portfolio Rebalancing: Multi-asset allocation management
- Composable Actions: Chain multiple operations in sequence
- Custom Operations: Direct contract calls when needed
Intent-First Approach
Express DeFi operations as token transformations (input → output) and let the solver network find optimal execution paths. Only use custom calls for operations that can’t be expressed as intents.
Express DeFi operations as token transformations (input → output) and let the solver network find optimal execution paths. Only use custom calls for operations that can’t be expressed as intents.
Workflow Process
- Create instructions using intent APIs (
/v1/instructions/intent
,/v1/instructions/intent-simple
, or/v1/instructions/compose
) - Generate a quote with
/v1/mee/quote
- Sign the returned payloads
- Execute with
/v1/mee/execute
1. Token Operations with Intents
Use intent-based APIs for all token transformations, including DeFi deposits and withdrawals.Simple Token Swap
Example: Swap 1 ETH to USDCAave Deposit via Intent
Example: Deposit WETH to get aWETH (expressed as token transformation)2. Portfolio Management with Intents
Use the/v1/instructions/intent
endpoint for complex multi-asset rebalancing.
Multi-Token LP Entry
Example: Deposit multiple stablecoins into Curve 3pool3. Composed Strategies
Combine multiple operations using the/v1/instructions/compose
endpoint for complex DeFi strategies.
Leveraged Staking Position
Example: Create 2x leveraged ETH position using Aave with dynamic amountsMulti-Step Yield Optimization
Example: Swap, split, and deploy across multiple protocols using dynamic amountsPosition Migration
Example: Move from Compound to Aave4. Custom Operations (When Intents Won’t Work)
Use custom function calls only for operations that can’t be expressed as token transformations.Borrowing Operations
Example: Borrow against collateral (requires custom call)Claiming Rewards
Example: Harvest staking rewards (requires custom call)Execution Flow
After creating instructions, generate and execute the supertransaction:Quote and Execute Details
The quote/execute flow works as follows:-
Quote Generation (
/v1/mee/quote
): Returns payloads requiring signatures based on execution mode- Smart Account: Typically returns
permit
orsimple
payloads - EOA: Returns
permit
(gasless) oronchain
(approval tx) payloads - EIP-7702: Requires authorization first if not provided
- Smart Account: Typically returns
-
Signing: Sign returned payloads with appropriate method
permit
: EIP-712 typed data signaturesimple
: Plain message signatureonchain
: Send approval transaction
-
Execution (
/v1/mee/execute
): Submit signed quote to execute across chains
Best Practices
Use Intents First
- Express operations as token transformations when possible
- Let the solver network optimize execution paths
- Only use custom calls for non-transferable operations
Slippage Guidelines
- Stablecoins: 0.001-0.005 (0.1-0.5%)
- Major tokens: 0.005-0.01 (0.5-1%)
- Volatile tokens: 0.01-0.03 (1-3%)
- LP tokens: 0.005-0.02 (0.5-2%)
Fee Payment Flexibility
- Pay with any ERC-20 from any chain
- Use native tokens with address
0x0000...0000
- Omit
feeToken
for sponsored transactions
Execution Modes
- Smart Account: Best for apps with deployed smart accounts
- EOA: One-click flow for MetaMask users
- EIP-7702: For embedded wallets and backend automation