Skip to main content

Guide to On-chain Transactions

Overview

Cortex transforms complex blockchain interactions into simple conversations. Execute transactions on Ethereum, Arbitrum, Optimism, Base, and Hyperliquid - from basic swaps to sophisticated trading strategies - all through natural language. The agent handles gas optimization, routing, and execution details automatically.

Transaction Types

Token Operations

Execute fundamental crypto operations with simple commands:

OperationDescriptionExample Commands
SwapsTrade any token on any chain"Swap 0.5 ETH for USDC"
"Sell all my PEPE for ETH"
TransfersSend tokens to any address"Send 100 USDC to 0x..."
"Transfer half my ARB to my other wallet"
BridgesMove assets between chains"Bridge ETH from mainnet to Arbitrum"
"Move my USDC from Base to Optimism"

Advanced Trading

Professional trading features accessible through conversation:

FeatureDescriptionExample Commands
Perpetual FuturesTrade with leverage on Hyperliquid"Long ETH with 10x leverage"
"Short BTC at $98k with stop loss at $100k"
TWAP OrdersTime-weighted average price execution"Buy 100 ETH over 2 hours using TWAP"
"TWAP sell 50 BTC over 4 hours with 20% randomization"
Complex StrategiesMulti-step trading operations"Close all my losing positions and long ETH with the proceeds"
"Take 50% profit on BTC and rotate into SOL"

DeFi Operations

Access DeFi protocols seamlessly:

Protocol TypeOperationsExample Commands
Hyperliquid StakingStake and delegate HYPE tokens"Stake 5000 HYPE"
"Delegate to validator X"
Yield DiscoveryFind yield opportunities"Find the best APY for my USDC"
"Show yield opportunities on Arbitrum"
Multi-Step TradesComplex trading strategies"Sell all my alts and buy ETH"
"Bridge USDC to Base and swap for VIRTUAL"

Smart Transaction Features

Gas Abstraction

Never worry about gas tokens again:

  • Execute on any chain without holding native tokens
  • Automatic gas estimation and optimization
  • Pay gas fees with any token

Intelligent Routing

The agent finds optimal paths automatically:

  • Best DEX selection for minimal slippage
  • Efficient bridge routing for cross-chain ops
  • MEV protection on sensitive transactions

Safety Features

Built-in protections for every transaction:

  • Simulation First: Preview effects before execution
  • Slippage Protection: Automatic limits based on trade size
  • Clear Explanations: Understand exactly what will happen
  • Reverts Protection: Transactions fail safely if conditions aren't met

Real-World Examples

Basic User Journey

User: "I want to buy some ARB tokens"
Cortex: I'll help you buy ARB tokens. You have $1,250 USDC on Arbitrum. How much would you like to spend?

User: "Use $500"
Cortex: I'll swap $500 USDC for ARB on Arbitrum:
- Input: 500 USDC
- Expected output: ~425 ARB
- Price: $1.176 per ARB
- Slippage tolerance: 0.5%
[Approve Transaction]

User: "Actually make it $1000"
Cortex: Updated - I'll swap $1,000 USDC for ARB:
- Input: 1,000 USDC
- Expected output: ~850 ARB
- Price: $1.176 per ARB
- Slippage tolerance: 0.5%
[Approve Transaction]

Advanced Trading Flow

User: "I think ETH is going up, help me set up a leveraged position"
Cortex: I can help you open a leveraged ETH position on Hyperliquid. What's your target position size and leverage?

User: "Let's do $5k with 5x leverage"
Cortex: I'll open a 5x leveraged ETH long position:
- Position size: $5,000
- Leverage: 5x
- Total exposure: $25,000 (8.33 ETH)
- Liquidation price: $2,400 (-20% from current)
- Est. funding rate: 0.01%/8h
Would you like to add a stop loss or take profit?

User: "Add stop loss at $2,800 and take profit at $3,500"
Cortex: Perfect! I'll open your position with risk management:
- Long 8.33 ETH at 5x leverage
- Stop loss: $2,800 (-6.7%)
- Take profit: $3,500 (+16.7%)
- Max loss: $335
- Max profit: $835
[Approve Transaction]

Multi-Chain DeFi Strategy

User: "I have tokens scattered everywhere, help me consolidate and earn yield"
Cortex: I found your tokens across multiple chains:
- Ethereum: 0.5 ETH, 500 USDT
- Arbitrum: 2,000 ARB, 300 USDC
- Base: 0.3 ETH
- Optimism: 1,500 OP

Would you like me to consolidate these and find yield opportunities?

User: "Yes, consolidate to USDC and find the best yield"
Cortex: I'll execute this strategy:
1. Swap ETH → USDC on each chain
2. Swap ARB → USDC on Arbitrum
3. Swap OP → USDC on Optimism
4. Bridge all USDC to Arbitrum
5. Enter high-yield USDC vault (18.5% APY)

Total after consolidation: ~$4,250 USDC
Expected daily yield: ~$2.15
[Review & Approve Steps]

Pro Tips

Optimize Your Transactions

  1. Use percentages for flexibility: "Swap 50% of my ETH to USDC"
  2. Batch operations: "Sell all my alts for USDC"
  3. Specify amounts clearly: "Buy $1000 of SOL" or "Buy 10 SOL"
  4. Name chains explicitly: "Bridge USDC from Arbitrum to Base"

Natural Language Shortcuts

  • "Max" → Use entire balance
  • "Half" → 50% of holdings
  • "Rest" → Remaining balance after other operations
  • "All alts" → All tokens except ETH/BTC/stables

Chain-Specific Hints

The agent understands context:

  • "On mainnet" → Ethereum L1
  • "On L2" → Suggests best L2 based on your assets
  • No chain specified → Auto-selects based on your balances

Common Patterns

Portfolio Rebalancing

"Swap half my portfolio to ETH" or execute multiple swaps manually

Risk Management

Check positions regularly with "Show my positions" and manage manually

Yield Discovery

"Show me the best yields for USDC" to find opportunities

Multi-Chain Operations

"Bridge my ETH from mainnet to Arbitrum for lower fees"

Getting Started

  1. Start Simple: Try a basic swap first
  2. Build Confidence: Graduate to bridges and complex trades
  3. Explore Features: Discover advanced capabilities through use
  4. Ask Questions: The agent explains any transaction detail

Remember: Every transaction requires your explicit approval. The agent handles complexity but you maintain complete control.