15ore fa
The bright side of the current discourse is that the Solana DeFi community is speed-running a lot of thinking about execution quality very quickly and very publicly. The signal to noise ratio is tiny, so I want to improve that with this post. Here are some facts for those curious on the technical side of router comparisons and execution quality. Quote price != realized price. Starting with the obvious: the number you see on the screen (quote) is not necessarily the number you get (realized trade price). The realized trade price happens several seconds after the quote is generated, even if resimulated. During those seconds, markets move. Sometimes a lot. To address this, simulation can be valuable. Given a transaction, simulation will tell you what the realized price would be if a single user executed the quote exactly one time on the current latest slot. The single-use nature of the quote here isn’t great: what happens if 5 people try to execute the quote? What happens if 5000 people try to execute that quote? However, the single-use nature of simulation isn’t the main thing that is at contention in the general discourse today. The parts that are at contention are the following. Simulating two routes generated on different slots will favor the more recent one. If you have two transactions with different ages, meaning the routes were generated on different slots, then simulating both and comparing the prices will generally mean the fresher transaction has the better price. The proof is obvious when you look at the extremes. Do you expect a transaction that was generated 60 seconds ago to compare more favorably to a transaction that was created on the most recent slot available? It’s more likely the quote from 60 seconds ago fails the slippage tolerance check during simulation. Simulation results have very fast time decay. Simulation-based meta-aggregation does not make sense when the transaction is returned back to the client and seconds can pass before the transaction is sent to be executed. Meta-aggregation only makes sense when the meta-aggregator has the last look server-side and can execute the winning transaction immediately. After you return the “best” quote to the client, and seconds pass, the simulation-based comparison begins to have noise again. This means that simulation-based meta-aggregation systems are returning some signal to clients (to be clear, the signal is biased to begin with due to quote age discrepancies), but that signal decays very quickly. Race conditions are unavoidable, but interpreting the effects of the race conditions correctly is crucial It’s just the nature of reality that race conditions in markets exist. The issue arises when claims are being made as if those race conditions did not exist. I’d encourage all meta-aggregator APIs that are claiming equal footing between quotes to analyze their own data that contains at least these columns: the selected router and the age of each of the candidate quotes from each of the routers (if slot isn’t available, then use packet timestamps or whatever rough approximation of age is available). The bias will be apparent immediately. Further, when comparing realized slippage on executed transactions, you have to include transactions that landed but failed because those transactions exceeded slippage tolerance. Otherwise your dataset and conclusions are once again biased. Quotes can't be interpreted at face value Quotes have two dimensions: probability of landing successfully and realized price. Routers can tweak their systems to optimize for one or the other, or some combination of both, but a weighting still needs to be applied as to which factor is more important. Opinionated decisions that DFlow's routing system makes: DFlow’s routing system optimizes for two things: the realized price and transaction success. Here is why: Optimizing for realized price is what users care about. DFlow can easily show “improved” quotes by tweaking a single parameter and routing through thinner liquidity, but we don’t because the probability of transaction failure goes up. Customers want to trade off a small amount of pricing for a lower variance in transaction success rates. And we design our systems to serve millions of customers. A transaction that lands generates far more economic activity than a transaction that could’ve squeezed out another few atoms but didn’t land. Here are the two main ways we do this: First, DFlow JIT routing shaves off an expected ~1 bps in realized slippage on SOL/USDC. This is a massive amount of edge that simply does not show up in quote comparisons (and never can). Second, we also only choose to route through thick, resilient liquidity that we forecast will remain onchain by the time the transaction lands even if many users execute the same quote. Finally, I think the conversations we’re having right now are net good for moving Solana DeFi forward, but would again encourage focusing on increasing the signal to noise ratio. Everyone benefits if we focus purely on technical accuracy.
25.594
104
Il contenuto di questa pagina è fornito da terze parti. Salvo diversa indicazione, OKX non è l'autore degli articoli citati e non rivendica alcun copyright sui materiali. Il contenuto è fornito solo a scopo informativo e non rappresenta le opinioni di OKX. Non intende essere un'approvazione di alcun tipo e non deve essere considerato un consiglio di investimento o una sollecitazione all'acquisto o alla vendita di asset digitali. Nella misura in cui l'IA generativa viene utilizzata per fornire riepiloghi o altre informazioni, tale contenuto generato dall'IA potrebbe essere impreciso o incoerente. Leggi l'articolo collegato per ulteriori dettagli e informazioni. OKX non è responsabile per i contenuti ospitati su siti di terze parti. Gli holding di asset digitali, tra cui stablecoin e NFT, comportano un elevato grado di rischio e possono fluttuare notevolmente. Dovresti valutare attentamente se effettuare il trading o detenere asset digitali è adatto a te alla luce della tua situazione finanziaria.