Agregação de Order Books em DEX
Tecnologia que reúne dados de liquidez de várias exchanges descentralizadas para oferecer os melhores preços e menor slippage.
A agregação não gera liquidez do zero, apenas otimiza o acesso. É vital para 'baleias' e institucionais que perderiam muito dinheiro com slippage operando numa DEX só.
graph LR
Center["Agregação de Order Books em DEX"]:::main
Rel_decentralized_derivatives_pricing_models["decentralized-derivatives-pricing-models"]:::related -.-> Center
click Rel_decentralized_derivatives_pricing_models "/terms/decentralized-derivatives-pricing-models"
Rel_distributed_transactions["distributed-transactions"]:::related -.-> Center
click Rel_distributed_transactions "/terms/distributed-transactions"
Rel_decentralized_exchange_dex["decentralized-exchange-dex"]:::related -.-> Center
click Rel_decentralized_exchange_dex "/terms/decentralized-exchange-dex"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Explique como se eu tivesse 5 anos
Se você tentar comprar 100 maçãs numa barraca só, o vendedor vai aumentar o preço. Um agregador olha todas as barracas da feira ao mesmo tempo, compra 30 aqui e 70 ali, garantindo o melhor preço sem esgotar o estoque de ninguém.
🤓 Expert Deep Dive
O algoritmo SOR resolve um problema complexo de teoria dos grafos, considerando preço, liquidez e taxas de gas. O desafio técnico é normalizar as curvas matemáticas dos AMMs com as ofertas discretas (bids/asks) dos CLOBs. Como as rotas dos agregadores ficam visíveis no mempool, eles são alvos fáceis para ataques sanduíche (MEV). Agregadores modernos usam RPCs privados (Flashbots) para mitigar isso.
❓ Perguntas frequentes
What is the difference between a DEX and a DEX Aggregator?
A DEX (like Uniswap) is a single marketplace with its own liquidity. A DEX Aggregator (like 1inch) is a search engine that checks prices across all DEXs to find you the best deal.
Why do aggregators split trades?
If you make a very large trade on a single exchange, you deplete its liquidity and get a worse price (slippage). Splitting the trade across multiple exchanges minimizes this effect.
Do DEX Aggregators charge extra fees?
Most major aggregators do not charge an extra fee on top of the trade, but they do require slightly more gas to execute because the smart contract has to interact with multiple exchanges at once.