✨How does Oraclez work
Token prices can fluctuate rapidly, and the most favorable trade may not always be found on a single decentralized exchange (DEX). Instead, it might involve a combination of trades across multiple DEXes. Here are the key features of how Oraclez discovers the most advantageous trades.
Smart Routing Oraclez establishes direct connections between all DEX markets and AMM pools, regardless of the provider, to identify all direct and multi-hop routes between any two tokens on Solana.
Multi-hop Routes Oraclez not only compares prices between different DEX markets but also considers routes that involve intermediary tokens. For example, Swap724 might find a better price by routing through an intermediary token like USDC-ETH -ETH instead of directly from USDC to ETH. This approach accounts for price inefficiencies and volatility across various markets.
Trade Splitting To achieve better prices for large trades or tokens with shallow liquidity spread across multiple DEXes, Oraclez splits trades into smaller sizes. For instance, if you want to execute a 100 USDC-SOL trade, Oraclez might split it into a 30 USDC-SOL trade on one DEX and a 70 USDC-SOL trade on another. The distribution of trades is dynamically determined to optimize price execution.
Single Transaction Swaps Oraclez optimizes swap aggregation to fit within transaction limits, enabling swaps to be executed in a single transaction. This feature is crucial in cases where the token's price has changed, and the initial slippage limit is no longer feasible. If Swap724 cannot execute the trade within the slippage limit, it will roll back the transaction and return an error.
Basic Flow:
User specifies the tokens they want to trade.
User inputs the desired amount of tokens for the trade.
Oraclez calculates all possible trade routes.
Oraclez fetches quotes for each route, including fees, and returns the amount of tokens the user will receive per route.
Oraclez ranks each route based on the most tokens received.
User selects a route, with the first route typically offering the most tokens.
User triggers the swap.
User approves the Oraclez transactions from their wallet.
Oraclez executes the trade.
Last updated