Skip to main content
This instruction type enables advanced portfolio operations with multiple input and output positions. Define what you want (target tokens with weights), and the system automatically handles routing, bridging, and conversions.

How It Works

The intent flow:
  1. Accepts input positions - Multiple source tokens with amounts
  2. Defines target positions - Desired output tokens with weights (must sum to 1.0)
  3. Automatic routing - Finds optimal paths for rebalancing
  4. Handles everything - Swaps, bridges, and multi-step conversions

Parameters

When using /instructions/intent in your composeFlows array:

Input Position Structure

Target Position Structure

Complete Workflow Examples

Split USDC into multiple tokens

Returned Data Structure

The quote response includes details for each target position:

Intent vs Direct Instructions

The Supertransaction API offers two approaches: The intent approach simplifies complex multi-chain operations by automatically:
  • Finding optimal routes
  • Handling protocol interactions
  • Managing cross-chain complexity
  • Optimizing for gas efficiency

Best Practices

All target position weights must sum to exactly 1.0:
Use higher slippage for complex rebalancing:
Check each position’s output in returnedData:
Intent is perfect for:
  • Rebalancing portfolios to target allocations
  • Converting multiple small positions into fewer tokens
  • Distributing one token across multiple chains
  • DCA (dollar-cost averaging) strategies

Troubleshooting

Ensure all weights add up to exactly 1.0:
If routing fails:
  • Check token liquidity on source and target chains
  • Verify token addresses are correct
  • Try adjusting weights to reduce complexity
  • Increase slippage tolerance
If outputs are too low:
  • Review each position’s route in returnedData
  • Check if bridge fees are higher than expected
  • Consider splitting into separate operations
  • Verify market prices are as expected