La versione italiana si trova sotto quella inglese
The italian version is under the english one
One of the most interesting features available on LeoDex is the one that allows you to split a swap into smaller swaps: this feature is called streaming swaps and is available when performing operations using protocols like Thorchain and Maya.
The idea behind it is to break down a swap into many smaller operations to reduce slippage and price impact, while taking advantage of possible arbitrage operations aimed at rebalancing the liquidity pool during the execution of our swap.
When performing a swap, especially one that is large compared to the liquidity in the pool, you inevitably alter the balance between the tokens involved.
For example, if a pool has $100,000 in liquidity and I perform a $20,000 swap, it's clear that I’m heavily unbalancing the pool, injecting a large amount of one token while simultaneously removing the other.
So, if I inject $20,000 worth of liquidity on one side, I definitely won’t receive tokens worth $20,000 on the other side — but much less!
This is where streaming swaps come into play to help mitigate the problem: as my swap gradually unbalances the pool, one micro-swap at a time, other users might step in to rebalance the pool by making trades in the opposite direction.
You might be wondering: "Why would anyone do that? Just to do me a favor?"
Absolutely not!
The reason isn’t generosity, but the chance to make an easy profit: an unbalanced pool is one where a token is undervalued (the token I’m injecting into the pool), while the other token is overvalued (the one I’m receiving through my swap).
A savvy user, possibly with the help of a bot, can take advantage of this opportunity by selling the overvalued token and buying the undervalued one, effectively earning a quick profit.
Now, if I split my swap into many smaller swaps, this arbitrage opportunity can occur during my swap — not after it — rebalancing the pool before all my "micro-swaps" are completed and allowing them to be executed under more favorable conditions.
Potentially, in a heavily arbitraged pool, streaming swaps could reduce the slippage and price impact of my swap almost to zero.
True, streaming swaps are a very interesting and potentially very useful feature...
... but be careful not to think they’re always the best option, because that’s not the case.
For a streaming swap to make sense, someone needs to perform a swap in the opposite direction to yours. But what happens if:
In these scenarios, a streaming swap can either turn out to be a useless waste of time (1), or even worsen slippage (2).
Streaming swaps take more time than a normal swap because they’re executed at intervals.
If no one is arbitraging the pool in between, the final result will be almost the same as if you had swapped it all at once.
If someone performs a swap in the same direction as you, you’ll actually end up paying even more for the token you wanted, making the final result worse...
Like everything else, streaming swaps should be used carefully if you want to benefit from them.
If you’re in a hurry to complete a swap, it’s generally better not to use this feature or to drastically reduce the time interval at which the micro-swaps are executed.
If the pool is inactive, there’s probably no one arbitraging it, so it’s almost not worth using streaming swaps.
However, if you want to make a large swap and try to reduce price impact, streaming swaps might be right for you.
Likewise, if you’re swapping in a high-volume pool, streaming swaps can help you get a better price.
That’s why LeoDex allows you to adjust the interval at which streaming swaps are executed.
By clicking on the "options" menu...
... a tab will open, allowing you to increase or decrease the number of blocks that must pass before another micro-swap is executed.
By default, it’s best to leave the option set to optimal, but if you find yourself in one of those cases where it makes more sense to complete the swap as quickly as possible, then move the slider to fastest and click save.
This way, your swap will take much less time, and you won’t risk slowing down your operation unnecessarily.
Images created with Grok AI and edited by me with GIMP; logo owned by @leodex
to support the #OliodiBalena community, @balaenoptera is 3% beneficiary of this post
If you've read this far, thank you! If you want to leave an upvote, a reblog, a follow, a comment... well, any sign of life is really much appreciated!
Looking for a cross-chain decentralized DEX? Look no further than LeoDex, which supportsThorchain, Mayachain, Chainflip... and many more!
Versione italiana
Italian version
Una delle funzioni più interessanti disponibili su LeoDex è quella che consente di frazionare uno swap in swaps più piccoli: questa funzione si chiama streaming swaps ed è disponibile quando si effettuano operazioni che utilizzano protocolli come Thorchain e Maya.
L'idea alla base è quella di frazionare uno swap in tante operazioni più piccole così da ridurre lo slippage, il price impact e trarre vantaggio da eventuali operazioni di arbitraggio volte a riequilibrare la pool di liquidità durante lo svolgimento del nostro swap.
Quando si effettua uno swap, soprattutto se di dimensioni corpose rispetto alla liquidità presente nella pool, si tende inevitabilmente a variare il rapporto di forza tra i token coinvolti: se una pool ha 100.000$ di liquidità ed effettuo uno swap per 20.000$ è evidente che sto sbilanciando pesatamente la pool, iniettando una gran quantità di un token e contemporaneamente sottraendone dall'altro lato.
Quindi se io inietto 20.000$ di liquidità da una parte, dall'altro sicuramente non riceverò token per 20.000$, ma molti di meno!
Ecco che, per tentare di mitigare questo problema, entrano in gioco gli streaming swaps: via via che il mio swap sbilancia la pool, un micro-swap alla volta, altri utenti potrebbero decidere di intervenire per ribilanciare la pool effettuando operazioni contrarie alla mia.
Vi starete chiedendo: "Perchè qualcuno dovrebbe farlo? Solo per farmi un piacere?"
Assolutamente no!
Il motivo per farlo non è la generosità, ma la possibilità di conseguire un facile guadagno: una pool sbilanciata è infatti una pool dove un token vale meno di quello che dovrebbe (il token che sto iniettando nella pool), mentre l'altro ha un valore più alto del normale (quello che io sto ottenendo in forza del mio swap). Un utente attento, magari grazie ad un bot, può sfruttare questa opportunità per vendere il token che vale troppo ed acquistare quello che vale meno, di fatto conseguendo un facile guadagno.
Ecco, se io fraziono il mio swap in tanti swaps più piccoli questa opportunità di arbitraggio può avvenire non dopo il mio swap (quando io ormai ho acquistato a condizioni svantaggiose) ma durante il mio swap, riequilibrando la pool prima che tutti i miei "microswaps" siano stati effettuati e consentendo perciò a questi di essere eseguiti a condizioni più favorevoli.
Potenzialmente, in una pool fortemente arbitrata, gli streaming swaps potrebbero ridurre lo slippage ed il price impact del mio swap quasi a zero.
E' vero, gli streaming swaps sono una funzione davvero interessante e potenzialmente molto utile...
... ma attenzione a pensare che siano sempre la strada migliore, perchè così non è.
Perchè uno streaming swaps abbia senso, bisogna che qualcuno effettui una operazione di swap in senso contrario alla vostra, ma che succede se:
In questi scenari, non solo uno streaming swaps può rivelarsi una inutile perdita di tempo (1), ma può addirittura aggravare lo slippage (2).
Gli streaming swaps infatti richiedono più tempo di uno swap normale, perchè sono eseguiti ad intervalli.
Se nessuno arbitra nel mentre la pool, il risultato finale sarà praticamente lo stesso che se avesse swappato tutto in un colpo solo.
Se qualcuno effettua uno swap nella vostra direzione, vi ritroverete addirittura a pagare ancora di più per il token che volevate, peggiorando il risultato finale...
Come ogni cosa, anche gli streaming swaps devono essere utilizzati con attenzione, se si vuole trarne un vantaggio.
Se avete fretta di concludere uno swap, di base è meglio non avvalersi di questa funzione o ridurre drasticamente l'intervallo di tempo in cui i microswaps vengono eseguiti.
Se la pool è poco attiva, probabilmente nessuna la arbitrerà e quindi non vale la pena utilizzare gli streaming swaps.
Se invece volete effettuare uno swap di grosso valore e volete provare a ridurre il price impact, gli streaming swaps potrebbero fare al caso vostro.
Allo stesso modo, se effettuate uno swap in una pool con molto volume, gli streaming swaps potrebbero aiutarvi ad ottenere un prezzo migliore.
Per questo LeoDex consente di variare l'intervallo all'interno del quale gli streaming swaps vengono eseguiti.
Cliccando sulla voce "options"...
... si aprirà un menù che vi permetterà di aumentare o ridurre il numero di blocchi che devono passare prima che un altro microswap sia eseguito.
Di base conviene lasciare l'opzione su optimal ma, se vi trovate in uno dei quei casi in cui ha più senso concludere l'operazione il più velocemente possibile, allora spostate lo slide su fastest e poi cliccate su save.
In questo modo il vostro swap richiederà molto meno tempo e non rischierete di rallentare inutilmente la vostra operazione.
cover creata con Grok AI e da me editata con GIMP; logo di proprietà di @leodex
a supporto della community #OliodiBalena, il 3% delle ricompense di questo post va a @balaenoptera
Se sei arrivato a leggere fin qui, grazie! Se hai voglia di lasciare un upvote, un reblog, un follow, un commento... be', un qualsiasi segnale di vita, in realtà, è molto apprezzato!
Cerchi un DEX decentralizzato cross-chain? Prova LeoDex, con supporto a Thorchain, Mayachain, Chainflip... e molti altri!
Posted Using INLEO
Congratulations @arc7icwolf! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 68000 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Wow! Super post! L’articolo che hai scritto non si limita a descrivere la funzione in termini tecnici, ma evidenzia anche i rischi e le condizioni pratiche in cui gli streaming swaps hanno senso. Grazie per queste informazioni
@tipu curate
Upvoted 👌 (Mana: 15/45) Liquid rewards.
https://x.com/jewellery_all/status/1968318343825572153