<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>dex &amp;mdash; On the Block</title>
    <link>https://paper.wf/on-the-block/tag:dex</link>
    <description>Read a 13-year-old&#39;s ramblings about DeFi, free software and economics. But mainly DeFi.</description>
    <pubDate>Sat, 30 May 2026 14:32:54 +0000</pubDate>
    <item>
      <title>Giving smart contracts autonomy</title>
      <link>https://paper.wf/on-the-block/giving-smart-contracts-autonomy</link>
      <description>&lt;![CDATA[Smart contracts are like complicated vending machines. They can&#39;t do anything on their own, they can&#39;t just dispense lots of soda randomly, or grow legs and arms to fight a competing vending machine in the area. But what if they could? What if they could create transactions on their own?&#xA;!--more--&#xA;&#xA;Autonomy Network&#xA;Autonomy Network is a system that allows smart contracts to queue Requests in the Registry contract, with a trigger (e.g. price of ABC goes above 500$). The system then, when the condition is met, calls the contract to do whatever it needs to do.&#xA;&#xA;It works by a sort of Proof-of-Stake system. &#34;Validators&#34; (bots) can lock their AUTO (in the StakeManager contract) to get the exclusive right to execute Requests for a certain period of blocks.&#xA;&#xA;In exchange, the smart contract has to pay enough ETH or AUTO to cover gas fees and a little extra to make it worthwhile for that validator.&#xA;&#xA;Autonomy&#39;s PoS structure vs. &#34;Free-for-all&#34; incentives&#xA;Current ways of trying to achieve autonomous transactions is to incentivize bots to do it, for example, the compounding of an autocompounder.&#xA;&#xA;This is like putting a small pile of money that is just about worthwhile for somebody to grab, so 100 bots will try and lunge for it before the other ones, and one random lucky bot will win the grand prize of... 5 cents after gas, probably, while everyone else fails.&#xA;&#xA;This works, but is inefficient, prone to frontrunning and this free-for-all battle can make it not worthwhile for the bot, as there is a high chance of loss and a tiny chance of earning (and tiny earnings).&#xA;&#xA;Frontrunners&#xA;Bots aren&#39;t instant, they have to pay for gas and their transactions will sit quietly in the memory pool. Generalized frontrunners can scan the memory pool and copy profitable transactions with a slightly higher gas price, and so the bots trying to grab the pile of money end up being outpaced by those frontrunners.&#xA;&#xA;Inefficiency&#xA;For every lucky bot that succeeds, there are at least 5 more who fail. The model of a free-for-all means there can be only one.&#xA;&#xA;The combination of all these factors causes bots to slowly become disincentivized as more bots join in, with extremely tiny profit margins and high chances of loss. This causes bot makers to just &#34;give up&#34;, turning off their losing bots. This also leads to centralization, as certain people have an &#34;edge&#34; over others, such as well-connected nodes or an agreement with a miner.&#xA;&#xA;To contrast, Autonomy Network is more structured, with each validator bot having the exclusive rights to grab these piles of money at different times. This stops these cycles of bots bumping into each other as they wrestle for this tiny pile of money, saving a lot of time, gas and having better economic guarantees that your request will be executed (if you pay enough).&#xA;&#xA;What can Autonomy be used for?&#xA;Right now, Autonomy Network hasn&#39;t launched most of its stuff yet, like the AUTO token, or its documentation. It&#39;s in beta currently.&#xA;&#xA;The current main usecase of Autonomy is trading. Autonomy&#39;s request architecture allows for limit orders and other stuff available on a CEX, on AutoSwap.Trade.&#xA;&#xA;It could potentially be used in the future to create blockchain life, or NFTs that can run transactions on their own and be autonomous, these things could be used in the Metaverse too. Who knows?&#xA;&#xA;I think Autonomy&#39;s really cool and I&#39;ll definitely be buying the token when it launches. Not financial advice by the way.&#xA;&#xA;🚀&#xA;---&#xA;tags down here as to not interrupt your reading:&#xA;#autonomy #defi #dapp #dev #nft #pos #dex&#xA;&#xA;div class=&#34;post-footer-links&#34;&#xD;&#xA;a rel=&#34;me&#34; href=&#34;https://mastodon.social/@cybertelx&#34;my mastodon/a • a href=&#34;https://github.com/cybertelx&#34;my github/a • please donate if you can: a href=&#34;https://snowtrace.io/address/0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e&#34;0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e/a&#xD;&#xA;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>Smart contracts are like complicated vending machines. They can&#39;t do anything on their own, they can&#39;t just dispense lots of soda randomly, or grow legs and arms to fight a competing vending machine in the area. But what if they could? What if they could create transactions on their own?
</p>

<h2 id="autonomy-network" id="autonomy-network">Autonomy Network</h2>

<p><a href="https://autonomynetwork.io" rel="nofollow">Autonomy Network</a> is a system that allows smart contracts to queue Requests in the Registry contract, with a trigger (e.g. price of ABC goes above 500$). The system then, when the condition is met, calls the contract to do whatever it needs to do.</p>

<p>It works by a sort of Proof-of-Stake system. “Validators” (bots) can lock their AUTO (in the StakeManager contract) to get the exclusive right to execute Requests for a certain period of blocks.</p>

<p>In exchange, the smart contract has to pay enough ETH or AUTO to cover gas fees and a little extra to make it worthwhile for that validator.</p>

<h2 id="autonomy-s-pos-structure-vs-free-for-all-incentives" id="autonomy-s-pos-structure-vs-free-for-all-incentives">Autonomy&#39;s PoS structure vs. “Free-for-all” incentives</h2>

<p>Current ways of trying to achieve autonomous transactions is to incentivize bots to do it, for example, the compounding of an autocompounder.</p>

<p>This is like putting a small pile of money that is just about worthwhile for somebody to grab, so 100 bots will try and lunge for it before the other ones, and one random lucky bot will win the grand prize of... 5 cents after gas, probably, while everyone else fails.</p>

<p>This works, but is inefficient, prone to frontrunning and this free-for-all battle can make it not worthwhile for the bot, as there is a high chance of loss and a tiny chance of earning (and tiny earnings).</p>

<h4 id="frontrunners" id="frontrunners">Frontrunners</h4>

<p>Bots aren&#39;t instant, they have to pay for gas and their transactions will sit quietly in the memory pool. <a href="https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest" rel="nofollow">Generalized frontrunners can scan the memory pool</a> and copy profitable transactions with a slightly higher gas price, and so the bots trying to grab the pile of money end up being outpaced by those frontrunners.</p>

<h4 id="inefficiency" id="inefficiency">Inefficiency</h4>

<p>For every lucky bot that succeeds, there are at least 5 more who fail. The model of a free-for-all means <a href="https://www.youtube.com/watch?v=sqcLjcSloXs" rel="nofollow">there can be only one</a>.</p>

<p>The combination of all these factors causes bots to slowly become disincentivized as more bots join in, with extremely tiny profit margins and high chances of loss. This causes bot makers to just “give up”, turning off their losing bots. This also leads to centralization, as certain people have an “edge” over others, such as well-connected nodes or an agreement with a miner.</p>

<p>To contrast, Autonomy Network is more structured, with each validator bot having the exclusive rights to grab these piles of money at different times. This stops these cycles of bots bumping into each other as they wrestle for this tiny pile of money, saving a lot of time, gas and having better economic guarantees that your request will be executed (if you pay enough).</p>

<h2 id="what-can-autonomy-be-used-for" id="what-can-autonomy-be-used-for">What can Autonomy be used for?</h2>

<p>Right now, Autonomy Network hasn&#39;t launched most of its stuff yet, like the AUTO token, or its documentation. It&#39;s in beta currently.</p>

<p>The current main usecase of Autonomy is trading. Autonomy&#39;s request architecture allows for <a href="https://autoswap.trade" rel="nofollow">limit orders and other stuff available on a CEX, on AutoSwap.Trade</a>.</p>

<p>It could potentially be used in the future to <a href="https://blog.autonomynetwork.io/sentient-nfts-a-new-form-of-life-part-1-the-roadmap-590237e18753" rel="nofollow">create blockchain life</a>, or NFTs that can run transactions on their own and be autonomous, these things could be used in the Metaverse too. Who knows?</p>

<p>I think Autonomy&#39;s really cool and I&#39;ll definitely be buying the token when it launches. Not financial advice by the way.</p>

<p>🚀</p>

<hr>

<p>tags down here as to not interrupt your reading:
<a href="/on-the-block/tag:autonomy" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">autonomy</span></a> <a href="/on-the-block/tag:defi" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">defi</span></a> <a href="/on-the-block/tag:dapp" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">dapp</span></a> <a href="/on-the-block/tag:dev" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">dev</span></a> <a href="/on-the-block/tag:nft" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">nft</span></a> <a href="/on-the-block/tag:pos" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">pos</span></a> <a href="/on-the-block/tag:dex" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">dex</span></a></p>

<div class="post-footer-links">
<a href="https://mastodon.social/@cybertelx" rel="nofollow">my mastodon</a> • <a href="https://github.com/cybertelx" rel="nofollow">my github</a> • please donate if you can: <a href="https://snowtrace.io/address/0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e" rel="nofollow">0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e</a>
</div>
]]></content:encoded>
      <guid>https://paper.wf/on-the-block/giving-smart-contracts-autonomy</guid>
      <pubDate>Thu, 03 Mar 2022 16:40:00 +0000</pubDate>
    </item>
    <item>
      <title>DeFi Liquidity Pairs, &#34;impermanent loss&#34; &amp; very permanent profit</title>
      <link>https://paper.wf/on-the-block/defi-liquidity-pairs-impermanent-loss-and-very-permanent-profit</link>
      <description>&lt;![CDATA[If you&#39;re in the blockchain space and use decentralized exchanges/done some yield farming, chances are that you&#39;ve heard of Liquidity Pairs.&#xA;&#xA;The main risk you&#39;ve probably heard all around the place is the dreaded impermanent loss (😨), a mysterious part of how liquidity pairs work and can lose you tons of money! The thing is, impermanent loss is actually not that bad, and in fact can be good for you!&#xA;!--more--&#xA;&#xA;Liquidity Pairs (I&#39;ll shorten it just to pairs later) are composed of 2 tokens, token A and token B.&#xA;&#xA;When you make an LP, you put 2 amounts of those tokens with equivalent value and you receive a share of the pool. These tokens are put into liquidity pools to help other people trade, and you get fees in exchange for doing so.&#xA;&#xA;What is impermanent loss even?&#xA;Impermanent Loss (IL) is a term used to mean the difference between the value of holding 2 tokens in your wallet and holding 2 tokens in an LP.&#xA;&#xA;Due to asset rebalancing (a trait of Uniswap-based LPs, keeping the market value of those two tokens equally balanced), you earn less than you would just by holding those 2 tokens.&#xA;&#xA;Asset rebalancing can be used for DCA&#xA;  Asset rebalancing is the cause of Impermanent Loss, but how does asset rebalancing work? The truth is much simpler than you might think. Let’s say you have an LP pair of BTC-BNB at a starting ratio of 50:50 at entry. The actual prices of the assets are not important when considering asset rebalancing, only their relative price to each other. So instead of 50:50, let’s simplify the ratio to 1:1.&#xA;  If BTC price rises 10% more relative to BNB price, then 1.1:1 becomes the new ratio before asset rebalancing. Now, the AMM needs to rebalance this into 1:1, so how does it do that? Simple: it sells BTC and buys more BNB, until the value ratio becomes 1:1. As BTC price continues to rise relative to BNB, the AMM continues selling BTC and buying BNB. When the price of BTC moves back down relative to BNB, the AMM does the opposite; it sells BNB and buys BTC.&#xA;AlpacaFinance&#xA;&#xA;This is similar to a strategy for investing: dollar cost averaging! When BTC price goes up compared to BNB, the AMM is rebalanced by arbitrageurs and sells some BTC to put into BNB, and vice versa.&#xA;&#xA;This is also a way of automatic portfolio rebalancing where you earn fees for doing so!&#xA;&#xA;I&#39;m going to provide liquidity now! Woohooo!&#xA;If you want to, do it! It supports your project of choice by giving them liquidity, it earns you fees (that usually outpace any IL) and if they have a farm for earning extra yield (sometimes platforms subsidize liquidity providers by giving them extra money), that&#39;s awesome.&#xA;&#xA;However, you should be careful of massive yields from farms, as it is a sign of an inflationary token which is designed to go down over time. Exercise proper caution, DYOR, look for audits and use trusted platforms like Autofarm or Beefy.&#xA;&#xA;Tips for beginners providing liquidity&#xA;Pair it with a trusted stablecoin for easier tracking&#xA;Enter pools with enough liquidity (  500K$ or so)&#xA;Do your own research, especially look for audits&#xA;Use yield optimizers like Beefy which compound farm yields&#xA;Don&#39;t put in more than you can afford to lose&#xA;Have fun!&#xA;&#xA;Source&#xA;https://docs.alpacafinance.org/alpaca-academy/lesson-5-the-truth-about-impermanent-loss-and-common-misunderstandings&#xA;&#xA;Footnotes&#xA;originally said it was arbitrageurs balancing it, this is actually an intrinsic trait of uniswap LPs. arbitrageurs balance the price between 2 exchanges when there is a difference, that&#39;s arbitrage&#xA;&#xA;---&#xA;tags here to not bother anyone:&#xA;#defi #dex #uniswap #investing #liquidity #farming&#xA;&#xA;div class=&#34;post-footer-links&#34;&#xD;&#xA;a rel=&#34;me&#34; href=&#34;https://mastodon.social/@cybertelx&#34;my mastodon/a • a href=&#34;https://github.com/cybertelx&#34;my github/a • please donate if you can: a href=&#34;https://snowtrace.io/address/0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e&#34;0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e/a&#xD;&#xA;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>If you&#39;re in the blockchain space and use decentralized exchanges/done some yield farming, chances are that you&#39;ve heard of Liquidity Pairs.</p>

<p>The main risk you&#39;ve probably heard all around the place is the dreaded impermanent loss (😨), a mysterious part of how liquidity pairs work and can lose you tons of money! The thing is, impermanent loss is actually not that bad, and in fact can be good for you!
</p>

<p>Liquidity Pairs (I&#39;ll shorten it just to pairs later) are composed of 2 tokens, token A and token B.</p>

<p>When you make an LP, you put 2 amounts of those tokens with equivalent value and you receive a share of the pool. These tokens are put into liquidity pools to help other people trade, and you get fees in exchange for doing so.</p>

<h2 id="what-is-impermanent-loss-even" id="what-is-impermanent-loss-even">What is impermanent loss even?</h2>

<p>Impermanent Loss (IL) is a term used to mean the difference between the value of holding 2 tokens in your wallet and holding 2 tokens in an LP.</p>

<p>Due to asset rebalancing (a trait of Uniswap-based LPs, keeping the market value of those two tokens equally balanced)*, you earn less than you would just by holding those 2 tokens.</p>

<h2 id="asset-rebalancing-can-be-used-for-dca" id="asset-rebalancing-can-be-used-for-dca">Asset rebalancing can be used for DCA</h2>

<blockquote><p>Asset rebalancing is the cause of Impermanent Loss, but how does asset rebalancing work? The truth is much simpler than you might think. Let’s say you have an LP pair of BTC-BNB at a starting ratio of 50:50 at entry. The actual prices of the assets are not important when considering asset rebalancing, only their relative price to each other. So instead of 50:50, let’s simplify the ratio to 1:1.
If BTC price rises 10% more relative to BNB price, then 1.1:1 becomes the new ratio before asset rebalancing. Now, the AMM needs to rebalance this into 1:1, so how does it do that? Simple: it sells BTC and buys more BNB, until the value ratio becomes 1:1. As BTC price continues to rise relative to BNB, the AMM continues selling BTC and buying BNB. When the price of BTC moves back down relative to BNB, the AMM does the opposite; it sells BNB and buys BTC.
– AlpacaFinance</p></blockquote>

<p>This is similar to a strategy for investing: dollar cost averaging! When BTC price goes up compared to BNB, the AMM is rebalanced by arbitrageurs and sells some BTC to put into BNB, and vice versa.</p>

<p>This is also a way of automatic portfolio rebalancing where you earn fees for doing so!</p>

<h2 id="i-m-going-to-provide-liquidity-now-woohooo" id="i-m-going-to-provide-liquidity-now-woohooo">I&#39;m going to provide liquidity now! Woohooo!</h2>

<p>If you want to, <strong>do it!</strong> It supports your project of choice by giving them liquidity, it earns you fees (that usually outpace any IL) and if they have a farm for earning extra yield (sometimes platforms subsidize liquidity providers by giving them extra money), that&#39;s awesome.</p>

<p>However, you should be careful of massive yields from farms, as it is a sign of an inflationary token which is designed to go down over time. Exercise proper caution, DYOR, look for audits and use trusted platforms like Autofarm or Beefy.</p>

<h2 id="tips-for-beginners-providing-liquidity" id="tips-for-beginners-providing-liquidity">Tips for beginners providing liquidity</h2>
<ul><li>Pair it with a trusted stablecoin for easier tracking</li>
<li>Enter pools with enough liquidity (&gt;500K$ or so)</li>
<li>Do your own research, especially look for audits</li>
<li>Use yield optimizers like Beefy which compound farm yields</li>
<li>Don&#39;t put in more than you can afford to lose</li>
<li>Have fun!</li></ul>

<h3 id="source" id="source">Source</h3>

<p><a href="https://docs.alpacafinance.org/alpaca-academy/lesson-5-the-truth-about-impermanent-loss-and-common-misunderstandings" rel="nofollow">https://docs.alpacafinance.org/alpaca-academy/lesson-5-the-truth-about-impermanent-loss-and-common-misunderstandings</a></p>

<h3 id="footnotes" id="footnotes">Footnotes</h3>

<p>*originally said it was arbitrageurs balancing it, <a href="https://docs.uniswap.org/protocol/V2/concepts/protocol-overview/how-uniswap-works" rel="nofollow">this is actually an intrinsic trait of uniswap LPs.</a> arbitrageurs balance the price between 2 exchanges when there is a difference, that&#39;s arbitrage</p>

<hr>

<p>tags here to not bother anyone:
<a href="/on-the-block/tag:defi" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">defi</span></a> <a href="/on-the-block/tag:dex" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">dex</span></a> <a href="/on-the-block/tag:uniswap" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">uniswap</span></a> <a href="/on-the-block/tag:investing" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">investing</span></a> <a href="/on-the-block/tag:liquidity" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">liquidity</span></a> <a href="/on-the-block/tag:farming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">farming</span></a></p>

<div class="post-footer-links">
<a href="https://mastodon.social/@cybertelx" rel="nofollow">my mastodon</a> • <a href="https://github.com/cybertelx" rel="nofollow">my github</a> • please donate if you can: <a href="https://snowtrace.io/address/0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e" rel="nofollow">0x3e86ab8925af073e1f1b3780d9cb77550ee19a6e</a>
</div>
]]></content:encoded>
      <guid>https://paper.wf/on-the-block/defi-liquidity-pairs-impermanent-loss-and-very-permanent-profit</guid>
      <pubDate>Tue, 08 Feb 2022 20:26:24 +0000</pubDate>
    </item>
  </channel>
</rss>