Skip to main content

Integration Overview

Evix supports three integration patterns depending on your environment and requirements.

Integration Methods

SDK Integration

Use the TypeScript or Rust SDK to build and execute swaps from your backend or bot. Best for most use cases.

Best for: Trading bots, backends, automation

Direct Contract Call

Call IEvix.swap() directly from another smart contract. No SDK needed — just the interface.

Best for: On-chain protocols, smart accounts

Calldata Encoding

Use the SDK to encode swap calldata without executing it. Feed the calldata into your own transaction pipeline.

Best for: Custom signers, smart account batching, relay systems

Comparison

CapabilitySDK IntegrationDirect ContractCalldata Encoding
SimulationsimulateSwap()eth_callManual
Executionswap()Contract-to-contractYour pipeline
LanguageTypeScript, RustSolidityTypeScript, Rust
Wallet requiredYes (for execution)N/A (contract)No
ComplexityLowMediumMedium

Typical Flow

Regardless of the integration method, the recommended execution flow is:

  1. Set minAmountOut — The integrator determines the acceptable minimum output (from their own pricing, oracle, or optionally via the SDK's simulateSwap()).
  2. Execute — Submit the swap transaction with a tight deadline and your minAmountOut.
  3. Handle errors — Check for deadline, slippage, or pair-related reverts.

Guides