Liquidity Engine
The Liquidity Engine is Encrypto's core technical moat. It's the system that enables users to spend any crypto asset at point of sale by handling real-time conversion, route optimization, and risk management across multiple on-chain DEX aggregators and market makers.
What It Doesβ
In simple terms: the Liquidity Engine takes any supported crypto asset and converts it to USDC at the best available rate, fast enough to settle a card transaction within Visa's authorization window (~3 seconds).
This is harder than it sounds.
Architectureβ
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β Liquidity Engine β
β β
β ββββββββββββββββ ββββββββββββββββββββββββ β
β β Pricing β β 4-Provider Router β β
β β (via aggs) β β Haiku/deBridge/Li.Fi β β
β β β β /1inch β β
β ββββββββ¬ββββββββ ββββββββββββ¬ββββββββββββ β
β β β β
β ββββββββΌββββββββββββββββββββββββΌββββββββββββ β
β β Route Optimizer β β
β β βββββββββββ ββββββββββββ βββββββββββββ β β
β β β Direct β βMulti-Hop β β Cross-DEX β β β
β β β Swap β β Routes β β Split β β β
β β βββββββββββ ββββββββββββ βββββββββββββ β β
β ββββββββββββββββββββ¬ββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββΌββββββββββββββββββββββββ β
β β Risk Manager β β
β β β’ Slippage bounds β’ Pool depth check β β
β β β’ Price staleness β’ Impact analysis β β
β β β’ Execution timeout β’ Fallback logic β β
β ββββββββββββββββββββ¬ββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββΌββββββββββββββββββββββββ β
β β Execution Engine β β
β β Atomic swap + settlement in single tx β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
Pricingβ
The engine derives pricing from the aggregator quotes themselves. By querying 4 independent aggregators in parallel, the multi-provider approach provides natural cross-validation β if one provider returns a significantly different price, it's excluded. The best effective price (output minus gas minus fees) is selected for execution.
Liquidity Aggregationβ
The engine aggregates liquidity across multiple DEX aggregators, cross-chain bridges, intent networks, and market makers β not a single venue. This "aggregator of aggregators" approach ensures best execution regardless of the asset, chain, or transaction size.
DEX Aggregatorsβ
The engine integrates with multiple DEX aggregators across ecosystems:
| Ecosystem | Coverage | Notes |
|---|---|---|
| Solana | Full DEX coverage | Multi-route aggregation across all major Solana DEXs |
| EVM chains | Ethereum, Base, Arbitrum, Optimism, Polygon, etc. | Cross-DEX routing with MEV protection |
Cross-Chain Bridgesβ
The engine routes through multiple bridge networks for cross-chain transfers:
| Capability | Coverage |
|---|---|
| EVM β Solana | Native asset transfers, fast finality |
| Cross-EVM | All major L1s and L2s |
| Non-EVM ecosystems | Cosmos, Bitcoin, Sui, and more |
| Total chain coverage | 9 native chains + extended reach via aggregated bridge infrastructure |
Intent-Based Executionβ
The engine supports intent-based execution via Haiku β where solvers compete to fill orders rather than routing through fixed DEX paths.
| Capability | What It Does |
|---|---|
| Declarative trading | Define target state, Haiku handles execution |
| Gasless execution | Users don't pay gas on every hop |
| MEV protection | Solvers absorb MEV risk |
| Cross-chain intents | "I need X on Chain Y" β solvers figure out the path |
Intent-based execution via Haiku often results in better prices than fixed routing, especially for complex multi-hop or cross-chain conversions.
Combined Coverageβ
By aggregating 4 providers, the Liquidity Engine has native support for 9 blockchains with aggregator-extended reach to additional chains for cross-chain conversions. This means:
- Best execution across the broadest possible liquidity
- Redundancy β if one route fails, alternatives exist
- Future-proof β new chains added automatically as aggregator coverage grows
DEX Coverage (via Aggregators)β
Encrypto does not maintain direct DEX integrations β by design. The aggregators route through the best DEX for each trade automatically, including:
- Uniswap V3 β Concentrated liquidity on EVM chains
- Aerodrome β Native Base DEX with deep USDC pools
- Curve β Optimized for stablecoin swaps
- Raydium β Primary Solana DEX
This approach means Encrypto automatically benefits from new DEX integrations added by the aggregator providers without any code changes.
For each swap, the engine queries all 4 aggregator APIs in parallel and selects the route with the best effective price (swap output minus gas minus fees).
Route Optimizationβ
The optimizer evaluates three types of routes for every conversion:
Direct Swapβ
ETH β USDC on a single DEX. Simplest and fastest, used when a deep pool exists.
Multi-Hopβ
DOGE β WETH β USDC across two pools. Used when the direct pair has insufficient liquidity but intermediate pairs are deep.
Cross-DEX Splitβ
Split a large order across multiple DEXs to minimize price impact. A $10,000 ETH β USDC conversion might execute 60% on Uniswap and 40% on Aerodrome to get better aggregate execution.
The optimizer queries all four aggregator APIs in parallel and selects the best quote, typically completing in under 2 seconds.
Risk Managementβ
Every conversion is evaluated against a risk model before execution:
Slippage Controlβ
# Simplified slippage check
expected_output = amount * oracle_price
simulated_output = simulate_swap(dex, amount, route)
slippage = (expected_output - simulated_output) / expected_output
if slippage > MAX_SLIPPAGE: # 1.0%
reject_or_fallback()
Pool Depth Analysisβ
The engine checks that the swap amount won't move the pool price by more than 0.5%. For large transactions, this prevents front-running and excessive market impact.
Execution Timeoutβ
Card authorizations have a strict timeout. If the Liquidity Engine can't find and execute a route within 3 seconds, it falls back to the user's USDC balance. No conversion that takes longer than 3 seconds is executed.
Why This Mattersβ
Most crypto card products require users to manually convert assets before spending. This is like requiring someone to go to a currency exchange before every purchase abroad. It's a solved problem β the infrastructure just needs to be built.
Encrypto's Liquidity Engine makes crypto spendable the same way Visa makes foreign currency spendable: invisibly, instantly, at a fair rate.