tag:blogger.com,1999:blog-79055152024-03-15T20:10:08.934-05:00FalkenblogEric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.comBlogger1519125tag:blogger.com,1999:blog-7905515.post-72378326286653241762024-03-14T08:31:00.004-05:002024-03-14T16:08:20.205-05:00Moallemi's Auction-Managed AMM<p><span style="font-family: arial;"><span>A <a href="https://arxiv.org/abs/2403.03367" target="_blank">recent paper</a> by </span><span>Columbia professor Ciamac Moallemi</span><span> and three </span><span>Uniswap affiliates (Adams,
Reynolds, and Robinson) presents a
mechanism for recapturing the convexity costs. It builds upon Moallemi's previous <a href="https://arxiv.org/pdf/2305.14604.pdf" target="_blank">work on automated market makers (AMMs) and arbitrage profit</a>, published a year ago, which Moallemi <a href="https://www.youtube.com/watch?v=Hth4P4tMVnY&t=3407s" target="_blank">presented at a16z crypto</a> last summer. In that talk, he mentioned auctions as a way to reduce adverse selection costs for liquidity providers (LP).</span></span></p><p class="MTDisplayEquation"><span style="font-family: arial;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;">AMMs' big problem is that LPs generally lose money in their
popular capital-efficient (v3) pools. An LP's net profitability consists of revenue
in the form of fee income and convexity.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-family: arial;">LP profits = volume*fee – convexity
costs<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;"><span>The LPs present traders with an option, and like all options, these are costly for the sellers. LP convexity costs have three mathematically equivalent formulations, and I <a href="https://falkenblog.blogspot.com/2024/03/lvr-impermanent-loss-theta-and.html" target="_blank">posted</a> three equivalent ways on Monday. Many only consider LP fee revenue as <o:p></o:p></span><span>if convexity costs are just an academic hypothetical relative to an ideal. However, unlike the <a href="https://falkenblog.blogspot.com/2024/02/academic-clob-model.html" target="_blank">hedge fund sniping</a> expense, option expenses are real, as reflected in standard option premiums above intrinsic value.</span></span></p>
<p class="MsoNormal"><span style="font-family: arial;">More relevant to this post, the convexity cost in an AMM is
determined by two variables: the variance of the asset, which is exogenous to
the AMM, and the liquidity in the AMM pool, which is endogenous. Both have a
direct, linear impact on convexity costs.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent: 0.5in;"><span style="font-family: arial;">AMM convexity costs = liquidity *
sqrt(p<sub>0</sub>) * variance / 4<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;"><span>The expected value of
this formula is unaffected by the granularity of the data used to generate the variance, highlighting that this cost has nothing
to do with the frequency of blocks, trading, or hedging. </span><span>The convexity cost is the inverse of the gross arbitrage
profit (noted in my </span><a href="https://falkenblog.blogspot.com/2024/03/lvr-impermanent-loss-theta-and.html" target="_blank">Monday post</a><span>), which is the profit to the arbitrageur collective </span><b>pre-fees</b><span>. </span></span></p>
<p class="MsoNormal"><span style="font-family: arial;">The largest AMM on blockchains is the ETH-USDC 5 basis point
v3 pool, which processes hundreds of millions of USDC daily. This year, the 5 bp
pool is actually making money because its liquidity is down about 60%, which
has a first-order effect on convexity costs. For example, last year, their
liquidity was usually around 30MM, which implies a $100k trade would generate slippage of only 0.01%; currently, liquidity is around 10MM, so the slippage
would be 0.04%. I don't think traders mind, as this is still far better
liquidity than anywhere else. This LP profitability could be temporary, but this
pool has not had this low level of liquidity for three months since 2021, suggesting
LPs have wizened up. With only $150MM in capital in the pool, this annualizes
to an excellent 10% annualized return. </span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: arial;"><b>Average Daily Stats for ETH-USDC 5bp Uniswap v3 Pool</b></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0yqMHfz6RWFrs3v1SfaZd6kiWi8LzYJS_-zCNsA4lxWUaOIeqBDyuj1IklXET5PHdvhA4GO0e04rrn5oqpN_ElkKsarSJTPSLa5eK-3AxWH5xaNvS0BHNmnNI8biybm6s3ZttlbqePJEH5VaTjQqLSXLLS1nbdichHqvQnUziWc8CPIBMNXrf1Q/s427/convcostHist.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="321" data-original-width="427" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0yqMHfz6RWFrs3v1SfaZd6kiWi8LzYJS_-zCNsA4lxWUaOIeqBDyuj1IklXET5PHdvhA4GO0e04rrn5oqpN_ElkKsarSJTPSLa5eK-3AxWH5xaNvS0BHNmnNI8biybm6s3ZttlbqePJEH5VaTjQqLSXLLS1nbdichHqvQnUziWc8CPIBMNXrf1Q/w409-h308/convcostHist.png" width="409" /></span></a></div>
<p class="MsoNormal"><span style="font-family: arial;">Unfortunately, this year's ETH-USDC 5bp pool performance is not typical, and regardless, addressing LP convexity costs is important. The larger capital efficient restricted range (v3) pool LPs lose money. Since January 1, 2023, the ETH-USDC 5bp pool has lost an average of $6k
a day net, including $142k in fee revenue and $148k in convexity costs. If one
could reduce these costs by a mere 10%, the pool LPs would be profitable. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;">The auction mechanism is presented formally per Moallemi's previous
work, but the gist is straightforward. Arbitrageurs bid for the right to be the
'pool manager' who gets all fee revenue and sets the pool fee in a future
period (e.g., a day). As they get <i>all</i> the fees paid, the pool manager will
effectively trade for free because the fees come back to him as
revenue, while other arbitrageurs would pay the <i>X</i> bp fee. This gives the pool manager a competitive advantage in arbitraging
the pool, as those paying the fee will find any mispricing less than the fee
unprofitable, while the pool manager could capture it. If the pool manager pays
the expected fees and just half of the arbitrage revenue, virtually all v3 pool
LPs would be profitable. This is because gross arbitrage revenue—i.e.,
excluding fees—is the flip side of their convexity costs. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;">Chicago professor Eric Brudish has been promoting frequent batch auctions as an alternative to CLOBs for the past decade (see <a href="https://falkenblog.blogspot.com/2024/02/budishs-plan-to-replace-clobs.html" target="_blank">here </a>and <a href="https://falkenblog.blogspot.com/2024/02/academic-clob-model.html" target="_blank">here</a>), highlighting
the tax generated by <i>hedge fund sniping</i>, where speedy high-frequency traders
scoop up resting limit orders before the hapless market makers can remove them. <a href="https://arxiv.org/abs/2208.06046" target="_blank">Milionis, Moamelli, Roughgarden, and Zhang's</a> Loss vs. Rebalancing paper alludes
to hedge fund sniping in the context of AMMs, but that's far-fetched. AMMs do
not have race conditions analogous to traders picking off stale limit orders. Even within the snail's pace of blockchains, you do
not see LPs trying to do the inverse of just-in-time liquidity to get out of
the way of trades (removing liquidity before a big trade and then adding it
back in after the trade). The sniping form of adverse selection is sexy, focusing
on unsympathetic high-frequency traders portrayed by best-selling author and
SBF fanboy Michael Lewis. Still, it's, at best, a curiosity. A generous
estimation of its effect is 0.4 basis points on average CLOB stock market
spread of 3.5 basis points—a trivial effect—and irrelevant in AMMs. The bottom
line is that arbitrage profits generate standard adverse selection
costs for all market makers. With AMMs, this cost has an explicit formula.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;">Nonetheless, the sniping-motivated auction literature explains why Professor Moamelli
had an auction solution ready. Academics
like auctions because, in theory, they do not have any deadweight losses and are
efficient given simplifying assumptions. In practice, however, auction complexity
generates problems, which is why most asset markets use CLOBs, which have reduced
stock trading costs by 90% from 1990 through 2010. <o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family: arial;">Uncertainties in the Bidder's Expected Arbitrage Profit<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-family: arial;">Expected arbitrage profits are a linear function of variance, the square of volatility. The average daily variance using minute-downsampled data is 15 basis
points, but the distribution is flat with a long tail, so we should expect bidders to assume
something well below the mean. <o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7JfrB1oV5oyW-rbfJcfSnccsMTE9nYvURIe_skVsqZxzVtOT5KrXbbceSuN9shDup0iHI6gmWv4tW39lXs9bvVUENs2pL8BdaDi0V25xGF8E5rZuYL5kDsirMLPw0XIjsAvB7sMheJgHmB5Xh4cTMXTcXlPsNJ5xEJJ4YypFhsnirxSKabBOtw/s695/pdfvariance.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="452" data-original-width="695" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7JfrB1oV5oyW-rbfJcfSnccsMTE9nYvURIe_skVsqZxzVtOT5KrXbbceSuN9shDup0iHI6gmWv4tW39lXs9bvVUENs2pL8BdaDi0V25xGF8E5rZuYL5kDsirMLPw0XIjsAvB7sMheJgHmB5Xh4cTMXTcXlPsNJ5xEJJ4YypFhsnirxSKabBOtw/s320/pdfvariance.png" width="320" /></span></a></div>
<p class="MsoNormal"><span style="font-family: arial;"><span>Expected arbitrage profit is also a linear function of liquidity, which is also variable, especially in the popular v3
pools </span><span>[they acknowledge their mathematical model only applies to v2 pools, but clearly, the application would be to v3 pools].</span><span> An intriguing example occurred on March 6, where the ETH-USDC 30 basis
point pool liquidity was a whopping 30 times higher than its standard value over
a 5% price interval, from $3,612 to $3,812. This was due to a massive LP position above the current
price, where the LP probably thought it would be an excellent place to sell
their ETH without any hassle. Interestingly, in this case, the LP lost $2.6MM
in convexity costs and captured $2.2MM in fees, for a net loss of about 40 basis
points on the $100MM in ETH they effectively sold. This was not a good
deal, but not horrible given the size. The bottom line is that the expected
variance of arb profit in the face of these liquidity spikes increases the
expected arb profit volatility even more, making it more difficult because the
LPs can withdraw it at any time.</span></span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: arial;"><b>Huge LP Position Taken Out Last Week</b></span></p>
<p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXuoFt1FNK7UF28kXq956oG4S4b6435wGcaIJivr5U0f4nE7UfwLbjhnPmDOqAzkqrai0s5wKjRNl4IuR7yPxdmB7NtyEscgkv2wqut232mAOPvHuvzKBpS0RD8DoKU2LLpJ3I9GMhOKMlsy6wcg_3Ny5rGmMkU30l9x75Y27DL_S0m30p4ZII3w/s655/liqPrice.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="452" data-original-width="655" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXuoFt1FNK7UF28kXq956oG4S4b6435wGcaIJivr5U0f4nE7UfwLbjhnPmDOqAzkqrai0s5wKjRNl4IuR7yPxdmB7NtyEscgkv2wqut232mAOPvHuvzKBpS0RD8DoKU2LLpJ3I9GMhOKMlsy6wcg_3Ny5rGmMkU30l9x75Y27DL_S0m30p4ZII3w/s320/liqPrice.png" width="320" /></span></a></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: arial;"><br /></span></div><span style="font-family: arial;"><span><div><span><br /></span></div><div><span><b><span>New Gaming Strategies</span></b></span></div><div><span><b><span><br /></span></b></span></div>There is also the issue of the unknown unknowns in this setup. For example, i</span><span>n March 2020, a bidder </span><a href="https://medium.com/@whiterabbit_hq/black-thursday-for-makerdao-8-32-million-was-liquidated-for-0-dai-36b83cac56b6" target="_blank">rigged an auction</a><span> to buy $8.32 million in ETH for zero DAI. While that attack has been exposed, who knows what strategies this approach generates? For example, one could handicap an arbitrageur by withdrawing all of your liquidity when an adversary wins the pool manager's right. This could be a part of a long game where the punisher is willing to incur a cost to inflict a cost on others, getting them to stop bidding. As withdrawals are standard in v3 pools, it is difficult to see how to lock in liquidity and avoid this.</span></span><div><span style="font-family: arial;"><br /></span><div><span style="font-family: arial;">While the pool manager would have an advantage in arbitrage
trading, they would not prevent noise traders from inadvertently taking some of their
profit, as people will randomly buy when the AMM price is low. To prevent that, a pool manager might target traders
using high latency front ends like Uniswap, and front-run these
trades. Conversely, traders could see the current mispricing and anticipate an
arbitrage trade, sandwich attacking the arbitrageur. While chains without the
slow ETH mainchain could avoid explicit MEV tactics, one can expect motivated traders to see these transactions and get
in front of them regardless, as latency for a decentralized blockchain is
orders of magnitude greater than anything on centralized exchanges (100s of
milliseconds vs 100s of microseconds). Unlike co-location on centralized
exchanges, there would be back-room deals for access to the sequencers or RPC
nodes, creating a deadweight loss to users. <o:p></o:p></span><p></p>
<p class="MsoNormal"><span style="font-family: arial;">Even without front-running, there is the question of how
much of the total arbitrage profit a zero-cost ab could capture. These
uncertainties would incentivize the Bidder to price arbitrage profit well below
its expected value.</span></p><p class="MsoNormal"><span style="font-family: arial;">The paper also acknowledges the potential for an increase in sandwich attacks because the zero fee would make these more attractive. This would be like the front-running attack on lucky noise traders, but instead, it would target any large trade. The authors mention that off-chain auctions or private relays could address this, but this complicates the mechanism even further (how are private relays incented?). A strategy space grows exponentially in the number of moves players can make. Simplicity is the key to security.</span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrmOW2qdzjXNa1-cyOcPBFtxOc5H2hRZ7RBCEtqEC7iUNfEGI8whyphenhyphen7Pi5EEPJoBC5Id-tczRxPPWAt6jYEIq5CykXj52DW0SY7I7X-fTbxncXcn2pjgXMGa7CwEwPhOh7wZlVlUTUENBBmZtDIBqmiZvzTebZxmHuc5_mbt7TN6ZtKHXVZfqnUsA/s618/histpdf.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="452" data-original-width="618" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrmOW2qdzjXNa1-cyOcPBFtxOc5H2hRZ7RBCEtqEC7iUNfEGI8whyphenhyphen7Pi5EEPJoBC5Id-tczRxPPWAt6jYEIq5CykXj52DW0SY7I7X-fTbxncXcn2pjgXMGa7CwEwPhOh7wZlVlUTUENBBmZtDIBqmiZvzTebZxmHuc5_mbt7TN6ZtKHXVZfqnUsA/s320/histpdf.png" width="320" /></span></a></div>
<p class="MsoNormal"><span style="font-family: arial;">Lastly, there is the issue of to what extent arbitrageurs
are hedging off the blockchain. Given the mispricing distribution, we can see
that the AMM price is generally within the fee for the 5 bp pool. As centralized
exchanges charge at least 2.5bps, and there is always slippage (i.e., price
impact, spread), the total cost of a hedge is at least 5 bps at the size they would
trade (chunks of $50k). The arbs cannot hedge each AMM arbitrage trade with a
CEX trade and lock in a profit. They probably hedge every hour or day or when
their on-chain position reaches some absolute level. </span></p><p class="MsoNormal"><span style="font-family: arial;">This practical nature of hedging implies the arbs will
have the opposite risk profile as the LPs, becoming short during price declines
and long on the opposite. As this arb would have tens of millions at work, it creates
an <b>endogenous risk amplification mechanism</b> because a price decline would make
the arb profit and also increase his short position, so he would have the means
and motive to push it down further to hit stop-loss orders on centralized
exchanges. <o:p></o:p></span></p><p class="MsoNormal"><span style="font-family: arial;"><br /></span></p>
<p class="MsoNormal"><span style="font-family: arial;">If average convexity costs for a pool were 100, the
uncertainty about future liquidity and variance and how much of the arb could be
captured would lower the didder's price well below that, say, half. The arb
would have to pay hedging costs and gas fees, reducing this further. Then there
is the loss of the fees the current arbs pay. It's possible that LPs would make less money, just as ObamaCare, in theory, was supposed to reduce medical costs but, in practice, increased them. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: arial;"><span>Nevertheless, this is a step in the right direction, addressing a major problem in the status quo. Given that the difference between revenues and costs on these pools is 3%, the bidder
could pay a mere 10% of the expected total arbitrage profits and bring LPs back
to profitability. The biggest downside is that there are many complexities
generated by this approach, implying a lot of work for a temporary solution, as
the best-case scenario would capture a small fraction of the arbitrage profits, leaving significant room for improvement. </span><o:p></o:p></span></p><br /></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-49790800014201582102024-03-11T18:20:00.001-05:002024-03-11T18:24:39.198-05:00LvR, Impermanent Loss, Theta, and Arbitrage Profits<html xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- saved from url=(0014)about:internet --><!-- MSIE Mark of the Web -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta>
<meta content="MathPageGen" name="keywords"></meta>
<meta content="MathPage 1.0.1" name="Generator"></meta>
<meta content="Microsoft Word 15" name="Originator"></meta>
<title>arbprofit</title>
<link href="arbprofits_files/themedata.thmx" rel="themeData"></link>
<link href="arbprofits_files/colorschememapping.xml" rel="colorSchemeMapping"></link>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
}
@font-face
{font-family:Aptos;
}
@font-face
{font-family:LMRoman10-Regular;
panose-1:0 0 0 0 0 0 0 0 0 0;
}
@font-face
{font-family:LMSans10-Regular;
panose-1:0 0 0 0 0 0 0 0 0 0;
}
@font-face
{font-family:LMMathItalic10-Regular;
panose-1:0 0 0 0 0 0 0 0 0 0;
}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
h1
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Times New Roman",serif;
color:#0F4761;
font-weight:normal;}
h2
{margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Times New Roman",serif;
color:#0F4761;
font-weight:normal;}
h3
{margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#0A2F40;
font-weight:normal;}
h4
{margin-top:4.0pt;
margin-right:0in;
margin-bottom:2.0pt;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#0F4761;
font-weight:normal;
font-style:italic;}
h5
{margin-top:4.0pt;
margin-right:0in;
margin-bottom:2.0pt;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#0F4761;
font-weight:normal;}
h6
{margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#595959;
font-weight:normal;
font-style:italic;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
{margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#595959;
}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
{margin:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#272727;
font-style:italic;}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
{margin:0in;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
color:#272727;
}
p.MsoTitle, li.MsoTitle, div.MsoTitle
{margin-top:0in;
margin-right:0in;
margin-bottom:4.0pt;
margin-left:0in;
font-size:28.0pt;
font-family:"Aptos Display",sans-serif;
letter-spacing:-.5pt;
}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
{margin:0in;
font-size:28.0pt;
font-family:"Aptos Display",sans-serif;
letter-spacing:-.5pt;
}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
{margin:0in;
font-size:28.0pt;
font-family:"Aptos Display",sans-serif;
letter-spacing:-.5pt;
}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
{margin-top:0in;
margin-right:0in;
margin-bottom:4.0pt;
margin-left:0in;
font-size:28.0pt;
font-family:"Aptos Display",sans-serif;
letter-spacing:-.5pt;
}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
font-size:14.0pt;
font-family:"Aptos",sans-serif;
color:#595959;
letter-spacing:.75pt;
}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
p.MsoQuote, li.MsoQuote, div.MsoQuote
{margin-top:8.0pt;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
text-align:center;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#404040;
font-style:italic;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
{margin-top:.25in;
margin-right:.6in;
margin-bottom:.25in;
margin-left:.6in;
text-align:center;
line-height:107%;
border:none;
padding:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:#0F4761;
font-style:italic;}
span.MsoIntenseEmphasis
{color:#0F4761;
font-style:italic;}
span.MsoIntenseReference
{font-variant:small-caps;
color:#0F4761;
letter-spacing:.25pt;
font-weight:bold;}
span.Heading1Char
{font-family:"Times New Roman",serif;
color:#0F4761;
}
span.Heading2Char
{font-family:"Times New Roman",serif;
color:#0F4761;
}
span.Heading3Char
{font-family:"Times New Roman",serif;
color:#0A2F40;
}
span.Heading4Char
{font-family:"Times New Roman",serif;
color:#0F4761;
font-style:italic;}
span.Heading5Char
{font-family:"Times New Roman",serif;
color:#0F4761;
}
span.Heading6Char
{font-family:"Times New Roman",serif;
color:#595959;
font-style:italic;}
span.Heading7Char
{font-family:"Times New Roman",serif;
color:#595959;
}
span.Heading8Char
{font-family:"Times New Roman",serif;
color:#272727;
font-style:italic;}
span.Heading9Char
{font-family:"Times New Roman",serif;
color:#272727;
}
span.TitleChar
{font-family:"Aptos Display",sans-serif;
letter-spacing:-.5pt;
}
span.SubtitleChar
{font-family:"Times New Roman",serif;
color:#595959;
letter-spacing:.75pt;}
span.QuoteChar
{font-family:"Times New Roman",serif;
color:#404040;
font-style:italic;}
span.IntenseQuoteChar
{font-family:"Times New Roman",serif;
color:#0F4761;
font-style:italic;}
p.MTDisplayEquation, li.MTDisplayEquation, div.MTDisplayEquation
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
font-size:12.0pt;
font-family:"Times New Roman",serif;
}
span.MTDisplayEquationChar
{font-family:"Times New Roman",serif;
}
span.fontstyle01
{font-family:"LMRoman10-Regular",serif;
color:black;
font-weight:normal;
font-style:normal;}
span.fontstyle21
{font-family:"LMSans10-Regular",serif;
color:black;
font-weight:normal;
font-style:normal;}
span.fontstyle31
{font-family:"LMMathItalic10-Regular",serif;
color:black;
font-weight:normal;
font-style:italic;}
.MsoChpDefault
{}
.MsoPapDefault
{margin-bottom:8.0pt;
line-height:107%;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
}
div.WordSection1
{page:WordSection1;}
-->
</style>
<style>
annotation { display:none }
</style>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML" type="text/javascript">
</script>
</head>
<body lang="EN-US" link="#467886" style="word-wrap: break-word;" vlink="#96607D">
<div class="WordSection1">
<p class="MsoNormal">Columbia professor Ciamac Moallemi, Uniswap's Adams, Reynolds,
and Dan Robinson <a href="https://arxiv.org/abs/2403.03367">released </a>a
paper last week on recapturing some of the LP convexity costs by having the
arbitrageurs bid for the right to trade at a reduced rate. I wanted to dive
into that, but I thought it would be helpful to see how arbitrage profits
relate to LP convexity costs, as this is not obvious. Further, people in this
space use different terms and formulas for what I am calling the LP convexity
costs, and it would be useful to clarify how they differ.</p>
<p class="MsoNormal">Ultimately, loss vs. rebalancing (LvR), impermanent loss
(IL), convexity costs, and theta, represent the same thing. The estimation
method for these metrics will use daily data generating random errors that
become irrelevant due to the Law of Large Numbers. That is, resetting the IL
benchmark each day is like hedging once a day or using daily data to estimate
variance. </p>
<p class="MsoNormal"><b>Impermanent Loss</b></p>
<p class="MTDisplayEquation">The OG term for the peculiar LP cost in constant
product AMMs is 'impermanent loss.' It was called that because while an LP
could have a loss relative to their initial LP position, they would not lose
money if the price moved back, implying that loss was not permanent. One could
say that about any mark-to-market loss, but whatever, it's a commonly used
term, and generally, people know what it means. </p>
<p class="MTDisplayEquation">The basic idea was to compare the LP's current pool
position with the original LP token deposit, though one can compare it to the
prior tokens at any time in the past. I will use ETH and USDC as the tokens in
my example, but the analysis generalizes to any tokens A and B, making it easier
to intuit. </p>
<p class="MTDisplayEquation">An LP position is necessarily adversely selected,
losing ETH when the price rises gaining ETH when its price falls. It is this
change in token quantities that drives the IL.</p>
<p align="center" class="MTDisplayEquation" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>V</mi><mi>a</mi><mi>l</mi><mi>u</mi><mi>e</mi><mo stretchy="false">(</mo><mi>i</mi><mi>n</mi><mi>i</mi><mi>t</mi><mi>i</mi><mi>a</mi><mi>l</mi><mtext> </mtext><mi>L</mi><mi>P</mi><mtext> </mtext><mi>p</mi><mi>o</mi><mi>s</mi><mi>i</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mtext> </mtext><mi>a</mi><mi>t</mi><mtext> </mtext><mi>c</mi><mi>u</mi><mi>r</mi><mi>r</mi><mi>e</mi><mi>n</mi><mi>t</mi><mtext> </mtext><mi>p</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo stretchy="false">)</mo><mo>−</mo><mi>V</mi><mi>a</mi><mi>l</mi><mi>u</mi><mi>e</mi><mo stretchy="false">(</mo><mi>L</mi><mi>P</mi><mtext> </mtext><mi>a</mi><mi>t</mi><mtext> </mtext><mi>c</mi><mi>u</mi><mi>r</mi><mi>r</mi><mi>e</mi><mi>n</mi><mi>t</mi><mtext> </mtext><mi>p</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo stretchy="false">)</mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mo>−</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</mfenced><mo>−</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>1</mn>
</msub>
<mo>+</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>1</mn>
</msub>
<mo>−</mo><mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>0</mn>
</msub>
</mrow>
</mfenced><mo>−</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mfenced close="}" open="{">
<mrow>
<mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>1</mn>
</msub>
<mo>−</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
</mrow>
</mfenced>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGjb
Gaamitaiabg2da9iaadAfacaWGHbGaamiBaiaadwhacaWGLbGaaiik
aiaadMgacaWGUbGaamyAaiaadshacaWGPbGaamyyaiaadYgacaqGGa
GaamitaiaadcfacaqGGaGaamiCaiaad+gacaWGZbGaamyAaiaadsha
caWGPbGaam4Baiaad6gacaqGGaGaamyyaiaadshacaqGGaGaam4yai
aadwhacaWGYbGaamOCaiaadwgacaWGUbGaamiDaiaabccacaWGWbGa
amOCaiaadMgacaWGJbGaamyzaiaacMcacqGHsislcaWGwbGaamyyai
aadYgacaWG1bGaamyzaiaacIcacaWGmbGaamiuaiaabccacaWGHbGa
amiDaiaabccacaWGJbGaamyDaiaadkhacaWGYbGaamyzaiaad6gaca
WG0bGaaeiiaiaadchacaWGYbGaamyAaiaadogacaWGLbGaaiykaaqa
aiaadMeacaWGmbGaeyypa0ZaaiWaaeaacaWGvbGaam4uaiaadseada
WgaaWcbaGaaGimaaqabaGccqGHsislcaWGfbGaamivaiaadIeadaWg
aaWcbaGaaGimaaqabaGccqGHflY1caWGWbWaaSbaaSqaaiaaigdaae
qaaaGccaGL7bGaayzFaaGaeyOeI0YaaiWaaeaacaWGvbGaam4uaiaa
dseadaWgaaWcbaGaaGymaaqabaGccqGHRaWkcaWGfbGaamivaiaadI
eadaWgaaWcbaGaaGymaaqabaGccqGHflY1caWGWbWaaSbaaSqaaiaa
igdaaeqaaaGccaGL7bGaayzFaaaabaGaamysaiaadYeacqGH9aqpda
GadaqaaiaadwfacaWGtbGaamiramaaBaaaleaacaaIXaaabeaakiab
gkHiTiaadwfacaWGtbGaamiramaaBaaaleaacaaIWaaabeaaaOGaay
5Eaiaaw2haaiabgkHiTiaadchadaWgaaWcbaGaaGymaaqabaGcdaGa
daqaaiaadweacaWGubGaamisamaaBaaaleaacaaIXaaabeaakiabgk
HiTiaadweacaWGubGaamisamaaBaaaleaacaaIWaaabeaaaOGaay5E
aiaaw2haaaaaaa@AF65@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">This simplifies to a net token change valued at the ending
price</p>
<p align="center" class="MsoNormal" style="text-align: center;">Equation (1) - net LP
token change: <math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>Δ</mi><mi>U</mi><mi>S</mi><mi>D</mi><mo>+</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><mi>Δ</mi><mi>E</mi><mi>T</mi><mi>H</mi></mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamysaiaadY
eacqGH9aqpcqqHuoarcaWGvbGaam4uaiaadseacqGHRaWkcaWGWbWa
aSbaaSqaaiaaigdaaeqaaOGaeyyXICTaeuiLdqKaamyraiaadsfaca
WGibaaaa@4564@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">The AMM generates simple formulas for <span class="MPEntity">Δ</span>ETH and <span class="MPEntity">Δ</span>USD as a
function of liquidity and price changes. Note these are the pool token changes,
excluding fees.</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>Δ</mi><mi>E</mi><mi>T</mi><mi>H</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>Δ</mi><mi>U</mi><mi>S</mi><mi>D</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacqqHuo
arcaWGfbGaamivaiaadIeacqGH9aqpcaWGSbGaamyAaiaadghacqGH
flY1daqadaqaamaaliaabaGaaGymaaqaamaakaaabaGaamiCamaaBa
aaleaacaaIXaaabeaaaeqaaaaakiabgkHiTmaaliaabaGaaGymaaqa
amaakaaabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaaaaOGaay
jkaiaawMcaaaqaaiabfs5aejaadwfacaWGtbGaamiraiabg2da9iaa
dYgacaWGPbGaamyCaiabgwSixpaabmaabaWaaOaaaeaacaWGWbWaaS
baaSqaaiaaigdaaeqaaaqabaGccqGHsisldaGcaaqaaiaadchadaWg
aaWcbaGaaGimaaqabaaabeaaaOGaayjkaiaawMcaaaaaaa@585A@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">Plugging this in and doing algebra, we get a square-root
function that, multiplied by liquidity, generates the second metric for the
LP's convexity cost:</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced><mo>+</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>+</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mn>2</mn><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>I</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<mfenced>
<mrow>
<mn>2</mn><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
<mo>−</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</mfenced></mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGjb
Gaamitaiabg2da9iaadYgacaWGPbGaamyCaiabgwSixpaabmaabaWa
aOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaaqabaGccqGHsislda
GcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaaOGaayjkaiaa
wMcaaiabgUcaRiaadchadaWgaaWcbaGaaGymaaqabaGccqGHflY1ca
WGSbGaamyAaiaadghacqGHflY1daqadaqaamaaliaabaGaaGymaaqa
amaakaaabaGaamiCamaaBaaaleaacaaIXaaabeaaaeqaaaaakiabgk
HiTmaaliaabaGaaGymaaqaamaakaaabaGaamiCamaaBaaaleaacaaI
WaaabeaaaeqaaaaaaOGaayjkaiaawMcaaaqaaiaadMeacaWGmbGaey
ypa0JaamiBaiaadMgacaWGXbGaeyyXIC9aaeWaaeaadaGcaaqaaiaa
dchadaWgaaWcbaGaaGymaaqabaaabeaakiabgkHiTmaakaaabaGaam
iCamaaBaaaleaacaaIWaaabeaaaeqaaOGaey4kaSYaaOaaaeaacaWG
WbWaaSbaaSqaaiaaigdaaeqaaaqabaGccqGHsisldaWccaqaaiaadc
hadaWgaaWcbaGaaGymaaqabaaakeaadaGcaaqaaiaadchadaWgaaWc
baGaaGimaaqabaaabeaaaaaakiaawIcacaGLPaaaaeaacaWGjbGaam
itaiabg2da9iaadYgacaWGPbGaamyCaiabgwSixpaabmaabaGaaGOm
amaakaaabaGaamiCamaaBaaaleaacaaIXaaabeaaaeqaaOGaeyOeI0
YaaOaaaeaacaWGWbWaaSbaaSqaaiaaicdaaeqaaaqabaGccqGHsisl
daWccaqaaiaadchadaWgaaWcbaGaaGymaaqabaaakeaadaGcaaqaai
aadchadaWgaaWcbaGaaGimaaqabaaabeaaaaaakiaawIcacaGLPaaa
aeaacaWGjbGaamitaiabg2da9iaadYgacaWGPbGaamyCaiabgwSixp
aalaaabaWaaeWaaeaacaaIYaWaaOaaaeaacaWGWbWaaSbaaSqaaiaa
icdaaeqaaOGaamiCamaaBaaaleaacaaIXaaabeaaaeqaaOGaeyOeI0
IaamiCamaaBaaaleaacaaIWaaabeaakiabgkHiTiaadchadaWgaaWc
baGaaGymaaqabaaakiaawIcacaGLPaaaaeaadaGcaaqaaiaadchada
WgaaWcbaGaaGimaaqabaaabeaaaaaaaaa@9566@
</annotation>
</semantics>
</math></p>
<p align="center" class="MsoNormal" style="text-align: center;">equation (2) - square
of square roots: <math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>I</mi><mi>L</mi><mo>=</mo><mo>−</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamysaiaadY
eacqGH9aqpcqGHsislcaWGSbGaamyAaiaadghacqGHflY1daWcaaqa
amaabmaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaaqaba
GccqGHsisldaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaa
aOGaayjkaiaawMcaamaaCaaaleqabaGaaGOmaaaaaOqaamaakaaaba
GaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaaaaaa@47F6@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal"><b>Arbitrage Profit</b></p>
<p class="MsoNormal">As the LP's IL is based on net tokens coming in, someone
took the opposite side; if the LPs net +1 ETH and <span class="MPEntity">−</span>4000
USDC, traders net +1 ETH and <span class="MPEntity">−</span>4000 USDC. As the LPs always lose
money, the trader collective always makes money pre-fees. </p>
<p class="MsoNormal">The arbitrage profit is how much the arb is traded times the
price changes. </p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>Δ</mi><mi>E</mi><mi>T</mi><mi>H</mi><mo>⋅</mo><mfenced>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>−</mo><mi>f</mi><mi>i</mi><mi>l</mi><mi>l</mi><mi>P</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi></mrow>
</mfenced></mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamyqaiaadk
hacaWGIbGaamyAaiaadshacaWGYbGaamyyaiaadEgacaWGLbGaamiu
aiaad6gacaWGmbGaeyypa0JaeuiLdqKaamyraiaadsfacaWGibGaey
yXIC9aaeWaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaOGaeyOeI0Ia
amOzaiaadMgacaWGSbGaamiBaiaadcfacaWGYbGaamyAaiaadogaca
WGLbaacaGLOaGaayzkaaaaaa@5496@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">We have the <span class="MPEntity">Δ</span>ETH function noted above, so we need the
AMM fill price. This is the geometric mean of the starting and ending price.</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>f</mi><mi>i</mi><mi>l</mi><mi>l</mi><mi>P</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo>=</mo><mfrac>
<mrow>
<mi>Δ</mi><mi>U</mi><mi>S</mi><mi>D</mi></mrow>
<mrow>
<mi>Δ</mi><mi>E</mi><mi>T</mi><mi>H</mi></mrow>
</mfrac>
<mo>=</mo><mfrac>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced></mrow>
</mfrac>
<mo>=</mo><mfrac>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
</mfrac>
<mo>⋅</mo><mfrac>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mrow>
<mfenced>
<mrow>
<mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced></mrow>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>f</mi><mi>i</mi><mi>l</mi><mi>l</mi><mi>P</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo>=</mo><mfrac>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>+</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
<mo>−</mo><mn>2</mn><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn><mo>−</mo><mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>f</mi><mi>i</mi><mi>l</mi><mi>l</mi><mi>P</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo>=</mo><mfrac>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>⋅</mo><mfenced>
<mrow>
<mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>+</mo><mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mn>2</mn></mrow>
</mfenced></mrow>
<mrow>
<mfenced>
<mrow>
<mn>2</mn><mo>−</mo><mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced></mrow>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>f</mi><mi>i</mi><mi>l</mi><mi>l</mi><mi>P</mi><mi>r</mi><mi>i</mi><mi>c</mi><mi>e</mi><mo>=</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGMb
GaamyAaiaadYgacaWGSbGaamiuaiaadkhacaWGPbGaam4yaiaadwga
cqGH9aqpdaWcaaqaaiabfs5aejaadwfacaWGtbGaamiraaqaaiabfs
5aejaadweacaWGubGaamisaaaacqGH9aqpdaWcaaqaaiaadYgacaWG
PbGaamyCaiabgwSixpaabmaabaWaaOaaaeaacaWGWbWaaSbaaSqaai
aaigdaaeqaaaqabaGccqGHsisldaGcaaqaaiaadchadaWgaaWcbaGa
aGimaaqabaaabeaaaOGaayjkaiaawMcaaaqaaiaadYgacaWGPbGaam
yCaiabgwSixpaabmaabaWaaSGaaeaacaaIXaaabaWaaOaaaeaacaWG
WbWaaSbaaSqaaiaaigdaaeqaaaqabaaaaOGaeyOeI0YaaSGaaeaaca
aIXaaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaicdaaeqaaaqabaaa
aaGccaGLOaGaayzkaaaaaiabg2da9maalaaabaWaaeWaaeaadaGcaa
qaaiaadchadaWgaaWcbaGaaGymaaqabaaabeaakiabgkHiTmaakaaa
baGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaGccaGLOaGaayzkaa
aabaWaaeWaaeaadaGcaaqaaiaadchadaWgaaWcbaGaaGymaaqabaaa
beaakiabgkHiTmaakaaabaGaamiCamaaBaaaleaacaaIWaaabeaaae
qaaaGccaGLOaGaayzkaaaaaiabgwSixpaalaaabaWaaeWaaeaadaGc
aaqaaiaadchadaWgaaWcbaGaaGymaaqabaaabeaakiabgkHiTmaaka
aabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaGccaGLOaGaayzk
aaaabaWaaeWaaeaadaWccaqaaiaaigdaaeaadaGcaaqaaiaadchada
WgaaWcbaGaaGymaaqabaaabeaaaaGccqGHsisldaWccaqaaiaaigda
aeaadaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaaaaaki
aawIcacaGLPaaaaaaabaGaamOzaiaadMgacaWGSbGaamiBaiaadcfa
caWGYbGaamyAaiaadogacaWGLbGaeyypa0ZaaSaaaeaacaWGWbWaaS
baaSqaaiaaigdaaeqaaOGaey4kaSIaamiCamaaBaaaleaacaaIWaaa
beaakiabgkHiTiaaikdadaGcaaqaaiaadchadaWgaaWcbaGaaGymaa
qabaGccqGHflY1caWGWbWaaSbaaSqaaiaaicdaaeqaaaqabaaakeaa
caaIYaGaeyOeI0YaaSGaaeaadaGcaaqaaiaadchadaWgaaWcbaGaaG
imaaqabaaabeaaaOqaamaakaaabaGaamiCamaaBaaaleaacaaIXaaa
beaaaeqaaaaakiabgkHiTmaaliaabaWaaOaaaeaacaWGWbWaaSbaaS
qaaiaaigdaaeqaaaqabaaakeaadaGcaaqaaiaadchadaWgaaWcbaGa
aGimaaqabaaabeaaaaaaaaGcbaGaamOzaiaadMgacaWGSbGaamiBai
aadcfacaWGYbGaamyAaiaadogacaWGLbGaeyypa0ZaaSaaaeaadaGc
aaqaaiaadchadaWgaaWcbaGaaGymaaqabaGccqGHflY1caWGWbWaaS
baaSqaaiaaicdaaeqaaaqabaGccqGHflY1daqadaqaamaaliaabaWa
aOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaaqabaaakeaadaGcaa
qaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaaaGccqGHRaWkdaWc
caqaamaakaaabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaGcba
WaaOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaaqabaaaaOGaeyOe
I0IaaGOmaaGaayjkaiaawMcaaaqaamaabmaabaGaaGOmaiabgkHiTm
aaliaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaicdaaeqaaaqabaaa
keaadaGcaaqaaiaadchadaWgaaWcbaGaaGymaaqabaaabeaaaaGccq
GHsisldaWccaqaamaakaaabaGaamiCamaaBaaaleaacaaIXaaabeaa
aeqaaaGcbaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaicdaaeqaaaqaba
aaaaGccaGLOaGaayzkaaaaaaqaaiaadAgacaWGPbGaamiBaiaadYga
caWGqbGaamOCaiaadMgacaWGJbGaamyzaiabg2da9maakaaabaGaam
iCamaaBaaaleaacaaIXaaabeaakiabgwSixlaadchadaWgaaWcbaGa
aGimaaqabaaabeaaaaaa@D914@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">As the fill price is positive, I ignored the sign in the
above algebra. Substituting the fill price and ETH delta formula into the
original equation generates the negative of equation(2), the square root
function above. </p>
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; width: 100%;">
<tr>
<td align="left" nowrap="" style="width: 30%;">
<p class="MTDisplayEquation"></p>
</td>
<td align="center" nowrap="" style="width: 40%;">
<p class="MTDisplayEquation"><math display="block" style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><mfrac bevelled="true">
<mn>1</mn>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
</mfenced><mo>⋅</mo><mfenced>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>+</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfenced>
<mrow>
<mn>2</mn><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><mfrac bevelled="true">
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<mfenced>
<mrow>
<mn>2</mn><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>−</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</mfenced></mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>A</mi><mi>r</mi><mi>b</mi><mi>i</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>g</mi><mi>e</mi><mi>P</mi><mi>n</mi><mi>L</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGbb
GaamOCaiaadkgacaWGPbGaamiDaiaadkhacaWGHbGaam4zaiaadwga
caWGqbGaamOBaiaadYeacqGH9aqpcaWGSbGaamyAaiaadghacqGHfl
Y1daqadaqaamaaliaabaGaaGymaaqaamaakaaabaGaamiCamaaBaaa
leaacaaIXaaabeaaaeqaaaaakiabgkHiTmaaliaabaGaaGymaaqaam
aakaaabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaaaaOGaayjk
aiaawMcaaiabgwSixpaabmaabaGaamiCamaaBaaaleaacaaIXaaabe
aakiabgkHiTmaakaaabaGaamiCamaaBaaaleaacaaIXaaabeaakiaa
dchadaWgaaWcbaGaaGimaaqabaaabeaaaOGaayjkaiaawMcaaaqaai
aadgeacaWGYbGaamOyaiaadMgacaWG0bGaamOCaiaadggacaWGNbGa
amyzaiaadcfacaWGUbGaamitaiabg2da9iaadYgacaWGPbGaamyCai
abgwSixpaabmaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqa
aaqabaGccqGHsisldaWccaqaaiaadchadaWgaaWcbaGaaGymaaqaba
aakeaadaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaaaGc
cqGHsisldaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaki
abgUcaRmaakaaabaGaamiCamaaBaaaleaacaaIXaaabeaaaeqaaaGc
caGLOaGaayzkaaaabaGaamyqaiaadkhacaWGIbGaamyAaiaadshaca
WGYbGaamyyaiaadEgacaWGLbGaamiuaiaad6gacaWGmbGaeyypa0Ja
amiBaiaadMgacaWGXbGaeyyXIC9aaeWaaeaacaaIYaWaaOaaaeaaca
WGWbWaaSbaaSqaaiaaigdaaeqaaaqabaGccqGHsisldaWccaqaaiaa
dchadaWgaaWcbaGaaGymaaqabaaakeaadaGcaaqaaiaadchadaWgaa
WcbaGaaGimaaqabaaabeaaaaGccqGHsisldaGcaaqaaiaadchadaWg
aaWcbaGaaGimaaqabaaabeaaaOGaayjkaiaawMcaaaqaaiaadgeaca
WGYbGaamOyaiaadMgacaWG0bGaamOCaiaadggacaWGNbGaamyzaiaa
dcfacaWGUbGaamitaiabg2da9iaadYgacaWGPbGaamyCaiabgwSixp
aalaaabaWaaeWaaeaacaaIYaWaaOaaaeaacaWGWbWaaSbaaSqaaiaa
igdaaeqaaOGaeyyXICTaamiCamaaBaaaleaacaaIWaaabeaaaeqaaO
GaeyOeI0IaamiCamaaBaaaleaacaaIXaaabeaakiabgkHiTiaadcha
daWgaaWcbaGaaGimaaqabaaakiaawIcacaGLPaaaaeaadaGcaaqaai
aadchadaWgaaWcbaGaaGimaaqabaaabeaaaaaakeaacaWGbbGaamOC
aiaadkgacaWGPbGaamiDaiaadkhacaWGHbGaam4zaiaadwgacaWGqb
GaamOBaiaadYeacqGH9aqpcaWGSbGaamyAaiaadghacqGHflY1daWc
aaqaamaabmaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaigdaaeqaaa
qabaGccqGHsisldaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaa
beaaaOGaayjkaiaawMcaamaaCaaaleqabaGaaGOmaaaaaOqaamaaka
aabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaaaaaaaa@D0D5@
</annotation>
</semantics>
</math></p>
</td>
<td align="right" nowrap="" style="width: 30%;">
<p class="MTDisplayEquation"> </p>
</td>
</tr>
</table>
<p class="MsoNormal">Remember this arbitrage pnl number excludes fees, which are
an expense to the arbitrageur. Looking at a net price movement over an interval
will also include incidentally lucky noise traders instead of true arbitrageurs.
However, the critical point is that we can see the fundamental symmetry of
arbitrage revenue and an LP's convexity expense. </p>
<p class="MsoNormal"><b>Delta Hedged LP PnL</b></p>
<p class="MsoNormal">The LP's position has a delta, or price risk, that can be
hedged. We can apply this hedge to any frequency we want, where the complexity
of handling more data offsets the benefit of more frequent hedging. Removing
the delta generates a much more efficient estimate of an LP's pnl. </p>
<p class="MsoNormal">The initial LP position is just {ETH, USDC}, so it is long
whatever amount of ETH they deposited. <span style="line-height: 107%;">The LP can just
eyeball his ETH position to determine his hedge amount.</span></p>
<p align="center" class="MsoNormal" style="text-align: center; text-indent: .5in;">Position
= USD<sub>0</sub> + ETH<sub>0</sub>*p<sub>0</sub></p>
<p class="MsoNormal">The delta for an LP position can be confirmed by doing the
math:</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mfrac>
<mrow>
<mi>d</mi><mi>V</mi><mi>a</mi><mi>l</mi><mi>u</mi><msub>
<mi>e</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
</mrow>
<mrow>
<mo>∂</mo><mi>p</mi></mrow>
</mfrac>
<mo>=</mo><mi>d</mi><mi>e</mi><mi>l</mi><mi>t</mi><mi>a</mi><mo>=</mo><mi>Δ</mi><mo>=</mo><mfrac>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi></mrow>
<mrow>
<msqrt>
<mi>p</mi>
</msqrt>
</mrow>
</mfrac>
<mo>=</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaaSaaaeaaca
WGKbGaamOvaiaadggacaWGSbGaamyDaiaadwgadaWgaaWcbaGaamit
aiaadcfaaeqaaaGcbaGaeyOaIyRaamiCaaaacqGH9aqpcaWGKbGaam
yzaiaadYgacaWG0bGaamyyaiabg2da9iabfs5aejabg2da9maalaaa
baGaamiBaiaadMgacaWGXbaabaWaaOaaaeaacaWGWbaaleqaaaaaki
abg2da9iaadweacaWGubGaamisamaaBaaaleaacaWGmbGaamiuaaqa
baaaaa@521E@
</annotation>
</semantics>
</math><span style="line-height: 107%;"></span></p>
<p class="MsoNormal">If we look at the change in the hedged LP position over time
and assume we are looking at the change in ETH and USD without fees, we see it
goes back to eq(1), the value of the net token change:</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>n</mi><mi>e</mi><mi>t</mi><mi>L</mi><mi>P</mi><mo>=</mo><mi>L</mi><mi>P</mi><mi>p</mi><mi>o</mi><mi>s</mi><mi>i</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mo>+</mo><mi>h</mi><mi>e</mi><mi>d</mi><mi>g</mi><mi>e</mi>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>n</mi><mi>e</mi><mi>t</mi><mi>L</mi><msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mo>=</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>0</mn>
</msub>
<mo>+</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</mfenced><mo>−</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>0</mn>
</msub>
<mo>=</mo><mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>0</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>n</mi><mi>e</mi><mi>t</mi><mi>L</mi><msub>
<mi>P</mi>
<mn>1</mn>
</msub>
<mo>=</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>1</mn>
</msub>
<mo>+</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</mfenced><mo>−</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>p</mi><mi>n</mi><mi>l</mi><mo>=</mo><mi>L</mi><msub>
<mi>P</mi>
<mn>1</mn>
</msub>
<mo>−</mo><mi>L</mi><msub>
<mi>P</mi>
<mn>0</mn>
</msub>
<mo>=</mo><mfenced close="}" open="{">
<mrow>
<mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>1</mn>
</msub>
<mo>+</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</mfenced><mo>−</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mn>0</mn>
</msub>
<mo>⋅</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>−</mo><mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mn>0</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>p</mi><mi>n</mi><mi>l</mi><mo>=</mo><mi>Δ</mi><mi>U</mi><mi>S</mi><mi>D</mi><mo>+</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><mi>Δ</mi><mi>E</mi><mi>T</mi><mi>H</mi>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGUb
GaamyzaiaadshacaWGmbGaamiuaiabg2da9iaadYeacaWGqbGaamiC
aiaad+gacaWGZbGaamyAaiaadshacaWGPbGaam4Baiaad6gacqGHRa
WkcaWGObGaamyzaiaadsgacaWGNbGaamyzaaqaaiaad6gacaWGLbGa
amiDaiaadYeacaWGqbWaaSbaaSqaaiaaicdaaeqaaOGaeyypa0Zaai
WaaeaacaWGvbGaam4uaiaadseadaWgaaWcbaGaaGimaaqabaGccqGH
RaWkcaWGfbGaamivaiaadIeadaWgaaWcbaGaaGimaaqabaGccqGHfl
Y1caWGWbWaaSbaaSqaaiaaicdaaeqaaaGccaGL7bGaayzFaaGaeyOe
I0IaamyraiaadsfacaWGibWaaSbaaSqaaiaaicdaaeqaaOGaeyyXIC
TaamiCamaaBaaaleaacaaIWaaabeaakiabg2da9iaadwfacaWGtbGa
amiramaaBaaaleaacaaIWaaabeaaaOqaaiaad6gacaWGLbGaamiDai
aadYeacaWGqbWaaSbaaSqaaiaaigdaaeqaaOGaeyypa0ZaaiWaaeaa
caWGvbGaam4uaiaadseadaWgaaWcbaGaaGymaaqabaGccqGHRaWkca
WGfbGaamivaiaadIeadaWgaaWcbaGaaGymaaqabaGccqGHflY1caWG
WbWaaSbaaSqaaiaaigdaaeqaaaGccaGL7bGaayzFaaGaeyOeI0Iaam
yraiaadsfacaWGibWaaSbaaSqaaiaaicdaaeqaaOGaeyyXICTaamiC
amaaBaaaleaacaaIXaaabeaaaOqaaiaadchacaWGUbGaamiBaiabg2
da9iaadYeacaWGqbWaaSbaaSqaaiaaigdaaeqaaOGaeyOeI0Iaamit
aiaadcfadaWgaaWcbaGaaGimaaqabaGccqGH9aqpdaGadaqaaiaadw
facaWGtbGaamiramaaBaaaleaacaaIXaaabeaakiabgUcaRiaadwea
caWGubGaamisamaaBaaaleaacaaIXaaabeaakiabgwSixlaadchada
WgaaWcbaGaaGymaaqabaaakiaawUhacaGL9baacqGHsislcaWGfbGa
amivaiaadIeadaWgaaWcbaGaaGimaaqabaGccqGHflY1caWGWbWaaS
baaSqaaiaaigdaaeqaaOGaeyOeI0IaamyvaiaadofacaWGebWaaSba
aSqaaiaaicdaaeqaaaGcbaGaamiCaiaad6gacaWGSbGaeyypa0Jaeu
iLdqKaamyvaiaadofacaWGebGaey4kaSIaamiCamaaBaaaleaacaaI
XaaabeaakiabgwSixlabfs5aejaadweacaWGubGaamisaaaaaa@BF35@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">Given this result, we can use the logic above to show that
this is equivalent to the square of square roots formula. Thus, comparing an
initial token position to an initial token position is the same as the net pnl
for an LP position hedged at some earlier token position. It is a different way
to think about impermanent loss.</p>
<p class="MsoNormal"><b>Theta</b></p>
<p class="MsoNormal">Finally, the Black-Scholes approach uses theta, which equals
the expected loss from convexity in equilibrium (profits = 0). In their proof,
they create a riskless portfolio of an option and a synthetically replicated
inverse of that option via a dynamic hedging strategy that targets the delta. Negative
convexity generates an adverse delta change in the option, whether the price
goes up or down, which generates losses for the hedged seller. If one rehedges
frequently, the losses will be smaller, but there will be more of them, and on
average, they generate the same expected return whether one rehedges daily or
every second. A convex position's theta equals the position's gamma, or second
derivative, times the underlying asset's variance, divided by 2. </p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>t</mi><mi>h</mi><mi>e</mi><mi>t</mi><mi>a</mi><mo>=</mo><mo>−</mo><mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
<mi>g</mi><mi>a</mi><mi>m</mi><mi>m</mi><mi>a</mi><mo>⋅</mo><mi>v</mi><mi>a</mi><mi>r</mi><mi>i</mi><mi>a</mi><mi>n</mi><mi>c</mi><mi>e</mi></mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamiDaiaadI
gacaWGLbGaamiDaiaadggacqGH9aqpcqGHsisldaWcaaqaaiaaigda
aeaacaaIYaaaaiaadEgacaWGHbGaamyBaiaad2gacaWGHbGaeyyXIC
TaamODaiaadggacaWGYbGaamyAaiaadggacaWGUbGaam4yaiaadwga
aaa@4C76@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">Here, the variance is scaled to whatever one's frequency is.
For example, with daily data, one would take the annual variance divided by 365.
Variance is linear in time, which is why people trade variance swaps and not
volatility swaps. Fortunately, calculating gamma for AMMs from its primitive is
simple, so it leads to the following:</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable columnalign="left">
<mtr>
<mtd>
<mi>L</mi><mi>P</mi><mi>v</mi><mi>a</mi><mi>l</mi><mi>u</mi><msub>
<mi>e</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
<mo>=</mo><mn>2</mn><mo>⋅</mo><mi>l</mi><mi>i</mi><mi>q</mi><mi>u</mi><mi>i</mi><mi>d</mi><mi>i</mi><mi>t</mi><mi>y</mi><mo>⋅</mo><msqrt>
<mi>p</mi>
</msqrt>
</mtd>
</mtr>
<mtr>
<mtd>
<mfrac>
<mrow>
<mi>d</mi><mi>L</mi><mi>P</mi><mi>v</mi><mi>a</mi><mi>l</mi><mi>u</mi><msub>
<mi>e</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
</mrow>
<mrow>
<mo>∂</mo><mi>p</mi></mrow>
</mfrac>
<mo>=</mo><mi>d</mi><mi>e</mi><mi>l</mi><mi>t</mi><mi>a</mi><mo>=</mo><mi>Δ</mi><mo>=</mo><mfrac>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi></mrow>
<mrow>
<msqrt>
<mi>p</mi>
</msqrt>
</mrow>
</mfrac>
<mo>=</mo><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mfrac>
<mrow>
<msup>
<mi>d</mi>
<mn>2</mn>
</msup>
<mi>L</mi><mi>P</mi><mi>v</mi><mi>a</mi><mi>l</mi><mi>u</mi><msub>
<mi>e</mi>
<mrow>
<mi>L</mi><mi>P</mi></mrow>
</msub>
</mrow>
<mrow>
<mo>∂</mo><msup>
<mi>p</mi>
<mn>2</mn>
</msup>
</mrow>
</mfrac>
<mo>=</mo><mi>g</mi><mi>a</mi><mi>m</mi><mi>m</mi><mi>a</mi><mo>=</mo><mi>Γ</mi><mo>=</mo><mo>−</mo><mfrac>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi></mrow>
<mrow>
<mn>2</mn><mo>⋅</mo><msup>
<mi>p</mi>
<mrow>
<mn>1.5</mn></mrow>
</msup>
</mrow>
</mfrac>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>t</mi><mi>h</mi><mi>e</mi><mi>t</mi><mi>a</mi><mo>=</mo><mo>−</mo><mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
<mi>g</mi><mi>a</mi><mi>m</mi><mi>m</mi><mi>a</mi><mo>⋅</mo><mi>v</mi><mi>a</mi><mi>r</mi><mi>i</mi><mi>a</mi><mi>n</mi><mi>c</mi><mi>e</mi><mo>=</mo><mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
<mo>⋅</mo><mfenced>
<mrow>
<mfrac>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi></mrow>
<mrow>
<mn>2</mn><mo>⋅</mo><msup>
<mi>p</mi>
<mrow>
<mn>1.5</mn></mrow>
</msup>
</mrow>
</mfrac>
</mrow>
</mfenced><mo>⋅</mo><mfenced>
<mrow>
<msup>
<mi>p</mi>
<mn>2</mn>
</msup>
<mo>⋅</mo><msup>
<mi>σ</mi>
<mn>2</mn>
</msup>
</mrow>
</mfenced>
</mtd>
</mtr>
</mtable>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGmb
GaamiuaiaadAhacaWGHbGaamiBaiaadwhacaWGLbWaaSbaaSqaaiaa
dYeacaWGqbaabeaakiabg2da9iaaikdacqGHflY1caWGSbGaamyAai
aadghacaWG1bGaamyAaiaadsgacaWGPbGaamiDaiaadMhacqGHflY1
daGcaaqaaiaadchaaSqabaaakeaadaWcaaqaaiaadsgacaWGmbGaam
iuaiaadAhacaWGHbGaamiBaiaadwhacaWGLbWaaSbaaSqaaiaadYea
caWGqbaabeaaaOqaaiabgkGi2kaadchaaaGaeyypa0Jaamizaiaadw
gacaWGSbGaamiDaiaadggacqGH9aqpcqqHuoarcqGH9aqpdaWcaaqa
aiaadYgacaWGPbGaamyCaaqaamaakaaabaGaamiCaaWcbeaaaaGccq
GH9aqpcaWGfbGaamivaiaadIeadaWgaaWcbaGaamitaiaadcfaaeqa
aaGcbaWaaSaaaeaacaWGKbWaaWbaaSqabeaacaaIYaaaaOGaamitai
aadcfacaWG2bGaamyyaiaadYgacaWG1bGaamyzamaaBaaaleaacaWG
mbGaamiuaaqabaaakeaacqGHciITcaWGWbWaaWbaaSqabeaacaaIYa
aaaaaakiabg2da9iaadEgacaWGHbGaamyBaiaad2gacaWGHbGaeyyp
a0Jaeu4KdCKaeyypa0JaeyOeI0YaaSaaaeaacaWGSbGaamyAaiaadg
haaeaacaaIYaGaeyyXICTaamiCamaaCaaaleqabaGaaGymaiaac6ca
caaI1aaaaaaaaOqaaiaadshacaWGObGaamyzaiaadshacaWGHbGaey
ypa0JaeyOeI0YaaSaaaeaacaaIXaaabaGaaGOmaaaacaWGNbGaamyy
aiaad2gacaWGTbGaamyyaiabgwSixlaadAhacaWGHbGaamOCaiaadM
gacaWGHbGaamOBaiaadogacaWGLbGaeyypa0ZaaSaaaeaacaaIXaaa
baGaaGOmaaaacqGHflY1daqadaqaamaalaaabaGaamiBaiaadMgaca
WGXbaabaGaaGOmaiabgwSixlaadchadaahaaWcbeqaaiaaigdacaGG
UaGaaGynaaaaaaaakiaawIcacaGLPaaacqGHflY1daqadaqaaiaadc
hadaahaaWcbeqaaiaaikdaaaGccqGHflY1cqaHdpWCdaahaaWcbeqa
aiaaikdaaaaakiaawIcacaGLPaaaaaaa@BDC0@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">Simplifying,
we get a function that uses a variance term:</p>
<p align="center" class="MTDisplayEquation" style="text-align: center;">Equation (3) -variance
over 4: <math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>t</mi><mi>h</mi><mi>e</mi><mi>t</mi><mi>a</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msqrt>
<mi>p</mi>
</msqrt>
<mo>⋅</mo><msup>
<mi>σ</mi>
<mn>2</mn>
</msup>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamiDaiaadI
gacaWGLbGaamiDaiaadggacqGH9aqpcaWGSbGaamyAaiaadghacqGH
flY1daWcaaqaamaakaaabaGaamiCaaWcbeaakiabgwSixlabeo8aZn
aaCaaaleqabaGaaGOmaaaaaOqaaiaaisdaaaaaaa@47B2@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">While
AMMs, unlike option markets, do not have theta <i>per se</i> as there is no
option premium to decay, it still captures the option cost for any short gamma
position. This cost is a function of convexity, not the delta, so it presumes
the position is delta-hedged. </p>
<p class="MsoNormal">The LvR
function is identical to equation 3, though it looks different because the
pool's market value is used to normalize it:</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mfrac>
<mrow>
<mi>t</mi><mi>h</mi><mi>e</mi><mi>t</mi><mi>a</mi></mrow>
<mrow>
<mi>L</mi><mi>P</mi><mi>v</mi><mi>a</mi><mi>l</mi><mi>u</mi><mi>e</mi></mrow>
</mfrac>
<mo>=</mo><mo>−</mo><mfrac>
<mrow>
<msup>
<mi>σ</mi>
<mn>2</mn>
</msup>
</mrow>
<mn>8</mn>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaWaaSaaaeaaca
WG0bGaamiAaiaadwgacaWG0bGaamyyaaqaaiaadYeacaWGqbGaamOD
aiaadggacaWGSbGaamyDaiaadwgaaaGaeyypa0JaeyOeI0YaaSaaae
aacqaHdpWCdaahaaWcbeqaaiaaikdaaaaakeaacaaI4aaaaaaa@468C@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">This is
a handy formula, as volatility per day for many coins is 5%; it generates a
cost 3.125 basis points per day, a fun fact. In practice, however, we need to
get the liquidity and price data anyway to get the market value we would apply
this to anyway. Given the LP market value function</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>L</mi><mi>P</mi><mi>v</mi><mi>a</mi><mi>l</mi><mi>u</mi><mi>e</mi><mo>=</mo><mn>2</mn><mo>⋅</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><msqrt>
<mi>p</mi>
</msqrt>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamitaiaadc
facaWG2bGaamyyaiaadYgacaWG1bGaamyzaiabg2da9iaaikdacqGH
flY1caWGSbGaamyAaiaadghacqGHflY1daGcaaqaaiaadchaaSqaba
aaaa@468D@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">If we
multiply variance/8 by the LP value, we get equation (3), the variance function
for the LP's convexity cost. </p>
<p class="MsoNormal">Unfortunately,
my math/stats skills are insufficient to prove equations 2 and 3 are the same,
but they are (or at least 99% approximations of each other). </p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
<mo>≈</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>⋅</mo><msup>
<mi>σ</mi>
<mn>2</mn>
</msup>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamiBaiaadM
gacaWGXbGaeyyXIC9aaSaaaeaadaqadaqaamaakaaabaGaamiCamaa
BaaaleaacaaIXaaabeaaaeqaaOGaeyOeI0YaaOaaaeaacaWGWbWaaS
baaSqaaiaaicdaaeqaaaqabaaakiaawIcacaGLPaaadaahaaWcbeqa
aiaaikdaaaaakeaadaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqaba
aabeaaaaGccqGHijYUcaWGSbGaamyAaiaadghacqGHflY1daWcaaqa
amaakaaabaGaamiCamaaBaaaleaacaaIWaaabeaaaeqaaOGaeyyXIC
Taeq4Wdm3aaWbaaSqabeaacaaIYaaaaaGcbaGaaGinaaaaaaa@5301@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">This gives us three ways to calculate IL. If we use the same
starting and ending times, they should be the same. That is, the variance term
should use the variance in the [0,1] interval, and the <span class="MPEntity">Δ</span>ETH and <span class="MPEntity">Δ</span>USDC
should also use the [0, 1] interval.</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>n</mi><mi>e</mi><mi>t</mi><mtext> </mtext><mi>t</mi><mi>o</mi><mi>k</mi><mi>e</mi><mi>n</mi><mtext> </mtext><mi>c</mi><mi>h</mi><mi>a</mi><mi>n</mi><mi>g</mi><mi>e</mi><mo>:</mo><mi>Δ</mi><mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
</msub>
<mo>+</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><mi>Δ</mi><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
</msub>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOBaiaadw
gacaWG0bGaaeiiaiaadshacaWGVbGaam4AaiaadwgacaWGUbGaaeii
aiaadogacaWGObGaamyyaiaad6gacaWGNbGaamyzaiaacQdacqqHuo
arcaWGvbGaam4uaiaadseadaWgaaWcbaGaaGimaiaacYcacaaIXaaa
beaakiabgUcaRiaadchadaWgaaWcbaGaaGymaaqabaGccqGHflY1cq
qHuoarcaWGfbGaamivaiaadIeadaWgaaWcbaGaaGimaiaacYcacaaI
Xaaabeaaaaa@5683@
</annotation>
</semantics>
</math></p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>s</mi><mi>q</mi><mi>u</mi><mi>a</mi><mi>r</mi><mi>e</mi><mtext> </mtext><mi>o</mi><mi>f</mi><mtext> </mtext><mi>s</mi><mi>q</mi><mi>u</mi><mi>a</mi><mi>r</mi><mi>e</mi><mtext> </mtext><mi>r</mi><mi>o</mi><mi>o</mi><mi>t</mi><mo>:</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaam4Caiaadg
hacaWG1bGaamyyaiaadkhacaWGLbGaaeiiaiaad+gacaWGMbGaaeii
aiaadohacaWGXbGaamyDaiaadggacaWGYbGaamyzaiaabccacaWGYb
Gaam4Baiaad+gacaWG0bGaaiOoaiaadYgacaWGPbGaamyCaiabgwSi
xpaalaaabaWaaeWaaeaadaGcaaqaaiaadchadaWgaaWcbaGaaGymaa
qabaaabeaakiabgkHiTmaakaaabaGaamiCamaaBaaaleaacaaIWaaa
beaaaeqaaaGccaGLOaGaayzkaaWaaWbaaSqabeaacaaIYaaaaaGcba
WaaOaaaeaacaWGWbWaaSbaaSqaaiaaicdaaeqaaaqabaaaaaaa@5820@
</annotation>
</semantics>
</math></p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>v</mi><mi>a</mi><mi>r</mi><mi>i</mi><mi>a</mi><mi>n</mi><mi>c</mi><mi>e</mi><mtext> </mtext><mi>o</mi><mi>v</mi><mi>e</mi><mi>r</mi><mtext> </mtext><mn>4</mn><mo>:</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>⋅</mo><msubsup>
<mi>σ</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
<mn>2</mn>
</msubsup>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamODaiaadg
gacaWGYbGaamyAaiaadggacaWGUbGaam4yaiaadwgacaqGGaGaam4B
aiaadAhacaWGLbGaamOCaiaabccacaaI0aGaaiOoaiaadYgacaWGPb
GaamyCaiabgwSixpaalaaabaWaaOaaaeaacaWGWbWaaSbaaSqaaiaa
icdaaeqaaaqabaGccqGHflY1cqaHdpWCdaqhaaWcbaGaaGimaiaacY
cacaaIXaaabaGaaGOmaaaaaOqaaiaaisdaaaaaaa@5300@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">These are all costs to the LP and need to be subtracted from
the LP fees to get the LP's total profitability. However, in practice, the net
token change data from Uniswap's 'swap' event logs includes fees, so one does
not need the daily volume to generate the net LP pnl; removing the fees would
take more work. Thus, we do not need to add fee revenue if we use the swap data
to get the LP's net token changes.</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>n</mi><mi>e</mi><mi>t</mi><mtext> </mtext><mi>t</mi><mi>o</mi><mi>k</mi><mi>e</mi><mi>n</mi><mtext> </mtext><mi>c</mi><mi>h</mi><mi>a</mi><mi>n</mi><mi>g</mi><mi>e</mi><mtext> </mtext><mi>P</mi><mi>n</mi><mi>L</mi><mo>:</mo><mi>Δ</mi><mi>U</mi><mi>S</mi><msub>
<mi>D</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
</msub>
<mo>+</mo><msub>
<mi>p</mi>
<mn>1</mn>
</msub>
<mo>⋅</mo><mi>Δ</mi><mi>E</mi><mi>T</mi><msub>
<mi>H</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
</msub>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOBaiaadw
gacaWG0bGaaeiiaiaadshacaWGVbGaam4AaiaadwgacaWGUbGaaeii
aiaadogacaWGObGaamyyaiaad6gacaWGNbGaamyzaiaabccacaWGqb
GaamOBaiaadYeacaGG6aGaeuiLdqKaamyvaiaadofacaWGebWaaSba
aSqaaiaaicdacaGGSaGaaGymaaqabaGccqGHRaWkcaWGWbWaaSbaaS
qaaiaaigdaaeqaaOGaeyyXICTaeuiLdqKaamyraiaadsfacaWGibWa
aSbaaSqaaiaaicdacaGGSaGaaGymaaqabaaaaa@59BF@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">For the other approaches, we can multiply the absolute value
of the USDC traded by the fees to get LP revenue. While the fees are paid in
whatever token is sold to the pool, using the numeraire is an efficient
approximation.</p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>s</mi><mi>q</mi><mi>u</mi><mi>a</mi><mi>r</mi><mi>e</mi><mtext> </mtext><mi>o</mi><mi>f</mi><mtext> </mtext><mi>s</mi><mi>q</mi><mi>u</mi><mi>a</mi><mi>r</mi><mi>e</mi><mtext> </mtext><mi>r</mi><mi>o</mi><mi>o</mi><mi>t</mi><mtext> </mtext><mi>P</mi><mi>n</mi><mi>L</mi><mo>:</mo><mi>U</mi><mi>S</mi><mi>D</mi><mi>C</mi><mi>v</mi><mi>o</mi><mi>l</mi><mi>u</mi><mi>m</mi><mi>e</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>d</mi><mi>e</mi><mi>d</mi><mo>⋅</mo><mi>f</mi><mi>e</mi><mi>e</mi><mo>−</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaam4Caiaadg
hacaWG1bGaamyyaiaadkhacaWGLbGaaeiiaiaad+gacaWGMbGaaeii
aiaadohacaWGXbGaamyDaiaadggacaWGYbGaamyzaiaabccacaWGYb
Gaam4Baiaad+gacaWG0bGaaeiiaiaadcfacaWGUbGaamitaiaacQda
caWGvbGaam4uaiaadseacaWGdbGaamODaiaad+gacaWGSbGaamyDai
aad2gacaWGLbGaamiDaiaadkhacaWGHbGaamizaiaadwgacaWGKbGa
eyyXICTaamOzaiaadwgacaWGLbGaeyOeI0IaamiBaiaadMgacaWGXb
GaeyyXIC9aaSaaaeaadaqadaqaamaakaaabaGaamiCamaaBaaaleaa
caaIXaaabeaaaeqaaOGaeyOeI0YaaOaaaeaacaWGWbWaaSbaaSqaai
aaicdaaeqaaaqabaaakiaawIcacaGLPaaadaahaaWcbeqaaiaaikda
aaaakeaadaGcaaqaaiaadchadaWgaaWcbaGaaGimaaqabaaabeaaaa
aaaa@6FDD@
</annotation>
</semantics>
</math></p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>v</mi><mi>a</mi><mi>r</mi><mi>i</mi><mi>a</mi><mi>n</mi><mi>c</mi><mi>e</mi><mtext> </mtext><mi>o</mi><mi>v</mi><mi>e</mi><mi>r</mi><mtext> </mtext><mn>4</mn><mtext> </mtext><mi>P</mi><mi>n</mi><mi>L</mi><mo>:</mo><mi>U</mi><mi>S</mi><mi>D</mi><mi>C</mi><mi>v</mi><mi>o</mi><mi>l</mi><mi>u</mi><mi>m</mi><mi>e</mi><mi>t</mi><mi>r</mi><mi>a</mi><mi>d</mi><mi>e</mi><mi>d</mi><mo>⋅</mo><mi>f</mi><mi>e</mi><mi>e</mi><mo>−</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
<mo>⋅</mo><msubsup>
<mi>σ</mi>
<mrow>
<mn>0</mn><mo>,</mo><mn>1</mn></mrow>
<mn>2</mn>
</msubsup>
</mrow>
<mn>4</mn>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamODaiaadg
gacaWGYbGaamyAaiaadggacaWGUbGaam4yaiaadwgacaqGGaGaam4B
aiaadAhacaWGLbGaamOCaiaabccacaaI0aGaaeiiaiaadcfacaWGUb
GaamitaiaacQdacaWGvbGaam4uaiaadseacaWGdbGaamODaiaad+ga
caWGSbGaamyDaiaad2gacaWGLbGaamiDaiaadkhacaWGHbGaamizai
aadwgacaWGKbGaeyyXICTaamOzaiaadwgacaWGLbGaeyOeI0IaamiB
aiaadMgacaWGXbGaeyyXIC9aaSaaaeaadaGcaaqaaiaadchadaWgaa
WcbaGaaGimaaqabaaabeaakiabgwSixlabeo8aZnaaDaaaleaacaaI
WaGaaiilaiaaigdaaeaacaaIYaaaaaGcbaGaaGinaaaaaaa@6ABD@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">The nice thing about the net token change approach is that
you can avoid the noise generated by the fact that liquidity is not constant,
especially in restricted-range pools, where it can vary quite a bit over the
day. Unless you calculate these data using each trade, any liquidity number you
use will be approximate and generate noise in one's estimate. Thus, I prefer
the net token change approach.</p>
<p class="MsoNormal">I estimated the daily pnl for a pool and used the day's
price return squared for the variance number. </p>
<p align="center" class="MsoNormal" style="margin-bottom: 0in; text-align: center;"><b>Uniswap
ETH-USDC v2 pool on Ethereum Mainnet</b></p>
<p align="center" class="MsoNormal" style="text-align: center;"><b>1/1/23-3/5/24</b></p>
<p align="center" class="MsoNormal" style="margin-bottom: 0in; text-align: center;">Net token change pnl: $7,231</p>
<p align="center" class="MsoNormal" style="margin-bottom: 0in; text-align: center;">Square root pnl:
$7,152</p>
<p align="center" class="MsoNormal" style="text-align: center;">Variance
pnl: $7,097</p>
<p class="MsoNormal">As the standard deviation in this period was $12k, these
estimates are in complete agreement. The correlation between the square root
and variance metrics is 99.9%, while the token change pnl correlation with
those two is around 99.6%</p>
<p class="MsoNormal"><b>Impermanent Loss != LvR ?</b></p>
<p class="MsoNormal">For reasons I find irrelevant, <a href="https://arxiv.org/abs/2208.06046">Milionis, Moallemi, Roughgarden, and
Zhang</a> emphasize their LvR approach (the variance function) as superior to
the square root function. First, they note that IL depends on the initial
position, as it uses a squared term, so the magnitude is different for given
starting prices. </p>
<p align="center" class="MsoNormal" style="text-align: center;"><math style="background-color: #;" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>I</mi><mi>m</mi><mi>p</mi><mi>e</mi><mi>r</mi><mi>m</mi><mi>a</mi><mi>n</mi><mi>e</mi><mi>n</mi><mi>t</mi><mtext> </mtext><mi>L</mi><mi>o</mi><mi>s</mi><mi>s</mi><mo>=</mo><mi>l</mi><mi>i</mi><mi>q</mi><mo>⋅</mo><mfrac>
<mrow>
<msup>
<mrow>
<mfenced>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>1</mn>
</msub>
</mrow>
</msqrt>
<mo>−</mo><msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfenced></mrow>
<mn>2</mn>
</msup>
</mrow>
<mrow>
<msqrt>
<mrow>
<msub>
<mi>p</mi>
<mn>0</mn>
</msub>
</mrow>
</msqrt>
</mrow>
</mfrac>
</mrow>
<annotation encoding="MathType-MTEF">MathType@MTEF@5@5@+=
feaahCart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamysaiaad2
gacaWGWbGaamyzaiaadkhacaWGTbGaamyyaiaad6gacaWGLbGaamOB
aiaadshacaqGGaGaamitaiaad+gacaWGZbGaam4Caiabg2da9iaadY
gacaWGPbGaamyCaiabgwSixpaalaaabaWaaeWaaeaadaGcaaqaaiaa
dchadaWgaaWcbaGaaGymaaqabaaabeaakiabgkHiTmaakaaabaGaam
iCamaaBaaaleaacaaIWaaabeaaaeqaaaGccaGLOaGaayzkaaWaaWba
aSqabeaacaaIYaaaaaGcbaWaaOaaaeaacaWGWbWaaSbaaSqaaiaaic
daaeqaaaqabaaaaaaa@53F9@
</annotation>
</semantics>
</math></p>
<p class="MsoNormal">This is like saying the return on a stock that moved from
100 to 150 is different for someone who bought it at 50 and someone who bought
it at 100: one made 100%, the other only 50% over that price increase. In
practice, we apply consistent starting prices for the collective of those long
and short, or all the LPs, which is intuitive and straightforward. It is like
assuming they delta hedge once each period.</p>
<p class="MsoNormal">Another concern is that the square root function is noisier.
Yet, one can apply any of these formulas at whatever frequency you want: by minute, hour, day. Using hourly data is a lot more work with negligible benefit. The
errors generated will be normally distributed and diversify away in the same
way regardless of one's approach. If you use daily data to generate variance or
generate your square of square roots, you lose the information from the intra-period
price spike, but when you have hundreds of daily observations, the benefits of greater
granularity are trivial. </p>
<p class="MsoNormal">What you call the LP's convexity cost does not matter. What
matters is you use something close to daily data intervals and eliminate the LP's
delta risk, as all the above metrics do. </p>
</div>
</body>
</html>
Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-27811965774497947652024-03-07T16:40:00.002-06:002024-03-08T13:26:28.842-06:00LP Profitability on Long-Tail Pools<p><span style="font-family: verdana;">The crypto bull market is back, best exemplified by
worthless meme coins PEPE and Shiba rising to market caps of $3B and $21B,
respectively. These types of coins have lottery-like payoffs, making them
enticing buys when crypto bros are flush with 'house money.' They could also highlight a worst-case scenario for liquidity providers (LPs), who are short volatility.</span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsx675kSiSKp-dkMH36-ygi4pZYl17B7bV1E4L4o2yP0bE5yTobJvdKqisREbRCCTqLCWLqFIpQoBwF-qqGjTpRomdfsg8R03AeMmeZ__7v9g7dkKCpcxubKPHvAMTcgTvwfPK0LDbolCtRo9OWqLM2BoQxFnZhNKNY2IxHdGk27nHjwDyfyCCtg/s645/shibaPepeChart.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="452" data-original-width="645" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsx675kSiSKp-dkMH36-ygi4pZYl17B7bV1E4L4o2yP0bE5yTobJvdKqisREbRCCTqLCWLqFIpQoBwF-qqGjTpRomdfsg8R03AeMmeZ__7v9g7dkKCpcxubKPHvAMTcgTvwfPK0LDbolCtRo9OWqLM2BoQxFnZhNKNY2IxHdGk27nHjwDyfyCCtg/s320/shibaPepeChart.png" width="320" /></a></div>
<p class="MsoNormal"><span style="font-family: verdana;">This is another example of the positive volatility/return
correlation unique to crypto. In standard asset classes, higher volatility is
correlated with negative returns, which is why a long volatility position has a
negative beta in equity markets, and loses money on average (e.g., see VXX
etf). An LP to a standard automated market maker (AMM) is
short volatility, in that their best case scenario, the price stays put. LPs generally lose money when a token rises 50% in a single day. </span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Here are the LP profits for 2 prominent and 4 lower-tier Uniswap v3 pools (mainchain) and the latest Total Locked Value. Pepe is the most profitable pool. However, it has only $5MM in TVL. The Chainlink-ETH pool has been unprofitable for the past year, and Matic and Shiba pools might have become unprofitable, given their performance over the past five months. As per the big price spike, Shiba lost a bundle, while Pepe has had a good month so far. On average, higher volatility does seem to hurt LPs, but not necessarily.</span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Average Daily USD LP Profitability </b></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9haWDyyTUqpdWyEZtV2kWu_cbWUiKq092Lk_g7niLN7JktCEAiV4ZKtPQwZOJGwl58KatrWbu_TJiTvFd5zkHI16Y3NYzY4xOM81wmQ_2CbewhzvF_BDZxUusburAlltg4ty-m6wd1dAcs1W8nJtfyfcVFB-DDMdR_w4HMRJwSnWJcWYBeswVQ/s519/pnlMonthavgDay.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="343" data-original-width="519" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9haWDyyTUqpdWyEZtV2kWu_cbWUiKq092Lk_g7niLN7JktCEAiV4ZKtPQwZOJGwl58KatrWbu_TJiTvFd5zkHI16Y3NYzY4xOM81wmQ_2CbewhzvF_BDZxUusburAlltg4ty-m6wd1dAcs1W8nJtfyfcVFB-DDMdR_w4HMRJwSnWJcWYBeswVQ/w481-h317/pnlMonthavgDay.png" width="481" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>
<span style="font-family: verdana; text-align: left;">The profitability applies to the LP collective, assuming
they hedged their LP positions once a day. To see how this was calculated, take
as an example the pool inflows for the PEPE pool on March 4, when Shiba rose 53% (Pepe and Shiba prices are
hard to read because they have so many zeros between the decimal and the first
natural number, but it's actually a smart move because I've seen several people
post about how much money they would make if the price moved up to merely one
penny):</span>
<p class="MsoNormal" style="text-align: center;"><o:p><span style="font-family: verdana;"><b> LP PnL Calculation Example</b></span></o:p></p><p class="MsoNormal"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCHxFWDvsJX5h38EFMjNiJjitmyReNy78NOlGozVNNzKTj_frAHL4sXCrBYILx4klYx1dcH_vQcTpWpV2PkJckBy-9TRSw0qx9IIO_DZ-eRmO8ca9mnve5swsAfo22dEMWZHEJB1_RUuTLNZHWX5JBT_WrzGZjSW0Hib_wS0puCrrB-jTSXwjyZQ/s187/pnlMar4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="182" data-original-width="187" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCHxFWDvsJX5h38EFMjNiJjitmyReNy78NOlGozVNNzKTj_frAHL4sXCrBYILx4klYx1dcH_vQcTpWpV2PkJckBy-9TRSw0qx9IIO_DZ-eRmO8ca9mnve5swsAfo22dEMWZHEJB1_RUuTLNZHWX5JBT_WrzGZjSW0Hib_wS0puCrrB-jTSXwjyZQ/s1600/pnlMar4.png" width="187" /></a></div><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div>
<p class="MsoNormal"><span style="font-family: verdana;">This profitability analysis looks at the total amount of
Shiba and ETH going into and out of the pool. When examined daily, it is
equivalent to assuming LPs hedge once a day. The nice thing about this is that
you do not need the 'liquidity' number or look at LP mints and burns to calculate LP profitability. The net inflows include fees, creating an 'all-in' profitability metric for a hedged LP. On this day, the LPs took in $1.04MM worth of
ETH and sent out $1.25MM worth of Pepe tokens for a net loss of $214k. </span></p><p class="MsoNormal"><span style="font-family: verdana;">The smaller pairs do seem profitable, unlike the major pair pools. If we try to identify the characteristics of profitable LP pools, one might think volume is key. Yet, looking at the volume data below, we see Pepe has a relatively high volume, and the LPs in the Pepe-ETH pool have done well, unlike the other popular pools. Volume rose significantly in the Link pool, but this coincides with its move to unprofitability. </span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Average USD (thousands) Daily Volume</b></span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgXi73KD0jTP3LYHK2p9l203RAxJ4uiAf_ZXwtMQ3p9u7hXHzRpkjxoIxv0q_FSpAD6wyTrkna-0PtMqIxhzEsV7yCT7uwMwLwfAaaZM32fMCHTSg8HkSzJdd-J1FZFpp-jLj8vtzaDti3EldgWmbLaGgIxFX1Y5nMY-wOhl9rjIQFZZoW0zZCQg/s519/volumeTable.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="519" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgXi73KD0jTP3LYHK2p9l203RAxJ4uiAf_ZXwtMQ3p9u7hXHzRpkjxoIxv0q_FSpAD6wyTrkna-0PtMqIxhzEsV7yCT7uwMwLwfAaaZM32fMCHTSg8HkSzJdd-J1FZFpp-jLj8vtzaDti3EldgWmbLaGgIxFX1Y5nMY-wOhl9rjIQFZZoW0zZCQg/w429-h267/volumeTable.png" width="429" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><p class="MsoNormal"><span style="font-family: verdana;">The data on trades per day is also ambiguous. Below, we see that the high-fee USDC-ETH pool trades less than the Pepe pool, and the money-losing BTC-ETH pool trades less than the Matic-ETH pool.</span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Average Trades per Day by Month</b></span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJGKyRomXnxV3Az3qaaKnmnCMBrEi6RjeJzP8GJGPl5IuQx0IlJEv71xSOWouhDEOOughL_y08FRc261Lp0phPCgv2fm9hDZS-7an3JLAvXAZFzZYyV748Gq_LBAWhCHZsPvh4cgyeEin3csfJjQpqugb4Vs8xfy-dB9DNf1qKaTZr-ZGr1Zagig/s519/countByMonth.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="519" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJGKyRomXnxV3Az3qaaKnmnCMBrEi6RjeJzP8GJGPl5IuQx0IlJEv71xSOWouhDEOOughL_y08FRc261Lp0phPCgv2fm9hDZS-7an3JLAvXAZFzZYyV748Gq_LBAWhCHZsPvh4cgyeEin3csfJjQpqugb4Vs8xfy-dB9DNf1qKaTZr-ZGr1Zagig/w474-h295/countByMonth.png" width="474" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><p class="MsoNormal"><span style="font-family: verdana;">Profitable capital-efficient AMM pools are not exactly unicorns, but they aren't rats either (mooses?). A lot of development is aimed at better user interfaces and connections to other AMMs (composability), but these will not address the LP unprofitability problem. In the long run, we cannot assume people will want to provide liquidity if they lose money. Airdrop rewards are not a sustainable strategy. </span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Development proceeds as if current AMMs are profitable, as there is no reason to restate and amplify an asset that loses money. The key to this thinking is that these LP convexity costs do not really exist. Some think it
compares to an unrealizable ideal, the perfectly hedged position (see <a href="https://twitter.com/llamaonthebrink/status/1764510825677574395">here</a>). </span><span style="font-family: verdana;">The standard way to present the abstruse convexity cost is
to compare the LP's position with his initial position. Applying this to daily
data is like assuming the LP hedges his position once a day. It is not an impossible
benchmark like a frictionless medium, as obviously, the LP owned that position
at inception.</span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Others note that most people they know don't seem to notice (see Guillaume Lambert <a href="https://x.com/guil_lambert/status/1764612454854639632?s=20">here</a>). For example, as in the recent case of Shiba LPs, the cost is forgone profit instead of actual losses
(for LPs that don't hedge). Shiba rose 53% on March 4, generating a loss of $214k, assuming the LP hedged. Is missing an upside really a loss? </span></p><p class="MsoNormal"><span style="font-family: verdana;">Consider if you owned Apple stock and
sold covered calls to generate revenue (option premium paid to you). If
Apple's price doubles, you will not lose money; you will just miss out on capital
gain. If you think that loss is merely hypothetical, remember why someone paid
you for that option, so the buyer thinks it's real money; in cash-settled markets, on expiration, you have to
send the option buyer real money if it expires in the money. The fact that many
people don't consider this expense highlights the ignorance of most people
selling gamma (<a href="https://app.ribbon.finance/">Ribbon finance</a>
presents its options assuming the earnings premium is pure profit,
presented as an APY like a bond yield).</span></p><p class="MsoNormal"><span style="font-family: verdana;">Hopefully, more people will start addressing this fundamental problem. Interestingly, just this morning, several Uniswap researchers <a href="https://arxiv.org/abs/2403.03367" target="_blank">released an academic paper</a> proposing an auction mechanism to 'reduce losses to informed order flow.' They do not state LPs are unprofitable, but it's a step in the right direction (see my take <a href="https://bit.ly/3wLQee9" target="_blank">here</a>). </span></p><p class="MsoNormal"><span style="font-family: verdana;">One point mentioned in that paper noted prior work on dynamic fees to reduce LP losses. Intuitively, this makes sense, generating the best of both worlds: low fees on average and high fees when prices are spiking. However, this fix is unlikely, given the losses for the 5 and 30-basis point fee Uniswap pools targeting the same pairs (see below). Indeed, the average loss on the higher fee pools is greater, highlighting the problem with assuming volume is exogenous. </span></p><p class="MsoNormal"><span style="font-family: verdana;"><br /></span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>LP PnL in Basis Points per ETH Traded</b></span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIg9R8X77c9K_-mvCGiNqRywc9W-c9jDJZRmjkNdsfp30FaBZCr3fs3pEnb_BtCtIQhRaUk7wxc6AvKsV0edatdjeYSVY5bHbhsLtMEVQWzZ82rPJDNnyF32xgtfsgKTJFeLA5Q6mv5DwoF4ZsADTk9BF6Gl8e22S2RhkSF7yjf3LbCHatln82Ow/s784/5vs30bps.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="784" data-original-width="358" height="732" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIg9R8X77c9K_-mvCGiNqRywc9W-c9jDJZRmjkNdsfp30FaBZCr3fs3pEnb_BtCtIQhRaUk7wxc6AvKsV0edatdjeYSVY5bHbhsLtMEVQWzZ82rPJDNnyF32xgtfsgKTJFeLA5Q6mv5DwoF4ZsADTk9BF6Gl8e22S2RhkSF7yjf3LbCHatln82Ow/w334-h732/5vs30bps.png" width="334" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-12572455666052130372024-02-29T18:49:00.006-06:002024-03-01T08:56:53.666-06:00AMM LP Unprofitability: irrationality, volatility premium, or passive trading?<p><span style="font-family: verdana;"> A puzzling aspect of automated market makers (AMMs) is that LPs,
in aggregate, lose money, and no one seems to care. Uniswap is the most
prominent AMM developer here, currently worth $9B. Uniswap's docs page only indirectly addresses LP profitability, pointing to theoretical papers with no data (<a href="https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2">link</a>)
or anecdotal empirical blog posts from 2019 (<a href="https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2">link</a>).</span></p><p class="MsoNormal"><span style="font-family: verdana;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">If you search this topic and look for an empirical analysis,
you generally get a discursive analysis that is not even wrong. For example, <a href="https://arxiv.org/abs/2205.08904">one paper</a> states <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-family: verdana;">Our supporting data analysis of the
risks and returns of real Uniswap V3 liquidity providers underlines that
liquidity providing in Uniswap V3 is
incredibly complicated, and performances can vary wildly"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">This could be said about anything one does not understand. The
most focused prominent empirical study was done in 2021 by <a href="https://arxiv.org/ftp/arxiv/papers/2111/2111.09192.pdf">Topaze Blue</a>,
and even there, the best they could say was that half of LPs lose money, which
is almost meaningless: By count or capital? Were the losses of greater or lesser
magnitude than the profits? Was it only the stupid ones? Invariably, the few empirical investigations out there break the data into a dozen subsamples and present hundreds of points in a scatter plot but no table with a simple "average LP profitability." <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">I have been posting about AMM LP profitability <a href="https://efalken.substack.com/p/uniswap-lps-are-losing-money" target="_blank">since 2022</a>,
and the trend is consistent: major pair LPs lose money.[1]</span></p>
<p class="MsoNormal"><span style="font-family: verdana;">LP profitability is a significant problem. Transformational
technologies like the internet and the automobile experienced consistent
exponential growth for decades, while AMM usage peaked two years after its
introduction and has not recovered. This is related to AMM profitability, which
is not simply a question of fees, as indicated by the comparable loss rates for Uniswap's
30 bp (basis point, 0.3%) pool and its 5 bp pool, and those for TraderJoe's 22 bp pool. LPs in the capital-efficient pools consistently lose money.</span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyqMo1kxNpe6gzWyR43aZX4XeMUMBsFpTNgDL05-Yib4Bi8akQMjac6Tg2_96w9Yh7q93Rf5svweMbIuKJzTklG4XYD7HTVb-Bv2gp-rtYqXle03JLC7Pb5kBgYtRmqfh-IDqbuB-vKDbkJ1pwSe2uyiD_Cl7q5qffoWrrBvGqwTn-839b3XZDRA/s527/AMMpnl.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="527" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyqMo1kxNpe6gzWyR43aZX4XeMUMBsFpTNgDL05-Yib4Bi8akQMjac6Tg2_96w9Yh7q93Rf5svweMbIuKJzTklG4XYD7HTVb-Bv2gp-rtYqXle03JLC7Pb5kBgYtRmqfh-IDqbuB-vKDbkJ1pwSe2uyiD_Cl7q5qffoWrrBvGqwTn-839b3XZDRA/w468-h146/AMMpnl.png" width="468" /></a></div><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">Interestingly, Uniswap's initial v2 pool, which uniquely has
only an unrestricted range, has been consistently profitable for LPs since it
started in April 2020, but the new capital-efficient restricted range approach
immediately overshadowed it, so it's of limited relevance today. However, this
gives a clue as to what drives LP profitability in the common restricted range
pools, as it is clearly not fundamental to the blockchain (e.g., MEV).</span></p>
<p class="MsoNormal"><span style="font-family: verdana;">To recap, the LP pnl can be broken into three parts.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><b>LP pnl = + price change of tokens + fees -
convexity costs</b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">The effect of the token price change on the underlying pool
dominates the other components by a factor of 100. As this risk is orthogonal
to the LP's position and hedgable, we can eliminate this factor to see LP
profitability more clearly. That gives us<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><b>LP pnl = fees - convexity costs</b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Fees are easy to see, but convexity costs are subtle and do
not show up unless you go out of your way to calculate them. For example, if
you deposit 1 ETH and $2000 in a pool, and the price of ETH rises to $2400, you
pull out 0.91 ETH and $2191 for a profit of $382 without fees. You made money,
but it is not obvious you lost $18 due to convexity costs (see <a href="https://efalken.substack.com/p/video-on-how-to-calculate-amm-lp" target="_blank">here<b> </b></a>for
videos on calculating pnl).</span></p>
<h3 style="text-align: left;"><b><span style="font-family: verdana;">Cause #1: Irrationality</span></b></h3>
<p class="MsoNormal"><span style="font-family: verdana;">Crypto is filled with conspicuous irrationality, where
celebrities and shills promote coins without a legitimate use case, enabling
insiders to make a lot of money. Yet this should be <i>de minimus</i> in liquid
markets with open entry and exit. However, there is a subtle selection bias
akin to the winner's curse, where an auction winner tends to overpay because
the most optimistic bidder necessarily wins. Similarly, perhaps LPs tend to
underestimate convexity costs or overestimate volume. If expectations are
normally distributed, and the most optimistic become LPs, they could lose money
due to their collective overconfidence in their subjective estimations.[2] That
would seem just as likely in Uniswap v2, where we see profits, so it cannot be
a sufficient explanation by itself.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"> The capital
efficiency in Uniswap v3 levers a v2 LP position. Assume an LP considered a
pool where the v2 return on investment, net of convexity costs, generates a 2%
APY. Unlike many YouTube influencers promising 100%+ returns, such a return is
not absurd. With concentrated liquidity, restricting a range to 20% +/- up and
down reduces the required capital by 90%, like 10x leverage. This turns a 2%
return on a v2 pool into a 21% return. Below, we see the effect of restricted
ranges on the base 2% APY. Each LP position has the same capital invested, but
as the range narrows, the returns are amplified.</span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Market value and liquidity for various ranges<o:p></o:p></b></span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Current price = 2000<o:p></o:p></b></span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>APY for v2 is assumed to be 2%</b><o:p></o:p></span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIIsUreIDfnIpIMGPUN9PXICgBJ83egjR08dKdP6b1kmFJEuPmjVSzpnj4TJ5m06s3eDFbbPnIJue7WdiwaSiC2yZcwVilft0ZWn0bNoVH1-AgfwLWnzrxUFo3LjkeTGbNj7sfj4Fs1AiS_OPjCBLkiD0SynY_V3tXZ05PJ1FGBhOUgv6ire3rpw/s392/v3roiTable.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="141" data-original-width="392" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIIsUreIDfnIpIMGPUN9PXICgBJ83egjR08dKdP6b1kmFJEuPmjVSzpnj4TJ5m06s3eDFbbPnIJue7WdiwaSiC2yZcwVilft0ZWn0bNoVH1-AgfwLWnzrxUFo3LjkeTGbNj7sfj4Fs1AiS_OPjCBLkiD0SynY_V3tXZ05PJ1FGBhOUgv6ire3rpw/w454-h163/v3roiTable.png" width="454" /></a></span></div><span style="font-family: verdana;"><br /></span><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">Thus, if one thinks the pool is profitable like a v2 pool,
given the average range is +/- 10%, that's an attractive return. A minor overestimation
can become compelling in this framework. This plays perfectly with the
ubiquitous overconfidence bias, in that not only will the overoptimistic LP see
a significant return, but also reason they can outperform their LP peers by
applying their capital to a more concentrated range than average. For example,
if Bob puts down $1k in a 10% range, Alice can put $1k into a 5% range, double Bob's profit, and proudly boast she is the best at LPing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">The problem is subtle because LP profitability is linear in
liquidity at the margin or partial equilibrium analysis. In general
equilibrium, more liquidity will not change volume much, and Bob and Alice get
the same revenue split if they each supply 10 or 100 units of liquidity.
However, their convexity costs will increase 10-fold with certainty. Uniswap v3
is especially sensitive to overconfidence in a way that does not apply to the
v2 approach, where this mechanism is absent. <o:p></o:p></span></p>
<h3 style="text-align: left;"><span style="font-family: verdana;">#2: Inverse Vega Premium</span></h3>
<p class="MsoNormal"><span style="font-family: verdana;">In tradfi, there's a return premium to being short
convexity, often called the volatility premium. One can see it in variance
swaps, straddles, and futures on implied volatility (e.g., short VXX ETF). It
is present in all developed equity markets and has a similar risk to the stock
market, underperforming in crises like the last big recession in 2008 or the
brief collapse in March 2020. It makes sense that a short volatility/gamma
position will generate a premium like the stock market because it has a similar
risk profile, substituting exposure to this risk factor. In contrast, crypto's
volatility premium goes the other way. For example, here is a chart of the
total return for a few major equity markets from Nomura research. <o:p></o:p></span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4dJDLT_u0iX00MFnuLQbIUrpB0WXMvtuthbTRxQk8EsDCQ65yO6x4uFHJb1OpAeEj3gNZQUbIZyy7tNPrqi51fHLrDfuA-_AMu03sk4VkAEtURGDh6HtIPC5HYHpazwuGFaHXjDcFICFrIEhh9QjJ8IW1HNNIzuoBdeoy0DNS2KwsDnsYY56J2Q/s778/nomuraChart.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="565" data-original-width="778" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4dJDLT_u0iX00MFnuLQbIUrpB0WXMvtuthbTRxQk8EsDCQ65yO6x4uFHJb1OpAeEj3gNZQUbIZyy7tNPrqi51fHLrDfuA-_AMu03sk4VkAEtURGDh6HtIPC5HYHpazwuGFaHXjDcFICFrIEhh9QjJ8IW1HNNIzuoBdeoy0DNS2KwsDnsYY56J2Q/w494-h358/nomuraChart.png" width="494" /></a></div><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">Here's the current implied volatilities for the SPY, the US
equity index ETF. Volatilities are higher for the lower strikes, as the market anticipates volatility will increase if the price falls.<o:p></o:p></span></p><p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXeYxgMDQwKT6JXoMRy1B8oqCjC4EuD3ZN8qrwt6QvkZXocJVwv83g1HSD-oQKwC8R-Z5GGV5ACsr3zIGY09qkS23FWi6Jsy3dirjP8T_bbD-zqD41YaJ5JRdVmEBAeQJNo7FY9bqeCStGVWYBo1F948wE-i83kRagVgse5E2g8k7OR8u4ueAJnw/s493/spyivolSkew.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="342" data-original-width="493" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXeYxgMDQwKT6JXoMRy1B8oqCjC4EuD3ZN8qrwt6QvkZXocJVwv83g1HSD-oQKwC8R-Z5GGV5ACsr3zIGY09qkS23FWi6Jsy3dirjP8T_bbD-zqD41YaJ5JRdVmEBAeQJNo7FY9bqeCStGVWYBo1F948wE-i83kRagVgse5E2g8k7OR8u4ueAJnw/w395-h274/spyivolSkew.png" width="395" /></a></div><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">Here are the Bitcoin </span><span style="font-family: verdana;">implied volatilities </span><span style="font-family: verdana;">on Deribit. Here, the market expects volatility to rise when the price rises. </span><span style="font-family: verdana;">The crypto-implied volatility smirk goes in the opposite direction as the equity smirk. </span><span style="font-family: verdana;"> </span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1asU0PATA9wEkY0k-PKXbADqCoJs_aUxjUtzVL8puoSsFNv8_NiY4_rWapvcsPB3ohPf1QjRhnqa5pCH7F_CUrStNl0B9zzuKT6Qxm4gvKxOazlHpwLkjTs8AlUrGOfrXsPmSal2CDb6DpdM0ZqHwAWvLtq_xsmxnH879lp-N71v2XaiBnVmOag/s586/bitCoinivolSkew.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="452" data-original-width="586" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1asU0PATA9wEkY0k-PKXbADqCoJs_aUxjUtzVL8puoSsFNv8_NiY4_rWapvcsPB3ohPf1QjRhnqa5pCH7F_CUrStNl0B9zzuKT6Qxm4gvKxOazlHpwLkjTs8AlUrGOfrXsPmSal2CDb6DpdM0ZqHwAWvLtq_xsmxnH879lp-N71v2XaiBnVmOag/w368-h284/bitCoinivolSkew.png" width="368" /></a></div>
<p class="MsoNormal"><span style="font-family: verdana;">Intuitively, this makes sense, as volatility rises when
crypto is mooning. I took daily data for the US stock market since 1926 and ETH
and BTC data from 2016 to document this. I then calculated each week's total
return and volatility using the 5-ish data points. It shows that, unlike
equities, returns are highest in the top volatility decile and lowest in the
lowest volatility decile. Thus, in crypto, being long volatility is like being
long the market, which should generate a risk premium. <o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-aukGL3DlA18wsnzMFSxrGB53S7jFhWHla1CFhJTyrFwwAZbklpn8u3Zg6Mhp3z_CzjUEYG9BJOqee5gka0j2suVgRAIFusOuGYWcay-bLT4odqibSAqZ8ArQqxOcu4szKabeIwvi5xqogk_1kYwTfinna75TS3biW7mmN_6-uvDtA2vQiBG9zw/s613/volcorr.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="447" data-original-width="613" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-aukGL3DlA18wsnzMFSxrGB53S7jFhWHla1CFhJTyrFwwAZbklpn8u3Zg6Mhp3z_CzjUEYG9BJOqee5gka0j2suVgRAIFusOuGYWcay-bLT4odqibSAqZ8ArQqxOcu4szKabeIwvi5xqogk_1kYwTfinna75TS3biW7mmN_6-uvDtA2vQiBG9zw/s320/volcorr.png" width="320" /></a></div>
<p class="MsoNormal"><span style="font-family: verdana;">If long crypto volatility positions generate a positive
return, short volatility generates a negative return. In crypto, unlike
equities, being long volatility is like being long the underlying. If the
expected return on crypto is positive, so is the return on being long
volatility. If short crypto volatility had a positive return, one could short
volatility as an LP and then go long crypto, generating a hedged portfolio that
makes a profit on both legs, arbitrage. I don't have data on implied volatilities
from Deribit, but it would be interesting to know the averages over the past
couple of years. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Given a positive expected return for volatility, an LP
position is like a standard hedge, costly. At the very least, it lowers the market
pressure for positive returns on negative-convexity positions, like a constant
product AMM LP.</span></p>
<h3 style="text-align: left;"><span style="font-family: verdana;">#3: LP Positions as Resting Limit Orders</span></h3>
<p class="MsoNormal"><span style="font-family: verdana;">I recently discovered that many LP positions are passive
trading tactics (ht </span><a href="https://twitter.com/ryskfinance" target="_blank">@ryskfinance</a><span face="TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif" style="background-color: white; color: #536471; font-size: 15px; text-wrap: nowrap;">)</span><span style="font-family: verdana;">. For example, if I post 1 ETH just above the current ETH price,
as soon as the price jumps through my range, I will have sold ETH while getting
paid the trading fee instead of paying it. This isn't a free lunch, as
statistically, the price will be significantly higher than the range when one removes
that position, implying you could have sold it for more, classic adverse
selection. The efficacy of this tactic depends on many parameters, so I won't
get into whether this is a good idea. I want to see if it adds up to anything
substantial.</span></p>
<p class="MsoNormal"><span style="font-family: verdana;">If many LPs effectively trade this way, they may lose money
on the convexity implied by their positions. Still, as they have a different
objective, that's not a problem. We need to estimate LP profitability when we remove
these players, as they could be biasing the aggregate profitability statistics.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">To estimate their effect, I took all the mints and burn for
the Uniswap v3 ETH-USDC 5bp pool from Jan 1, 2023, through Feb 14, 2024. I only
included LP positions that completed a round-trip, with both an add and remove
in the time frame, where the add and remove were single transactions. I
classified an LP position as a passive-trade if its initial range was above or
below the current price and held for less than seven days, and the deposit and
withdrawal were completed in a single transaction. I also excluded those LP
positions with zero token changes, as these would have never been touched and are
irrelevant to LP risk or revenue.</span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>LP positions<o:p></o:p></b></span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>Between 1/1/23 and 2/16/24</b><o:p></o:p></span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj61tgnRHbS_8KwGNel1-e3_16V1di1tjkcr8Ss59S4i-6bvzU4QHW2VzCRLQKHQrmwSNKWKIl4UPv4A8JMXhIO-pybauPW4DwgsfXEwmBDhOBri8KKQdliezfYlxyv5Voc5Hr6kpNlUrrXWzksd0U3DdZFaxewHhUr2XdrEExFf_kdmPnxSZnFMA/s561/passiveStats.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="41" data-original-width="561" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj61tgnRHbS_8KwGNel1-e3_16V1di1tjkcr8Ss59S4i-6bvzU4QHW2VzCRLQKHQrmwSNKWKIl4UPv4A8JMXhIO-pybauPW4DwgsfXEwmBDhOBri8KKQdliezfYlxyv5Voc5Hr6kpNlUrrXWzksd0U3DdZFaxewHhUr2XdrEExFf_kdmPnxSZnFMA/w531-h38/passiveStats.png" width="531" /></a></span></div><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">The table above shows that these passive-trade LP positions
accounted for 5% of the total mints over those 409 days. The absolute USDC
change for these LPs is not the total amount traded in LP positions, just the
net. For example, if the price moved across a range in one transaction and were
then removed in the next block, the LP's net USDC change would equal their
gross USDC change. If the price moved into the range and bounced around from
the upper to lower price bound, the gross USDC traded would be much greater
than the net USDC traded. The average duration for passive-trade LP positions
was only half a day, and the median range size was 0.2%, so they do not
generate significant fees outside of the tokens needed to push the price across
their range.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">To estimate their effect on the total LP convexity costs, I used
the initial and ending price, the LP range's lower and upper price bounds, and
their liquidity. For example, in the range below, from 125 to an upper price of
175, if the initial price is at p0, around 115, the range is above the current
price. Only one token will be offered for these positions, and the range will
be either above or below the initial AMM price. <o:p></o:p></span></p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Kg-YycTkj_Eu_4PLetNHZO9iIZ7h164IfxoTc8V0EK9KnjACYkyb4TOTo0YRFUGkKTfHv1nIyy3WyXlylFbQ-1ty8iJqKGZw4rXTrKpCjYq_fkSZeoDX9NMsWLPS1aSoolACSqjY-ZpnEwaARtdpCWA_IF8ug0-fu1J14pfpTfz0kX230dJzDw/s689/rangeGraph.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="460" data-original-width="689" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Kg-YycTkj_Eu_4PLetNHZO9iIZ7h164IfxoTc8V0EK9KnjACYkyb4TOTo0YRFUGkKTfHv1nIyy3WyXlylFbQ-1ty8iJqKGZw4rXTrKpCjYq_fkSZeoDX9NMsWLPS1aSoolACSqjY-ZpnEwaARtdpCWA_IF8ug0-fu1J14pfpTfz0kX230dJzDw/s320/rangeGraph.png" width="320" /></a></div>
<p class="MsoNormal"><span style="font-family: verdana;">The formula I used for the convexity cost was <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><b>Conv cost = liquidity * (sqrt(p0) – sqrt(p1))^2 / sqrt(p0)</b><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Here, p0 is the first price in the range crossed, and p1 is the
more extreme final price relevant to the LP position. This captures the cost of
an LP position from its negative convexity. The profit for the LP position was hedged
once at inception, excluding fees (and, thus, always a loss). As explained in
my <a href="https://falkenblog.blogspot.com/2024/02/hedging-negative-convexity.html" target="_blank">post last Tuesday</a>, the static hedge does not change the expected cost of
convexity cost. Still, it eliminates the first-order effect of the simple
position delta, which would otherwise increase the volatility of these data points
by a factor of 100. While a better estimate would update a hedging ratio daily,
that would take ten times more work for me. My approach below, which presumes a static hedge, generates an unbiased estimate that is sufficiently efficient given the thousands of LP positions in my sample.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">The tricky thing about restricted ranges is the three cases
mentioned above, where a range is above, below, or straddling the current price.
These require different formulas for estimating the number of tokens in the
position and the convexity cost for the LP over its life. There are three cases
for the initial state and when the position is removed, for a total of nine combinations.
Below is how these nine cases map into the prices used in the above equation.</span></p><p class="MsoNormal" style="text-align: center;"><span style="font-family: verdana;"><b>price points used for LP positions based on range position</b></span></p><p class="MsoNormal"><o:p><span style="font-family: verdana;"></span></o:p></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0Yg0IDZgtfA-fuU_5loQohiWCbKbA3ddujT_aU7D6wPFu1hmfXX_3UA-uT46jkR1fH5DJ-rl-k5jxvul_EHb1HW3r5HnOkMlclEwBakIdkfps80YTN3S2mg7z_tqYkxoGf8apzlBHFAAaMaIzzBWU0LNOXhxemXnzjm8yyJKNOGmdMwmuvKpTw/s257/cases.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="223" data-original-width="257" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0Yg0IDZgtfA-fuU_5loQohiWCbKbA3ddujT_aU7D6wPFu1hmfXX_3UA-uT46jkR1fH5DJ-rl-k5jxvul_EHb1HW3r5HnOkMlclEwBakIdkfps80YTN3S2mg7z_tqYkxoGf8apzlBHFAAaMaIzzBWU0LNOXhxemXnzjm8yyJKNOGmdMwmuvKpTw/s1600/cases.png" width="257" /></a></span></div><p></p>
<p class="MsoNormal"><span style="font-family: verdana;">The total costs are listed below. I present three different convexity cost calculations, which highlight the standard error in these approaches. All approaches rely on different assumptions, but they give confidence in their approximate magnitude. </span></p>
<h3 style="text-align: left;"><div style="text-align: center;"><span style="font-family: verdana;">Convexity Costs</span></div><span style="font-family: verdana;"><div style="text-align: center;">1/1/23 through 2/16/24</div></span></h3>
<p class="MsoNormal"><o:p><span style="font-family: verdana;"> </span></o:p></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: verdana;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0GSE7q6Uz7Y0KWL_bUDmzgEHUlkqfaYEoWb678tuCu8UAlFWh7fm-b0ply28AG_cceDnN4yPzyCy3iFkVuMkua4vcCMr91UUkSkFufHc9iprC_mg-2zUj9jl-WNGjAMtMOuTUEi8cocAThlwlYG1JkFD0e7HYPZTZrIBrQyoeqKYLutupLOBopg/s350/convcosts.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="62" data-original-width="350" height="70" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0GSE7q6Uz7Y0KWL_bUDmzgEHUlkqfaYEoWb678tuCu8UAlFWh7fm-b0ply28AG_cceDnN4yPzyCy3iFkVuMkua4vcCMr91UUkSkFufHc9iprC_mg-2zUj9jl-WNGjAMtMOuTUEi8cocAThlwlYG1JkFD0e7HYPZTZrIBrQyoeqKYLutupLOBopg/w393-h70/convcosts.png" width="393" /></a></span></div><p></p>
<p class="MsoNormal" style="margin-bottom: 0in;"><span style="font-family: verdana; font-size: x-small;">Cashflow: USDCin + ETHin * endPrice
– 0.05%*abs(USDCtraded)<br />
Sqrt()2: liquidity * (sqrt(endPrice)
– sqrt(initPrice))^2 / sqrt(initPrice)<br />
Variance: 2 * liquidity * sqrt(initPrice)
* variance / 8<br />Data were calculated daily and summed from 1/1/23 through 2/16/24<br /></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">While the passive-trade LPs represented only about 5% of the
total convexity cost, this is significant because LP losses are driven by costs
about 9% greater than revenues. In this period, the average daily net LP profits
in this pool were about -13k daily, comprising around $141k in fee revenue and
154k in convexity costs (see explainer here). If we subtract $3.6MM/409 from the
convexity costs, the daily pnl loss falls to $4k per day.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: verdana;">Anyone who has worked with large datasets knows many problems
are only discovered through experience. I have only been investigating this
effect for a few days; my LP convexity cost numbers are tentative.</span></p>
<h3 style="text-align: left;"><b><span style="font-family: verdana;">Conclusion</span></b></h3>
<p data-pm-slice="1 1 []"><span style="font-family: verdana;">AMM LP unprofitability is a problem, but perhaps not as puzzling as I thought. The LP positions that are put on primarily as a passive limit order to buy below the current price or sell above the current price significantly bias standard LP profitability, as these LPs are not providing liquidity to make money as a liquidity provider but instead are trying to implement conditional trades (resting limit orders). This effect seems responsible for most of the LP losses.</span></p><p><span style="font-family: verdana;">While the race to narrow ranges generates negative externalities many LPs do not appreciate, over time, losing money tends to disabuse even the most deluded. The anomalous long volatility premium reduces the tendency for LPs to demand large positive returns for being short volatility, as a premium for being short vol/gamma/convexity would not be an equilibrium, given volatility and returns are positively related in this asset class. I suspect both are relevant, but it isn't easy to know how much. </span></p>
<p class="MsoNormal"><span style="font-family: verdana;">I hope more people will address this problem because, as
noted initially, very few papers estimate average LP profitability. Often, a
yield farm is built on something like a constant product AMM, and the farmer
dapp just adds up the fee revenue (and airdrops!) to generate highly misleading
APYs. While the recent crypto bull market covers up many bad business models,
in the long run, dapps built on LP tokens with a zero or negative, long-run return
are <i>not going to make it</i>. I realize most people in this space don't care about
the long run, though they would never admit it publicly. Nonetheless, many do, and
they should prioritize decentralization and sustainable mechanisms. A
sustainable AMM must generate profits for its LPs. </span><o:p></o:p></p><p class="MsoNormal"><span style="font-family: verdana;"><br /></span></p><p class="MsoNormal"><span style="font-size: x-small;"><span style="font-family: verdana;">1 </span><span style="font-family: verdana;">There are a bazillion long-tail AMMs, and the ability to permissionlessly create trading pairs on meme coins does seem a sustainable model in that there's a perennial influx of new coins. Further, as these coins are not listed off-chain, the LPs may be able to avoid adverse selection by being connected to insiders. This increases risk to idiosyncratic scams frequent in these coins, so pulling general statistics is a second-order consideration.</span></span></p><p class="MsoNormal"><span style="font-family: verdana;"><span style="font-size: x-small;">2 The analogy to the winner's curse is not perfect because everyone who wants to become an LP is treated the same on a pro-rata basis, while for an auction, only the top bidder pays for and gets the item. Nonetheless, it highlights the selection bias to buyers.</span></span></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-84435064821695445182024-02-27T11:44:00.000-06:002024-02-27T11:44:48.042-06:00Hedging Negative Convexity<p> Automated market makers (AMMs) invariably present their Liquidity Providers (LPs) with convexity costs. Hedging does not eliminate or even reduce these costs but it does lower volatility. With lower cost volatility, an LP does not need as much capital to cover these losses, so considering capital is expensive, it is correct to say hedging reduces costs, though only indirectly. </p><p>Consider the pool with a token A vs. USDC in the pool. If an LP provides 777 units of liquidity, his initial LP position would look as in Table 1 below.</p><p style="text-align: center;"><b>Table 1</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnY2kkTKuXb97nr5pWibhuvvBxi5uq0KJrAp-nlXBX-9aEfV6EVYt3O6UZAepwOlHyFwD2r-wcdJq-0PIygPlzWp8oxI3UkcAQeHrWsMbbkGy6Io7gRUKTZV1nsykB6HHsmXT0sJunpGSlMCYG4VQcjH1Ua9ewx3nLepPJhghF4JV3sP-6DtS6ug/s264/table5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="121" data-original-width="264" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnY2kkTKuXb97nr5pWibhuvvBxi5uq0KJrAp-nlXBX-9aEfV6EVYt3O6UZAepwOlHyFwD2r-wcdJq-0PIygPlzWp8oxI3UkcAQeHrWsMbbkGy6Io7gRUKTZV1nsykB6HHsmXT0sJunpGSlMCYG4VQcjH1Ua9ewx3nLepPJhghF4JV3sP-6DtS6ug/s1600/table5.png" width="264" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">To model the LP's position, we can use a binomial lattice. Here, we transform a volatility assumption into an up-and-down move in the lattice. In practice, one uses many little steps, but we will show a large 10% movement for illustrative purposes. One can use the following formulas to create an arbitrage-free recombining lattice. Here, we will assume zero drift, or an expected token A return of zero. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b>Table 2</b></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho248mVaAH2fLnxm-sLaQrZRvoHDeLKJFA7bAwKpVpqxqilryq3AYQsihqPhlzS7ryLZMdggXialykrCRE-E6XQGBbnPOL8mOoRm1C_YOsiOASq3628VWXZVrKPMKfLAtKPQ-dWX7yuezKaslLBoXT5usz4giPal5pIlReL6V9jLvUmzmhqdUAhA/s280/table2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="121" data-original-width="280" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho248mVaAH2fLnxm-sLaQrZRvoHDeLKJFA7bAwKpVpqxqilryq3AYQsihqPhlzS7ryLZMdggXialykrCRE-E6XQGBbnPOL8mOoRm1C_YOsiOASq3628VWXZVrKPMKfLAtKPQ-dWX7yuezKaslLBoXT5usz4giPal5pIlReL6V9jLvUmzmhqdUAhA/s1600/table2.png" width="280" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Applying these parameters to a lattice, we start at a price of 100 and then move up or down. Given an up move is the reciprocal of a down move, up*down=1, the center node just takes one back to the starting price. Note the probabilities are not 50% as the price movements are modeled as lognormally distributed (e.g., exp(x)), so the probabilities adjust these asymmetric future prices to be consistent with the starting prices (E(p) = 100). </div><div><br /></div><div style="text-align: center;"><b>Recombining Lattice</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCFdqbc1IKQY9CRTZZLYKPMj7H83ADkYJsD8kp6Bxqq9fRX07mysi6k-ikzvIeTyqB-136lIKZ6TL76HhT2WUNyXmstxRPUY9ef20WebIKagSnw9W5y7ImRvFCQlL03Ue851qDLpn_VFSVbTZ2zwBXzjzB1vLs___mYd-3J3HdcJZVpVGV_-WROg/s290/pricePath.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="290" data-original-width="282" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCFdqbc1IKQY9CRTZZLYKPMj7H83ADkYJsD8kp6Bxqq9fRX07mysi6k-ikzvIeTyqB-136lIKZ6TL76HhT2WUNyXmstxRPUY9ef20WebIKagSnw9W5y7ImRvFCQlL03Ue851qDLpn_VFSVbTZ2zwBXzjzB1vLs___mYd-3J3HdcJZVpVGV_-WROg/s1600/pricePath.png" width="282" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejPVGUa3qUQdP6gIylgiUU_-i8sAL7K1_wXWnP-Vt3z39qod5UGCXrnkLDrFo9PukDVQTW6ZNavWKN2sr0avVzfv9-EPq7mhqwqofAOt5ug7QCdjXbk2oFLoksQb5jHhXXTjh044YxjzOm9UP4_TVr6HoIW0QQdbgHtfBhMCVplpUhpPtXb3s3A/s285/problattice.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="283" data-original-width="285" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejPVGUa3qUQdP6gIylgiUU_-i8sAL7K1_wXWnP-Vt3z39qod5UGCXrnkLDrFo9PukDVQTW6ZNavWKN2sr0avVzfv9-EPq7mhqwqofAOt5ug7QCdjXbk2oFLoksQb5jHhXXTjh044YxjzOm9UP4_TVr6HoIW0QQdbgHtfBhMCVplpUhpPtXb3s3A/s1600/problattice.png" width="285" /></a><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">This approach is convenient because modeling the price of a derivative just involves applying the derivative formula to the various nodes with their distinct prices and then multiplying the derivative values in these nodes times their probability. In each period, here portrayed as a row, the probabilities add up to 1.0. Below is a lattice applied to a v2 LP position initially hedged. The token A position in the pool is initially 77.7, so the initial hedge is short 77.7 units of token A. </div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b>Static Hedge</b></div><div class="separator" style="clear: both; text-align: center;"><b><br /></b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcbT1pQhNxGJrDmQP0wW6n_H1YSoPxMK8OLzb3Zd7244yMuhhVOEnyGpgqi-8FdFrSnAdzCISMTh48RV56fPio9YgRS067M3KnjDuNN2Xq8JeVFmyq7bhtRUkiCeBPIb_mOouCDbNoJJFfU_M1pim-c2ZE1ftIsPvdrH0ohJX0ZyP0ZTrzqEwi7A/s905/tree1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="706" data-original-width="905" height="367" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcbT1pQhNxGJrDmQP0wW6n_H1YSoPxMK8OLzb3Zd7244yMuhhVOEnyGpgqi-8FdFrSnAdzCISMTh48RV56fPio9YgRS067M3KnjDuNN2Xq8JeVFmyq7bhtRUkiCeBPIb_mOouCDbNoJJFfU_M1pim-c2ZE1ftIsPvdrH0ohJX0ZyP0ZTrzqEwi7A/w469-h367/tree1b.png" width="469" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">In the final period, T=2, we see that the two tail events, each with a 1/4 probability, generate an LP loss, while the middle case, where the price is flat, has a probability of around 1/2. If the LP did not hedge, he would see a gain in the 'up' state and a loss in the 'down' state, while in the hedged case, he would lose money in both states. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Looking at this in Table 3 below, we can see the expected pnl for the hedged and unhedged LP positions are identical (ignoring fees here, which would be unaffected by hedging). <span style="text-align: center;">These are the payoffs and probabilities at the bottom of the lattice. </span>However, the unhedged LP position varies by +/- 1500, while the hedged pnl varies by +/- $75. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b>Table 3</b></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgsjsVc7FfRNeQYaXXp_B2fre8dVlRBBQFb7udsJbJMINSUv9E-sWyN2FRLJmyQGRSmuBniLegqjK0vPT19D6LK3yFwdD-QAyKtuSf4xI0uZjjQKaiTVF_1PgKlBhyphenhyphenT2RGLgIDqTtsaqA3_HZbct2EekhS3m6qiF8QmuQZu-Hz8OINV9CpMBbCQ/s338/table4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="101" data-original-width="338" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgsjsVc7FfRNeQYaXXp_B2fre8dVlRBBQFb7udsJbJMINSUv9E-sWyN2FRLJmyQGRSmuBniLegqjK0vPT19D6LK3yFwdD-QAyKtuSf4xI0uZjjQKaiTVF_1PgKlBhyphenhyphenT2RGLgIDqTtsaqA3_HZbct2EekhS3m6qiF8QmuQZu-Hz8OINV9CpMBbCQ/s320/table4.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">A dynamic hedge would be more frequent and reduce the LP's risk. The initial hedge is identical to the static hedge, so the LP's pnl is the same in period T=1 for both hedging strategies. However, in period T=1, the LP will adjust his hedge to match his new token A position, decreasing it in the up state from -77.7 to -73.91 and increasing it to -81.68 in the down state. As the hedge is readjusted, to simplify accounting, we will realize the total pnl in period T=1. The LP pnl is not actually realized, but putting the period 1 LP pnl onto the balance sheet makes it easy to see the effect of the hedge in the subsequent period. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">The initial hedged LP position is identical to the above static hedge case, as they had identical positions in T=0</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b>Dynamic Hedge Path Dependent</b></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJghYhnH-kDryu3M35M7uOI4vMnRdzaQmlMpiJKu6rWTrjRnVcn1GgzytqpHWY0F3SptWzh2FT0VmdpMWeT8W-dUjXH66IMsxr_xigPHpjLt0W65JYLB32HBe22cifvqL1kT3KbAKWp3UkvjAgaSHXgkXlVr5cxZ_8ZIJF3fdIHlI69fc78IuBDQ/s1134/tree2b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="669" data-original-width="1134" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJghYhnH-kDryu3M35M7uOI4vMnRdzaQmlMpiJKu6rWTrjRnVcn1GgzytqpHWY0F3SptWzh2FT0VmdpMWeT8W-dUjXH66IMsxr_xigPHpjLt0W65JYLB32HBe22cifvqL1kT3KbAKWp3UkvjAgaSHXgkXlVr5cxZ_8ZIJF3fdIHlI69fc78IuBDQ/w527-h312/tree2b.png" width="527" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">In period T=1, the hedge ratio is updated, and we realize hedge and LP pnl profits (expected loss is 19.40). The expected loss in the second period is 19.38, given that the initial loss was realized in period T=1, which is just the sum of the probabilities of these four states times their net pnls. The total expected loss over both periods is 38.79, identical to the static hedge. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">More frequent hedging reduces pnl volatility in the same way that a static hedge reduces the pnl volatility: they do not change the total expected LP loss, totaling 38.79 whether unhedged, statically hedged, or constantly hedged. You multiply the pnls by their respective probabilities to get the expected value. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">If you don't hedge a negatively convex position, you will lose $<i>x</i> with probability <i>p</i> after T periods, while if you hedge continuously, you will lose <i>x</i>*<i>p</i>/T each period. In the example above, the static hedge reduces the pnl variability from about +/- $1500 in the extreme states to +/- $75 with a static hedge, and the dynamic hedge reduces its variance further to a constant $20 each period. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">What about restricted ranges, as in Uniswap v3? Again, this doesn't change the convexity costs for a given amount of liquidity. Consider if the range had a range spanning the price movement in this example, a +/- 10% price movement. The total LP cost would be reduced by 90%, a substantial savings. One's hedge size is also reduced, reducing capital requirements further. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Given the same liquidity, the expected convexity cost is identical for an LP, whether the range is restricted. In the lattice below, the restricted range starts with token A amount of only 7.39 vs. 77.7 in the unrestricted case, so the hedge is only -7.39 vs. -77.7. However, in the final state, the net LP pnls are identical. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b>v3 restricted range</b></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6RrwlLEaEnLv-I_EbQMUmC5Rdovw3rNzhLWgGjWUqNuFpyBn_USw-hpkICeHdGGcO-rgrnd8AdC8JcRLaEMaetp6LGcCW6rzPIqyS9us5z3-61nPa1l8d5GmED7APQMK0Tf-dtTxYoob1ruQ2uex2MsiOyUhofkCDwbn75AQEEwMHttf1ZcRuEA/s923/tree3b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="671" data-original-width="923" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6RrwlLEaEnLv-I_EbQMUmC5Rdovw3rNzhLWgGjWUqNuFpyBn_USw-hpkICeHdGGcO-rgrnd8AdC8JcRLaEMaetp6LGcCW6rzPIqyS9us5z3-61nPa1l8d5GmED7APQMK0Tf-dtTxYoob1ruQ2uex2MsiOyUhofkCDwbn75AQEEwMHttf1ZcRuEA/w453-h330/tree3b.png" width="453" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Convexity costs are purely a function of gamma times the variance, and LP gamma is a linear function of liquidity. It's prudent to hedge this, but also important to realize the limits to what hedging can do. It cannot eliminate a convexity cost. </div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-8229606154626722402024-02-21T07:27:00.004-06:002024-02-21T08:34:55.358-06:00Academic CLOB Model<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">Last week, I <a href="https://falkenblog.blogspot.com/2024/02/budishs-plan-to-replace-clobs.html" target="_blank">commented </a>on the University of Chicago professor Eric Budish <i>et al.</i>'s hedge fund sniping model
but neglected a more significant point. To recap, Budish modeled a scenario
likened to a Centralized Limit Order Book (CLOB), where <i>liquidity providers</i>
(LPs) post bids and asks, and takers then take those orders (<a href="https://ericbudish.org/wp-content/uploads/2022/03/high_frequency_trading_arms_race_slides_seminar2015.pdf" target="_blank">link</a>). Assuming several
<i>high-frequency traders</i> (HFTs) are posting the bids and asks, for any resting
lone bid or ask, a stale quote will generate a race between the lone HFT
LP and several HFTs acting as takers. If the race winner is random, the odds
are the LP posting the order will lose. This is the latency race deadweight loss. He estimates this symmetric information
adverse selection adds 0.4 basis points (0.004%) to the bid-ask spread. When
you apply that number to all the stocks traded worldwide, you get $40B. We
would save the world $40B if we switched to sequential auctions. In <a href="https://www.newyorkfed.org/medialibrary/media/newsevents/events/markets/2015/A-Market-Design-Perspective-HFT-Debate.pdf" target="_blank">his words</a>, "continuous markets don't 'work' in continuous time." <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">The craziest thing about this argument is that he applies this to
a novel market mechanism that lowered costs by over 90% after nearly a century of stasis. In the first chart, we
see the spread was constant from 1900 to 1990 at around 60 basis points, making some
think it was some fundamental equilibrium. The
internet enabled an alternative way to trade stocks, the electronic trading revolution from firms like Island, BATS, Archipelago, Instinet, etc. The second chart shows that it fell still lower from 2001 through 2006. The second chart is in different units and breaks it up by size groupings, but the point is the decline continued and was permanent. The current spread is about 3 basis points. 60 to 3.
<o:p></o:p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><a href="https://host.kelley.iu.edu/cholden/Jones%20(2002).pdf"><span style="font-family: verdana;">Jones
Trading Costs 1900-2000</span></a></p><p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrnYrHtfpyAZBWo6utVLdAfYcMYSAiVnhh1VUIRCML44YBDfDnjouMd3tCrR5JLplgbk8AlN510kwDTtxqkRGYGPVrf1K5d2LtiRnLJKNqrIPDDbxlPHFg1H6AgNrw5nr2ytvwJZaqLXv5T-FlebIPmfeowCEjE-7D6v1_iuvVbKcSVDRdI2mSpg/s622/cmjones.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: verdana;"><img border="0" data-original-height="356" data-original-width="622" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrnYrHtfpyAZBWo6utVLdAfYcMYSAiVnhh1VUIRCML44YBDfDnjouMd3tCrR5JLplgbk8AlN510kwDTtxqkRGYGPVrf1K5d2LtiRnLJKNqrIPDDbxlPHFg1H6AgNrw5nr2ytvwJZaqLXv5T-FlebIPmfeowCEjE-7D6v1_iuvVbKcSVDRdI2mSpg/w427-h244/cmjones.png" width="427" /></span></a></div><p></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><span style="font-family: verdana;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape alt="A graph showing the stock market
Description automatically generated" id="_x0000_i1026" style="height: 171pt; mso-wrap-style: square; visibility: visible; width: 298.5pt;" type="#_x0000_t75">
<v:imagedata o:title="A graph showing the stock market
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png">
</v:imagedata></v:shape><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><a href="https://www.econstor.eu/bitstream/10419/43255/1/599235055.pdf"><span style="font-family: verdana;">Jones,
Hendershott and Menkveld (2008)</span></a></p><p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOsb3-n5ZboBZr2OdTqvYNFBy2r_AsF-Mi_QeYNTApm0XJ3M9P98XcnZ3gPldBrTN5BhgBRpkaWY8obt0UnMLEbYwyxH6u77AfqS01xWHCzn0Ry5a6oZuU0XJFN8idD7bY4dEsXiUcdNabWHL8gLmcI-brtevOHPT2_pG_5zeE0EvhFWnidgiog/s592/tradcost2.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: verdana;"><img border="0" data-original-height="392" data-original-width="592" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOsb3-n5ZboBZr2OdTqvYNFBy2r_AsF-Mi_QeYNTApm0XJ3M9P98XcnZ3gPldBrTN5BhgBRpkaWY8obt0UnMLEbYwyxH6u77AfqS01xWHCzn0Ry5a6oZuU0XJFN8idD7bY4dEsXiUcdNabWHL8gLmcI-brtevOHPT2_pG_5zeE0EvhFWnidgiog/w411-h272/tradcost2.png" width="411" /></span></a></div><p></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">In that context, advocating a wholesale change in market structure
to eliminate a remaining 0.4 basis point of that spread is a classic example of
letting perfection be the enemy of the good. This sort of economic ingratitude is standard,
as no matter how much GDP grows, someone can point out something wrong and
suggest we replace capitalism with a centrally planned economy, one that, unlike
any of the past centrally planned economies, will work better than
decentralized economies.</span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">In spite of economics as seeming laissez-faire, most economists have been progressives (e.g., founder of the AEA Robert T. Ely, JM Keynes), viewing competitive behavior as wasteful, a criticism shared by industry
leaders who appreciate it as a powerful cartelization device. The essence of
free markets is private property and liberty. If people can make unfettered
decisions about themselves and their property, it promotes prosperity. There is
no trade-off between freedom and prosperity; they go hand in hand. Alas, most
people, especially academics, don't trust decentralized results. Since Plato's
<i>Republic</i>, they have always thought they could design a better world if given
the mandate. Hubris and pride were prominent human vices in the Classical and
Biblical canon because of their perennial, pervasive, and pernicious nature. It's a constant battle.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">Back to Budish's model, he looks at some data circa 2015 on the London Stock Exchange, back when they timestamped in microseconds (now nano) and focuses on trades where several HFTs were taking or canceling a particular offer (e.g., bid for 100 @ 99.32) within 500 microseconds of each other. He figures the takes that got
there before the LP canceled were unfairly robbing the poor HFT LP, which
happened 90% of the time. Indeed, cancel orders were not recorded most of the
time in these races, but if several HFTs tried to take simultaneously, he figured the LP probably wanted to.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><span style="line-height: 107%;">This inference is silly for several reasons. First, It depends on
who is trading and why. This was highlighted by </span><span style="line-height: 107%; mso-bidi-font-size: 12.0pt;"><a href="https://www.jstor.org/stable/1912117">Holmstrom and Myerson (1981)</a></span><span style="line-height: 107%;">: planners
do not know everything in an economy with incomplete information, something economists often forget when looking down at their models like God. Many sniped
orders were from retail traders who thought they would post a buy order one
tick above the best buy instead of crossing the spread. They get up and go to
the kitchen, and when they come back, they are filled, though the market has
moved much lower. If the retail trader instead sent a market
order and bought at a higher price, they would have a bigger loss. This is not a deadweight loss.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">Another type of trader is the HFT, who merely wants to change their
inventory, including
rectifying a short position (moving from -100 to -90). In that case, they would be willing to cross the spread or post an aggressive limit order; they are not trading for arbitrage, where one tries to buy below the mid, etc. When one posts an aggressive resting limit order above the current best bid, one knows that they are not guaranteed a fill with the price not moving, as otherwise, no one would cross the spread. Marking such resting limit order trades to the mid-price will make it look like a loss to the LP, but it
should be marked relative to the alternative, which is crossing the spread. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">Another significant problem in his model is that this is not so
much an exogenous cost born by HFT LPs, just an intra-HFT transfer. Only a
dozen firms dominate HFT, as is usual in elite competitions. Those playing
the game are taking and posting resting limit orders probabilistically.
Such an order may be taken by a retail rube immediately, sniped by an HFT, and sometimes, their bid will sit there, and the price will
move, and then they will become the top of a large queue, the perfect place for
a positive expected value order. If you only count those times they get picked
off as a loss and consider that an exogenous expense to be eliminated, you are simplifying the game in a way that mischaracterizes it completely.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">His batch auction alternative is efficient when one thinks about a
one-period scenario where people have private valuations for an object. With
repeated auctions for equities, we must incorporate the complexity of updating valuations
based on other valuations, inventory situations, and time preferences. As the other players are doing the same thing, we must update the
priors of other people's priors, <i>ad infinitum</i>. There is also the possibility of
collusion, like playing poker with two players sharing information, which would
radically alter one's interpretation of market orders. His simple model is an
excellent way of illustrating a particular problem, but to presume this is
sufficient justification for a policy suggestion, let alone a radical new
regulatory mandate, is absurd. The state space
quickly becomes beyond any closed-form solution.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">He also says the market can't fix itself like it's stuck in the
bad Nash equilibrium and mentions two examples. First, he objects to letting
the broker get two cents for their trades from an HFT who processes the orders
rather than an explicit two-cent fee charged to the retail trader. The broker gets two cents in either case, but the trader may feel like he is getting a better deal. Retail flow is
considered uninformed, as it will always have high latency, so HFT LPs can
assume it is not filled with adverse selection and charge a lower spread,
creating positive gains from trade. Allowing the broker to swap an
explicit fee for an implicit fee via the rebate given by HFTs is an
efficient way to capture this. His
example of an HFT <i>problem </i>is the sort of fix markets make. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="line-height: 107%;"><span style="font-family: verdana;">Budish also mentions co-location as a cost of HFTs because many
millions are spent by HFTs wishing to be the fastest. This is perverse because
providing privileged but open access, where everyone is treated the same, down
to a couple of nanoseconds, is undoubtedly more efficient than distributing
this privilege off the books. The latency advantage will exist in any modestly continuous market, so the question is how to administer this. Backroom deals encourage corruption and are cancerous. What Budish presents as a problem and something markets cannot fix is actually an efficient market solution. He has it backward.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><span style="line-height: 107%;">During the 90 years of bid-ask stasis, the country was transformed by the
telephone, radio, and TV, which radically altered the speed of information flow across the country. Yet it was only with the internet that outsiders
could create an alternative to the closed, heavily regulated specialist equity trading system.
Consider the NYSE's alternative, Nasdaq, was found to collude, quoting highly
liquid stocks in ¼, ½, etc., but rarely, 1/8, </span>3/8, etc., artificially increasing the bid-ask spread. There were more Nasdaq dealers competing for quotes than on
the NYSE, but the NYSE was a more efficient mechanism. Those just counting the number of
players, as many naively do (Herfindahl index, Nakamoto number), would have never guessed that. Such are the game theoretic equilibria in complicated real-world games.</span></p>
<p class="MsoNormal"><span style="font-family: verdana;"><span style="line-height: 107%;">Instead, Budish emphasizes state coercion, ignoring the precedent of a 90-year regulatory-enforced inefficient market. In his paper, <a href="https://ericbudish.org/wp-content/uploads/2022/03/afa_transcript.pdf" target="_blank">Will the Market Fix the Market</a>, he favorably quotes a top regulator for writing, </span>"Without changing [the]
incentives, we cannot and should not expect the market to fix the market." This naïve and hubristic view is natural because big institutions are not going to fly him around to tell them that markets are doing well, though there's an edge case where you get adverse selection without asymmetric information. He created a model that theoretically <i>proved </i>a new inefficiency exists, and he also empirically <i>proved </i>billions of dollars in waste. </span></p><p class="MsoNormal"><span style="font-family: verdana;">Luckily, this policy does not look like it is gaining ground, as Taiwan recently <a href="https://www.citadelsecurities.com/wp-content/uploads/sites/2/2022/03/Market-Lens_Continuous-Trading-vs-Frequent-Batch-Auction.pdf" target="_blank">moved away</a> from a batched auction market to a standard CLOB. A simple solution, liberty, implies its best if we generally ignore economists when they come up with specific policies.</span></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-21428180118599421962024-02-19T19:28:00.003-06:002024-02-19T19:56:33.040-06:00Hyperliquid's CLOB<p> The latest horrid DEX simulacrum is <a href="https://hyperliquid.xyz/" target="_blank">Hyperlink</a>, a perp CLOB emphasizing
shit coins. It runs on its own dapp-specific L1 using a version of Tendermint, the favorite consensus mechanism for those prioritizing speed. </p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">I listened to a <i>Flirting with Models</i> <a href="https://www.youtube.com/watch?v=HqCksxcX49w&list=WL&index=4&t=366s" target="_blank">podcast </a>with founder
Jeff Yan, where he spoke with Corey Hoffstein, a quantitative long-term equity
portfolio manager. Hoffstein's background and demeanor prevented him from calling out Yan's
BS, which is fine because most good podcast hosts are credulous and agreeable; otherwise,
no one would go on their shows. Yan spouts many typical crypto/market maker
cliches among those trying to impress people who are vaguely familiar with the
issues. For example, when talking about his earlier trading experience, he said
he 'was surprised how inefficient markets were.' This is a great phrase because
it implies one was outsmarting people, an alpha generator, and it does exist,
so it is possible. <o:p></o:p></p>
<p class="MsoNormal">Yet, one should provide several good examples to demonstrate
you are more than just bloviating. In crypto, there was the famous Kimchi premium,
where coins traded at 10% in Asian countries. This inefficiency persisted
because it required trusted partners in the US and Japan or Korea to make the
trade, which is non-trivial. In any case, it was over by early 2018 and required
connections instead of savvy. Nonetheless, many Sam Bankman-Fried interviewers
were blown away by SBF's singular arbitrage example, presumably one of his many
clever trades. Looking back at Alameda's tax returns and the fact that most FTX
traders left FTX throughout 2018 (no bonus pool), this was likely his only
profitable trade outside of buying coins in the 2021 bubble with customer funds (see <a href="https://efalken.substack.com/p/ftxs-mythical-origin-story" target="_blank">here </a>for more).
Thus, we have FTX exec Sam Trabucco bragging about their other genius trade idea,
buying Doge when Elon Musk tweeted about it. The Kimchi premium was the only
inefficiency Yan mentioned on the podcast. <o:p></o:p></p>
<p class="MsoNormal">When Yan was asked about the difference between maker and
taker high-frequency strategies, Yan stated that a taker strategy might make
only one trade a day. An HFT taker strategy involves sniping the top of the
book before an LP can cancel. By definition, it can't do this to a large volume,
as the top of the book is not big. The edge is the spread at best. That's a
large amount of risk and capital, adding up to a couple of bucks per day. He
described a strategy that has never existed because it makes no sense: a
once-a-day HFT taker strategy. <o:p></o:p></p>
<p class="MsoNormal">Yan highlighted that Hyperlink's L1 can do things that
would otherwise be impossible and emphasized updating a perp account for hourly funding payments. This
is pointless. Given the horizon of perp traders—days, weeks—crediting their
accounts hourly instead of waiting until the position is closed is pointless. A
50% funding rate is a 1% potential boost for a week-long position, which would
be long for perps. No rational trader will be excited by having that trivial
amount accelerated into hourly payments. Again, this highlights Yan's cluelessness.
<o:p></o:p></p>
<p class="MsoNormal">Yan says he then decided to build an exchange on his own L1 because of the Impermanent Loss problem in AMMs. I agree that
Uniswap's AMMs are unsustainable because they lose more money to this expense,
but CLOBs on blockchains are not the solution. A fast L1 will still be slow because
the CEXs are centralized, and co-located servers can respond to exchange messages
within 5 microseconds. A centralized L1 is pointless, like a private permissioned
blockchain. With decentralization, you have geographic diversity among
validators, which takes you to 100 milliseconds if you restrict yourself to one
hemisphere. It will always be a price follower for coins listed on CEXs, so its market makers will be scalped just like they are on AMMs. However, their select market makers will make money, but not for the reasons they state. [As for the unlisted coins, there is no need for speed, as they
are less correlated with the big two that move secondary crypto coins around (ETH
and BTC). The only people who should be market making shit coins are their insiders]<o:p></o:p></p>
<p class="MsoNormal">The main problem with a dapp-specific L1 is that the chain validators
and the protocol are equal partners, as the gas and trade fees all support that
one dapp. The incentives of the DEX and L1 insiders are perfectly
aligned, so insider collusion is the default assumption. They probably give
insiders a latency advantage by giving them effective co-location, and prioritization in sequencing transactions within a block. However, as
officially a decentralized L1, this would be unacknowledged. As
LP cancellations are explicitly prioritized over trades, the Hyperlink insiders
can make consistent money-making markets, unlike in Uniswap. <o:p></o:p></p>
<p class="MsoNormal">Hyperlink conspicuously claims to be decentralized. Yet they
currently have centralized control over their L1 validators, bridge, their oracle, and whoever is running their primary
market-making strategy (currently working <i>pro bono</i> because that's what trustless anonymous
crypto insiders do!). They restrict IP access to avoid US regulators, which would not be possible on a genuinely decentralized dapp. While Binance and Bitmex almost
surely have insiders making their markets with privileged access, they at least
have the decency not to pretend these are decentralized exchanges. <o:p></o:p></p>
<p class="MsoNormal">Its disingenuous design encourages the worst in crypto,
which is saying something. For example, it wasn't until SBF created his
unregulated offshore exchange FTX that things took off for SBF. He claimed to
be trading $300MM/day when he approached VCs for funding in July 2019, though
you won't find more than a handful of mentions about their exchange on Reddit or
other forums where people talk about their crypto activities. FTX released a
White Paper on how many crypto exchanges were faking volume to boost interest,
which is a great way to learn about these tactics—and what not to do—and disarm
people who might accuse you of faking your trading metrics. As we now know, SBF
and his team were like <a href="https://www.cnn.com/2023/07/13/business/celsius-alex-mashinsky-charged-with-fraud/index.html#:~:text=US%20prosecutors%20charged%20the%20former,wire%20fraud%20and%20commodities%20fraud." target="_blank">Alex Mashinsky</a>, liars who emphasized their unique
integrity and decentralization, making them safer and morally superior to his
competitors. We should not be surprised that SBF and Mashinsky moved on to
stealing customer funds to gamble on shit coins because that's what liars do,
like the <a href="https://en.wikipedia.org/wiki/The_Scorpion_and_the_Frog" target="_blank">scorpion on the frog</a>; it's in their nature. <o:p></o:p></p>
<p class="MsoNormal">Their L1 does not have a native token, so it just takes USDC
collateral from Arbitrum to bridge to their chain. Users thus have the hacking risk
of the Arbitrum and Hyperlink bridge and worry about USDC censorship (if you
get flagged, your USDC is effectively zeroed out). With just their trusted version of USDC, the famously fraudulent perp finance rate is the only mechanism
that ties their perp prices to spot prices on off-chain assets. Yan mentioned this was discovered
in trad-fi, indicating he probably heard stories about how Nobel Laureate
Robert Shiller introduced a different version in 1991. He probably does not
realize that the Bitmex perp/spot funding rate mechanism is nothing like Shiller's
perpetual real-estate futures contract, which, in any case, never caught on in
trad-fi because it was fatally flawed. Many perps work fine without the
perp/spot funding rate ruse, highlighting its irrelevance. The perp funding
rate mechanism is just an excuse to comfort traders to believe these perp
prices are not mere Shelling points but are tied down by arbitrage (see <a href="https://efalken.substack.com/p/perp-funding-rates-dont-do-what-they" target="_blank">here </a>for more on that). <o:p></o:p></p>
<p class="MsoNormal"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIo8br5v6i3ZhSs32xSgugj3TGsh6yHeZKa2h79cd9cTrddem0MKvsA7ZPs-cUaDwMVI9WQo9V4sqm2xq55nArnmmmDrKlngXu7V47PzeyYCY_Qv_foJWdEz2KPHPE0k79m8ofDPJWgp0azYEP5b_CUY86fonT0cadW2RLcIoPmnp-LF55A0stVg/s258/hyp2.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="146" data-original-width="258" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIo8br5v6i3ZhSs32xSgugj3TGsh6yHeZKa2h79cd9cTrddem0MKvsA7ZPs-cUaDwMVI9WQo9V4sqm2xq55nArnmmmDrKlngXu7V47PzeyYCY_Qv_foJWdEz2KPHPE0k79m8ofDPJWgp0azYEP5b_CUY86fonT0cadW2RLcIoPmnp-LF55A0stVg/s1600/hyp2.png" width="258" /></a></div><br />If you go to Hyperliquid's Discord or search them on
YouTube, most of the content is focused on schemes to get free money via rewards,
giving them tokens from their airdrop. Everyone is wash trading to collect
points, as there are no fees or gas costs. There's also a referral program, and
I'm sure many have gamed that, as it's easy to create seemingly unrelated accounts
on the blockchain. Their fake trading is already twice that of Bitmex and ten
times that of GMX ($1B/day—heh). <o:p></o:p><p></p>
<span style="font-family: "Times New Roman",serif; font-size: 12pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Aptos; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">If you stick around for the airdrop, take your
money and run. </span>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-56132764587818171952024-02-13T21:03:00.022-06:002024-02-14T13:20:13.708-06:00Budish's Plan to Replace CLOBs<p>I don't keep up with the latest economics journals because I've
learned that very little of it is fruitful. Like many subjects, the basics are
valuable, but the marginal returns are small with the exponential rise in
academic output. We aren't in the golden age of economics if there ever was
one.</p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">Yet, I am still fond of economic models that illustrate a
point clearly and succinctly, and I stumbled across a model that applies to an
area where I have first-hand knowledge. I worked on high-frequency trading
algorithms to execute our hedges for an electronic equity-options market maker.
We were not at the bleeding edge of high-speed trading, so I am not privy to
the tactics used by Renaissance, etc., but no one from those firms will talk
about what they do anyway. If someone does talk about what they did, they are
invariably a smokescreen. <o:p></o:p></p>
<p class="MsoNormal">Further, many high-frequency clients want stupid things,
like different models for when the market is trending vs. staying in a range. This
is a stupid idea because if one knew we were in a trading range, there would be
better things to do than apply nuances to a VWAP algorithm. However, if
customers want to pay for it, you might as well sell it, and the best snake-oil
salesmen believe in their product. Thus, many great firms with access to the
best of the best employ deluded people to create and sell such products, useful
idiots. They often speak at conferences. <o:p></o:p></p>
<p class="MsoNormal">Experienced private sector people discussing bleeding-edge high-frequency
traders (HFTs) are generally deluded or deceptive. This leaves a hole filled by
people with no experience, like Michael Lewis. Thus, I am qualified as
anyone who will talk about these matters, even if I am not and have never
worked on a successful worm-hole arb-bot from New York to Tokyo. Indeed, one
might say my experience in HFT was a failure, as we couldn't compete, and I was
part of that. I haven't worked on that problem directly since 2013. However,
like a second-stringer, I can better appreciate what doesn't work, which is
easy to miss if you are making bank because you aren't constantly looking for
ways to fix things. <o:p></o:p></p>
<p class="MsoNormal"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape alt="A person in a blue shirt
Description automatically generated" id="_x0000_i1040" style="height: 235.5pt; mso-wrap-style: square; visibility: visible; width: 290.25pt;" type="#_x0000_t75">
<v:imagedata o:title="A person in a blue shirt
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal"></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj63qz_QRYsI_8jwAF6yX1wXE3FMXtl1iYcD61J5XEhcm7jB0mSlFvdLBszpgjLjKyJCeuWltYoFlVn3WjWeXAux0FLT952YvresYRDQyIKncqKna1J6D79nTQuSI7BSaA-wQSPlx1bhldITbz5IfNoy_mEmZUJxTHYwc18YNZ2KehldrRiqcajHQ/s250/a.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="203" data-original-width="250" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj63qz_QRYsI_8jwAF6yX1wXE3FMXtl1iYcD61J5XEhcm7jB0mSlFvdLBszpgjLjKyJCeuWltYoFlVn3WjWeXAux0FLT952YvresYRDQyIKncqKna1J6D79nTQuSI7BSaA-wQSPlx1bhldITbz5IfNoy_mEmZUJxTHYwc18YNZ2KehldrRiqcajHQ/w212-h173/a.png" width="212" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Budish at a16z</td></tr></tbody></table><br />Eric Budish is a professor at the University of Chicago and
the coauthor of several papers on 'hedge fund sniping' on limit order books,
most conspicuously <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2388265">Budish,
Cramton, and Shim (2015)</a>, and <a href="https://www.bis.org/publ/work955.pdf">Aquila,
Budish, and O'Neill (2022)</a>. I do not want to dismiss his coauthors or put all
the blame on Budish, but for simplicity, I will present this work as being
Budish's singular work. This work has been popular, as it was mentioned in the
press, sponsored by significant financial regulators like the FCA and BIS, and
was the basis for talks last year at the NBER (<a href="https://www.youtube.com/watch?v=gDXVaqC4G4g">here</a>) and the crypto VC
a16z (<a href="https://www.youtube.com/watch?v=OwQjTedWSUM">here</a>). <o:p></o:p><p></p>
<p class="MsoNormal">His work highlights the best and worst parts of economics. He
presents a model that highlights the assumptions required, the mechanism, and
then tries to support it with data. That makes it subject to rational
criticism, unlike most work in the social sciences. On the bad side, it follows
in a tradition from Frederick Taylor, the original McKinsey/Harvard MBA, who
wrote about Henry Ford's assembly line as if his analytical approach was relevant to a famous business method (assembly line) and generated insights into other areas.
It doesn't. <o:p></o:p></p>
<p class="MsoNormal">Budish's big insight is that a profound flaw in Centralized
Limit Order Books (CLOBs) generates a deadweight loss. When HFTs compete on
CLOBs, they often engage in speed races that inflict costs on LPs (aka,
liquidity providers, market makers). What is new is that this form of adverse
selection is not generated by asymmetric information but by the nature of the
CLOB. If the top HFTs are within a Plank-length of each other as far as the
exchange is concerned, the fastest is arbitrarily chosen. However, in
high-frequency trading, the fastest wins, and the losers get nothing (a Glenn Gary-Glenn
Ross tournament). <o:p></o:p></p>
<p class="MsoNormal">An HFT would only snipe the best bid or offer if it made
them money, and for HFTs, this is a zero-sum game, so the poor liquidity
provider suffers losses. While the LP can try to cancel, he is one, and those
who are not him are more than one, so when thrown into the micro-second blender
behind an exchanges gateway, the LP will lose the race to cancel before he gets
sniped. In equilibrium, the LP passes that cost off to customers. <o:p></o:p></p>
<p class="MsoNormal">His solution is to replace the continuous limit order book
with one with discrete auctions. This allows players to compete on price instead
of time because, in each period, they will all be represented, not just the
first one, and the snipers will compete away the profit that was generating a
loss for the LP. <o:p></o:p></p>
<h3 style="text-align: left;"><b>Primer on Adverse Selection</b></h3>
<p class="MsoNormal">In standard models of LPs, there is the LP who sets bids and
offers. He will buy your shares for 99 and sell them to you for 101, a
two-sided market. Liquidity traders come along and buy at 101 and sell at 99.
If we defined the spread as the difference between the bid and ask (101 – 99),
the LP's spread is 2; his profit is spread/2, or the price relative to the mid.
The LP's profit transacting with liquidity traders is the number of shares he
trades times half the spread. <o:p></o:p></p>
<p class="MsoNormal">There are also informed traders with private information
about the value of their assets in the future. This also goes by the phrase
adverse selection because conditional upon trading, the LP loses money with
informed traders. These LPs trades are selecting trades that are adverse to their
bottom line. <o:p></o:p></p>
<p class="MsoNormal">But, the nice thing is that the informed traders discipline
the LP, setting the price at its true market clearing price. Liquidity traders
pay a fee to the LP via the spread for the convenience of instant
transformation from cash into asset or vice versa. The LP has to balance the
profits from the liquidity traders with the losses to the informed traders so
that the benefits of liquidity traders offset the costs of adverse selection.<o:p></o:p></p>
<p class="MsoNormal">If we assume profits are zero, the greater the adverse
selection, the greater the spread, but this is a real cost, so such is life. Information
is costly to aggregate when dispersed unevenly across an economy. However, to
the degree we can lower asymmetric information, we can lower the spread. In
Budish's model, his toxic flow is not informed, just lucky, but the gist is
that these traders are imparting adverse selection costs onto LPs just like
informed traders in previous models. <o:p></o:p></p>
<h3 style="text-align: left;"><b>Budish, Cramton, Shim model</b></h3>
<p class="MsoNormal">I will simplify the BCS model to make it easier to read by removing
notation and subtleties required in an academic journal but a distraction for
my purposes. Hopefully, I will capture its essence without omitting any crucial
subtleties. Let us define S as the spread, so S/2 is half the spread. This is
the profit the LP makes off liquidity traders.[eg, if bid-ask is 99-101, the
spread is 2 and S/2 is 1, so the profit per trade is 1].<o:p></o:p></p>
<p class="MsoNormal"> Let us define J as
the absolute size of the price change that is revealed to the HFTs, a number
larger than S/2. It can be positive or negative, but all that matters for the LP
is its size relative to S/2, because the profit for the sniping HFT will be J –
S/2 (eg, buys at p+S/2, now worth p+J, for a profit of J – S/2) and the LP
loses (J <span style="font-family: Symbol; mso-ascii-font-family: "Times New Roman"; mso-char-type: symbol; mso-hansi-font-family: "Times New Roman"; mso-symbol-font-family: Symbol;">-</span>
S/2). In the following trade, either J is revealed, a jump event, or it is not,
and the liquidity trader trades. If the liquidity trader trades, the profit is
S/2.</p><p class="MsoNormal"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiadRz4eHmOXEwtKEe0xmjSYNIm_-KKnzuB_dxTrlGrOh_l_EkFC9cJb-Bvz2jKEJVR026KGhVJOurN0rOi_cgByegPcTlbnMCoo7TzCe0sqVShnebaawAmJ_Tjj6X_s_I4A-jYYCQn8-P3kp6OXNm0DpI31ZTT1o0x5pk9Q5UcTBVsCr3hJagMdw/s350/b.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="137" data-original-width="350" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiadRz4eHmOXEwtKEe0xmjSYNIm_-KKnzuB_dxTrlGrOh_l_EkFC9cJb-Bvz2jKEJVR026KGhVJOurN0rOi_cgByegPcTlbnMCoo7TzCe0sqVShnebaawAmJ_Tjj6X_s_I4A-jYYCQn8-P3kp6OXNm0DpI31ZTT1o0x5pk9Q5UcTBVsCr3hJagMdw/w296-h116/b.png" width="296" /></a></div><p></p>
<p class="MsoNormal"><v:shape alt="A math equation with black text
Description automatically generated with medium confidence" id="_x0000_i1039" style="height: 129pt; mso-wrap-style: square; visibility: visible; width: 330pt;" type="#_x0000_t75">
<v:imagedata o:title="A math equation with black text
Description automatically generated with medium confidence" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image002.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">The next trade will come from a liquidity trader or a
sniper. As the probability of the sum is 1, we can simplify this to being
prob(jump) and 1-prob(jump). Assume there are N HFTs; one decides to be an LP, and
the others decide to be snipers, picking off the LP who posts the resting limit
orders if a jump event occurs. All of the HFTs are equally fast, so once their
orders are sent to the exchange's firewall for processing, it is purely random
which order gets slotted first. Thus, the sniper's expected profit each period
is</p><p class="MsoNormal"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3xA16azbjOd9BU9BaSXwF5k5Ory7O5jEMaxq9_PHiaa9Z79ZNoKFj5zp9tV9oSff9Q1H9Vly0UIWN52SGbxx-LPrudnYHzdn95iLeXhOA8tUKbIBVkfxX-u9RONketC0iTNaofP2HwL2zeoReBmeNfXCFvoC11T7iIn2uYRvH_1Ga4aiKx9eWgg/s350/c.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="74" data-original-width="350" height="57" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3xA16azbjOd9BU9BaSXwF5k5Ory7O5jEMaxq9_PHiaa9Z79ZNoKFj5zp9tV9oSff9Q1H9Vly0UIWN52SGbxx-LPrudnYHzdn95iLeXhOA8tUKbIBVkfxX-u9RONketC0iTNaofP2HwL2zeoReBmeNfXCFvoC11T7iIn2uYRvH_1Ga4aiKx9eWgg/w269-h57/c.png" width="269" /></a></div><p></p>
<p class="MsoNormal">That is, the probability of getting a signal, Pr(jump),
times the profit, J – S/2, times the probability the sniper wins the lottery
among his N peers.</p>
<p class="MsoNormal">For the LP, the main difference is that he only loses if the
other HFTs snipe him. He tries to cancel, avoiding a loss and making zero. We
can ignore that probability because it is multiplied by zero. But the
probability he loses is (N-1)/N. This is the crucial point: The upside for snipers
is small per sniper, as it is divided by 1/N, but it is large for the LP,
multiplied by (N-1)/N. To this loss, we add the expected profit from the
liquidity traders. The profitability of the LP is thus</p><p class="MsoNormal"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2L06bIyOn3x0GeMoelu5lLqz6pICksjfrvXbAmwU4MihAD3Y7T7dL4GzBvUV8Eb806Bl2L9VjfhL7T-iAV1T8feV4k3HZWrODVK-cdqZjh3Mr6UMgFCn23d7-gYUJCBeWAfIQ4wy-c227pRg5U3d-PXgXKSc5nlcOLPmIEpu5DX3xJi-IV-XlFA/s500/d.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="58" data-original-width="500" height="37" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2L06bIyOn3x0GeMoelu5lLqz6pICksjfrvXbAmwU4MihAD3Y7T7dL4GzBvUV8Eb806Bl2L9VjfhL7T-iAV1T8feV4k3HZWrODVK-cdqZjh3Mr6UMgFCn23d7-gYUJCBeWAfIQ4wy-c227pRg5U3d-PXgXKSc5nlcOLPmIEpu5DX3xJi-IV-XlFA/s320/d.png" width="320" /></a></div><p></p>
<p class="MsoNormal">The HFT chooses between being a sniper or an LP, where only
one can be an LP. In equilibrium, the profitability of both roles must be
equivalent.<o:p></o:p></p>
<p class="MsoNormal"><v:shape id="_x0000_i1036" style="height: 45.75pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSl29bJjAfdKDrum4e93nSvqvXrHqo-DGEwpyM-fAS1PXarKKrdmzqwQTl_iGaXaIQ8v0B3ieh2te2bGD39mrujLqobG0ziG-r3BTLiIYVDdl-PmVg3lcBMcnf6jFrOwQ5FaMJL1HjY_AjoB3iDiLpsXJajpxJpBi60i90lv_Rr4piRtoYMjZ_Cg/s550/c3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="47" data-original-width="550" height="37" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSl29bJjAfdKDrum4e93nSvqvXrHqo-DGEwpyM-fAS1PXarKKrdmzqwQTl_iGaXaIQ8v0B3ieh2te2bGD39mrujLqobG0ziG-r3BTLiIYVDdl-PmVg3lcBMcnf6jFrOwQ5FaMJL1HjY_AjoB3iDiLpsXJajpxJpBi60i90lv_Rr4piRtoYMjZ_Cg/w441-h37/c3.png" width="441" /></a></div><p></p>
<p class="MsoNormal">Solving for S, we get<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivYjpRstYP24weJIYx8y3kGjVRm46HMrC2ygxRfDE7tl4PL1IH3nZpMgj2h1FuWK99uEnSXh-GJNyMTodlmPAcvSahN5gdmiWMKJBmwtgtfjiKBFaEg1Nsh6qBcinQHow-rIpv4hEfvac-FEjKiKdleEVSFjpub2FzZ2f_lrFka8q_BUXRB79W1A/s250/f.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="52" data-original-width="250" height="41" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivYjpRstYP24weJIYx8y3kGjVRm46HMrC2ygxRfDE7tl4PL1IH3nZpMgj2h1FuWK99uEnSXh-GJNyMTodlmPAcvSahN5gdmiWMKJBmwtgtfjiKBFaEg1Nsh6qBcinQHow-rIpv4hEfvac-FEjKiKdleEVSFjpub2FzZ2f_lrFka8q_BUXRB79W1A/w198-h41/f.png" width="198" /></a></div>
<p class="MsoNormal"><v:shape alt="A black text on a white background
Description automatically generated" id="_x0000_i1035" style="height: 34.5pt; mso-wrap-style: square; visibility: visible; width: 162.75pt;" type="#_x0000_t75">
<v:imagedata o:title="A black text on a white background
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image006.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">The profit should be zero in the standard case with perfect
competition and symmetric information. The spread is positive even with
symmetric information because the lottery is rigged against the LP. It seems we
could devise a way to eliminate it, as it seems inefficient to have liquidity
traders pay a spread when no one here is providing private or costly
information. The 'hedge fund sniping' effect comes from the race conditions, in
that any poor LP is exposed to losses in a jump event, as there are more
snipers (N-1) than LPs (1). <o:p></o:p></p>
<p class="MsoNormal">When you add the costs of speed technology, such as the
Chicago-New York fiber optic tunnel, these HFTs must recover this cost, which adds
another nice result in that speed costs increase the spread. Now, we have the
profitability of the sniper after investing in technology. Here, we will set
the profitability of the sniping HFTs to zero.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjtnrL9EXDew5FG-LaOQdaXADji09dW0m-cnzddC6IGYPSCo7Baub_XvK_YwB91mIGo8lxFqhkWvhKHfPEQiwXLUS6WWBLw-WTvvhKMhItzHvPR2t5vr12WaXXn4VitCmIoK_kLV1W4v749c7ffNY2BEK4adZ_DeZF9F_4XKsSRUDR6AVOZdyAQ/s350/h.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="56" data-original-width="350" height="51" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFjtnrL9EXDew5FG-LaOQdaXADji09dW0m-cnzddC6IGYPSCo7Baub_XvK_YwB91mIGo8lxFqhkWvhKHfPEQiwXLUS6WWBLw-WTvvhKMhItzHvPR2t5vr12WaXXn4VitCmIoK_kLV1W4v749c7ffNY2BEK4adZ_DeZF9F_4XKsSRUDR6AVOZdyAQ/s320/h.png" width="320" /></a></div><p class="MsoNormal">This implies</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqYtMug5vcgOVY7FpPZj5Hm-uDIHrd-mwz_3TNZz-uhAp0IP1NzmyeJ025rYCzOC_AzNzIgmjm6Q3ZOvyDRyJwM5TWYlG_sucWqRJqcmoU6ZAyXPYwQmpfFYzYt-attVSEfdvHg6fRruyzTmS7Kivcqyb-VUucXxoLGZUPXZ2RC0GmUkDw_wvDvg/s350/i.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="89" data-original-width="350" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqYtMug5vcgOVY7FpPZj5Hm-uDIHrd-mwz_3TNZz-uhAp0IP1NzmyeJ025rYCzOC_AzNzIgmjm6Q3ZOvyDRyJwM5TWYlG_sucWqRJqcmoU6ZAyXPYwQmpfFYzYt-attVSEfdvHg6fRruyzTmS7Kivcqyb-VUucXxoLGZUPXZ2RC0GmUkDw_wvDvg/w218-h55/i.png" width="218" /></a></div>
<p class="MsoNormal"><v:shape alt="A black and white math equation
Description automatically generated" id="_x0000_i1033" style="height: 54pt; mso-wrap-style: square; visibility: visible; width: 210.75pt;" type="#_x0000_t75">
<v:imagedata o:title="A black and white math equation
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image008.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">Now we take the equilibrium condition that the profitability
of the sniper equals the profitability of the LP<o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHuBZY0gCbnDsWiKzvF7XasF3gXH5oO5_UAeZj1grMf5Yw17wB9J2Os5HifwpGblELj0hJl8oY_VQYBXPl7qqqbVXBU8gIHwtab-6gDqKF2sVyCPYydm0B824hrCiMigbUiqBIBM58GHuF3ZWD1TsTSCuFZ4BGEppO1cGIiW5BEr44lTAqBlpQhw/s600/prJump2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="50" data-original-width="600" height="44" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHuBZY0gCbnDsWiKzvF7XasF3gXH5oO5_UAeZj1grMf5Yw17wB9J2Os5HifwpGblELj0hJl8oY_VQYBXPl7qqqbVXBU8gIHwtab-6gDqKF2sVyCPYydm0B824hrCiMigbUiqBIBM58GHuF3ZWD1TsTSCuFZ4BGEppO1cGIiW5BEr44lTAqBlpQhw/w524-h44/prJump2.png" width="524" /></a></div>
<p class="MsoNormal"><v:shape id="_x0000_i1032" style="height: 36.75pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image009.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">And while the c cancels out, we can replace Pr(jump)*(J – S/2)
with C*N to get</p><p class="MsoNormal"><o:p></o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5POCvBrJn0UTgbJE0s8WbD3gJAep7z-_OYqcyBUquZTuCorCeXYZ9JvxdkXNI7dH7uCsHPWB0nGh5GuFgsfAhJ1YtkKOsUb5GPHmOro-EbXCQTQ5iu-oWLW4JPMSXxxTVuk4uff9rdtwflstf5YDjN-Eborq2_X5WbG6fc9WAYeJ_5Jy9Aph5jg/s200/k.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="60" data-original-width="200" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5POCvBrJn0UTgbJE0s8WbD3gJAep7z-_OYqcyBUquZTuCorCeXYZ9JvxdkXNI7dH7uCsHPWB0nGh5GuFgsfAhJ1YtkKOsUb5GPHmOro-EbXCQTQ5iu-oWLW4JPMSXxxTVuk4uff9rdtwflstf5YDjN-Eborq2_X5WbG6fc9WAYeJ_5Jy9Aph5jg/w182-h55/k.png" width="182" /></a></div><p></p>
<p class="MsoNormal">In this case, the N is endogenous and would depend on the
function c, so the spread is not exactly a linear function in c. Given the
various flaws in this model discussed below, elaborating this result is not
interesting. The main point is that S is positively related to C, which is
intuitive. Again, even in the absence of asymmetric information, we have a
large spread that seems arbitrary, which seems like an inefficiency economists
can solve.</p>
<h3 style="text-align: left;"><b>Data</b></h3>
<p class="MsoNormal">Budish presents two sets of data to support his model. In
2014, he noted the occasional crossing of the SP500 futures (ES) in Chicago
with the SPY index traded in New York. This arbitrage is famous because there
have been a few times when HFTs spent hundreds of millions of dollars creating
straighter lines between Chicago and New York, getting the latency down from 16
to 13 to 9, and currently, with microwaves, we are at five milliseconds. I don't
think it's possible to get it down further, but weather can affect microwaves,
so perhaps there is still money to be spent. In any case, it's a conspicuous
expenditure that seems absurd to many. <o:p></o:p></p>
<p class="MsoNormal">There's a slight difference in the futures and the SPY ETF,
but this is stable and effectively a constant over the day. The bottom line is
that the correlation is effectively perfect over frequencies greater than a day.
Over shorter durations, however, the correlations have been rising, and the
correlation at one nanosecond has and will always be zero because the speed of
light sets a lower bound on how quickly information can travel between Chicago
and New York of 4ms. One can imagine various reasons why the markets could
become disentangled briefly. Thus, when we look at prices over 250-millisecond
intervals, there were periods, almost always less than 50 milliseconds, where
it was possible to buy futures and sell the ETF for an instant profit. This did
not happen frequently, but it generated arbitrage profits when it did. <o:p></o:p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENbm3JoZhYjsXO-bJbQJK-IQDsM75U21_p8vBf8oawCNvhQcDddmptgGICFPiaH5NaQYy_WE0caBhI-kZ5ZtI4MZEfBtrwT3hEPKPqfqiBlKD6f2qCYndgUaoV2kh45-0S4qa5lBQ0V22JAmgXURspQ8qQ93fkqT1POytMsQdUYmYNSE-vCxmRw/s500/l.png" style="margin-left: auto; margin-right: auto;"><img alt="ES vs. SPY over 250 ms" border="0" data-original-height="360" data-original-width="500" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjENbm3JoZhYjsXO-bJbQJK-IQDsM75U21_p8vBf8oawCNvhQcDddmptgGICFPiaH5NaQYy_WE0caBhI-kZ5ZtI4MZEfBtrwT3hEPKPqfqiBlKD6f2qCYndgUaoV2kh45-0S4qa5lBQ0V22JAmgXURspQ8qQ93fkqT1POytMsQdUYmYNSE-vCxmRw/w320-h230/l.png" title="ES vs. SPY over 250 ms" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">ES vs. SPY over 250 ms</td></tr></tbody></table>
<p class="MsoNormal"><v:shape alt="A graph of a graph
Description automatically generated" id="_x0000_i1030" style="height: 261pt; mso-wrap-style: square; visibility: visible; width: 361.5pt;" type="#_x0000_t75">
<v:imagedata o:title="A graph of a graph
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image011.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">Buddish assumes traders can buy and sell the other whenever
these markets cross for more than 4 milliseconds. In his 2015 paper, his data
sample of 2005-2011 generated an average of 800 opportunities per day for an average
profit of $79k per day. <o:p></o:p></p>
<p class="MsoNormal">In 2020, he presented data on the London Stock Exchange
stocks and used it to estimate latency races cost investors $5B a year
worldwide. It made quite a splash and was picked up by many prominent media
outlets such as the <a href="https://archive.ph/5RWLX">Financial Times</a>, <a href="https://www.wsj.com/articles/ultrafast-trading-costs-stock-investors-nearly-5-billion-a-year-study-says-11580126036">Wall
Street Journal</a>, and <a href="https://www.cnbc.com/2020/01/27/latency-arbitrage-trading-costs-investors-5-billion-a-year-study.html">CNBC</a>.
Unlike the ES-SPY data, this one does not involve strict arbitrage but
statistical arbitrage. Using message data from 40 days from the LSE in the fall
of 2015, they can see trades and cancellations and those transactions that were
not executed because they were late. This gets at the cost of latency. Budish
highlights that he can isolate orders sent at approximately the same time, where
one order was executed merely due to chance, and all the others miss out. More
importantly, the limit orders are sniped by the faster trades (which can be
limit or IOC, immediate or cancel, orders that take liquidity), which is the
essence of the BCS model. <o:p></o:p></p>
<p class="MsoNormal">He isolated clusters of orders within 500 microseconds, or
0.5 milliseconds, that targeted the same passive liquidity (quantity &
price). Most data involved 3 trades, but only 10% included a cancel. As a
failed take order implies no more quantity at this price, these were all
relevant to taking out a small queue. For example, here's a hypothetical case
where there is a small limit to buy at 99 and a larger offer to sell at 103,
for a midprice of 101.</p>
<p class="MsoNormal"><v:shape alt="A comparison of a graph
Description automatically generated with medium confidence" id="_x0000_i1029" style="height: 191.25pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="A comparison of a graph
Description automatically generated with medium confidence" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image012.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaHkWBKkfA0IS9BHehrh8hqi7jHUcIViaqD1vEzowRrSaFOd4noUkbDNjkNEwm6xC_UkMur3YVwbYYhVGp4hkm6Ffvxc6Kctj-pb4thUd1O8X13c981eVJXfdsbhCXc87cSrLOlwTw4M3M8CtF8AAjGgbQicKNoDAjZiOhKoEPDYvQk6JJO1QUYw/s500/m.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="205" data-original-width="500" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaHkWBKkfA0IS9BHehrh8hqi7jHUcIViaqD1vEzowRrSaFOd4noUkbDNjkNEwm6xC_UkMur3YVwbYYhVGp4hkm6Ffvxc6Kctj-pb4thUd1O8X13c981eVJXfdsbhCXc87cSrLOlwTw4M3M8CtF8AAjGgbQicKNoDAjZiOhKoEPDYvQk6JJO1QUYw/w342-h140/m.png" width="342" /></a></div><br /><p></p>
<p class="MsoNormal">Note that if the sniper takes out the limit order to buy at
99, he sells below the midprice before and after the trade. As the sniper is
selling here, they define 'price impact' as how much the mid moves after the
trade in the direction of the trade, here, +1 unit; he pushes the price down by
1. The 'race profit' compares the trade price to the after-trade mid; in this
case, it is -1 unit because the selling price of 99 is one unit below the new
midprice of 100; his profit is -1.<o:p></o:p></p>
<p class="MsoNormal">A case where the sniper would profit could look like the
figure below. Here, the sell moves the mid down by 2 in the direction of the
trade for a price impact of +2. The race profit here is positive, as
the sniper sold for 101, which is +1 over the new midprice.</p>
<p class="MsoNormal"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3g1DPAGu6Bt5QehiT9g5GfFZoxA-5XYj6BV_b5C7wfAj_gyehzIB4ZMbhT_b4gDITpUwTyiaJfA6gauHp6smVbJ43kCoQnQWufSykpE0iUWjVqTQCKoyP8bwnmo-wtoNZgnXJg1oIk5z8X1Ou63MYNE3WC3XFecVsMGvT4wbX4J_f1nnrLqCMvg/s500/n.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="205" data-original-width="500" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3g1DPAGu6Bt5QehiT9g5GfFZoxA-5XYj6BV_b5C7wfAj_gyehzIB4ZMbhT_b4gDITpUwTyiaJfA6gauHp6smVbJ43kCoQnQWufSykpE0iUWjVqTQCKoyP8bwnmo-wtoNZgnXJg1oIk5z8X1Ou63MYNE3WC3XFecVsMGvT4wbX4J_f1nnrLqCMvg/w344-h141/n.png" width="344" /></a></div><br /><p></p>
<p class="MsoNormal"> By definition, the
price impact will be positive because it takes out the best bid or offer. If
the best bid or offer remained, the sniper would not win the race, as there
would be no loser. <o:p></o:p></p>
<p class="MsoNormal">Applied to their set of 40 days on liquid LSE stocks, they
estimate these latency races are involved in 20% of all LSE volume. So, while
they only last 79 microseconds, they apply to 1000 trades per ticker daily. They
estimate an average race profit of 0.5 basis points on a set of stocks where
the average spread is 3.0 basis points. Applying that to all stocks traded
generates $5B. <o:p></o:p></p>
<h3 style="text-align: left;"><b>Criticisms</b></h3>
<p class="MsoNormal">I sense that no one criticizes this work much because it's a
parochial problem involving data that requires money and a lot of time. As even
economists specialize, and many do not examine CLOBs, they ignore the Murray Gell-Mann amnesia effect, so Michael Lewis's Flash Boys informs even academic economic opinion
on this issue, as evidenced by Budish's frequent mention. The SBF debacle
highlighted Lewis doesn't have the discernment to realize when he is dealing
with complete frauds whose primary business was making markets, which should hopefully
warn economists not to take Flash Boys seriously when trying to understand
modern markets.<o:p></o:p></p>
<h4 style="text-align: left;"><b>Either/Or vs. Both/And</b></h4>
<p class="MsoNormal">My first issue is where the HFTs sort themselves into two
roles: ex-ante, one chooses to be the liquidity provider, the others as stale-quote
snipers. Most HFTs run a combo strategy of sniping and LPing. If we look at the
scenario he outlines as sniping at the LSE, we can see that they are sniping aggressive
quotes. An aggressive quote is essential for getting to the top of a queue and
making money as an LP. <o:p></o:p></p>
<p class="MsoNormal">Generally, a resting order at the top of the queue has a positive
value, while one at the bottom does not. Investing in speed infrastructure is
the only way to get to the top of the queue. Consider the LOB below. Here, the
top of the bid queue is in yellow at a price of 98. That queue position has a
positive value. At the end of the queue, the position in dark blue generally
has a negative value. While there are various scenarios where it pays to stay
at the end, the bottom line is that you generally want to get to yellow, but to
do so implies one first takes a stab at a new, aggressive level. The yellow ask
at the price of 102 is how that happens.</p>
<p class="MsoNormal"><v:shape id="_x0000_i1027" style="height: 209.25pt; mso-wrap-style: square; visibility: visible; width: 251.25pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image014.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaqZoXEKm1sEQcbcHunGJ9mn0dfJgZCAJZuv2RydF7dv3pjSVJISA4UmHU-Fx4SRs2YwVefbQyYioc5raZY79Nat88BdufjT2jmVEDiL5eOvhYOjeCQhjE4WqWmLLgQ4alqKfdk-xCcOdKTXUtDEG9q37Cc6zkjwdggML9wpX36rtyy2Q_lizKvQ/s350/o.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="350" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaqZoXEKm1sEQcbcHunGJ9mn0dfJgZCAJZuv2RydF7dv3pjSVJISA4UmHU-Fx4SRs2YwVefbQyYioc5raZY79Nat88BdufjT2jmVEDiL5eOvhYOjeCQhjE4WqWmLLgQ4alqKfdk-xCcOdKTXUtDEG9q37Cc6zkjwdggML9wpX36rtyy2Q_lizKvQ/w283-h236/o.png" width="283" /></a></div><br /><p></p>
<p class="MsoNormal">As noted in their paper on the LSE, the top 3 firms win
about 55% of races and lose about 66% of races. The figures for the top 6 firms
combined are 82% and 87%. Thus, getting to the top of a queue with
several LPs is an important and probabilistic game. Budish did not look at those
races. It seems they would most likely be competing for queues and, if they
lose, sniping those queues. Both rely on a sizeable specialized investment. <o:p></o:p></p>
<p class="MsoNormal">Only a handful of firms are playing this game on the LSE in Budish's
data, and they are playing with each other. To the extent the stale quotes are
from other HFTs, they are playing a zero-sum game among themselves. However, likely,
these stale quotes are usually from non-HFTs, such as retail traders with their
E-Trade platforms. That most stale quotes are not in the HFT club is consistent
with the fact that only 10% of Budish's data included cancel orders.<o:p></o:p></p>
<p class="MsoNormal">Even if we assume the sniping only affects fellow HFTs, the latency tax disappears when we think of them probabilistically sniping or posting resting limit orders. Assume each of N HFT traders has a 1/N chance of sniping
the newest bid-ask level, which is necessary for getting to the top of the next
queue, the cost of sniping cancels out. That is, there are two symmetric
probabilities applied here, one to becoming the lead on a new tick, the other reacting
to the jump event. The resulting equilibrium equation (without c) is just<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQFqKAVjpu5YjX4LHWSD4NBxEBoAAMjf48nJJe5n4Nlg0XsTBnYJq7tpJ3wFobrLFQ2G8UhNr3SmIv__FCyGvgfJpBR1eYtjhYo1YCMhcKRsZBXH67yhX9MtTDbnntBj2a4Iq10ABczqtoGPKt7IwlP0PChObtEirD0yK9HZbB7qAQh8Kqu5JfcQ/s700/hft2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="56" data-original-width="700" height="46" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQFqKAVjpu5YjX4LHWSD4NBxEBoAAMjf48nJJe5n4Nlg0XsTBnYJq7tpJ3wFobrLFQ2G8UhNr3SmIv__FCyGvgfJpBR1eYtjhYo1YCMhcKRsZBXH67yhX9MtTDbnntBj2a4Iq10ABczqtoGPKt7IwlP0PChObtEirD0yK9HZbB7qAQh8Kqu5JfcQ/w570-h46/hft2.png" width="570" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p>
<p class="MsoNormal"><v:shape id="Picture_x0020_1" o:spid="_x0000_i1026" style="height: 38.25pt; mso-wrap-style: square; visibility: visible; width: 468pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image015.png">
</v:imagedata></v:shape><o:p></o:p></p>
<p class="MsoNormal">So, when providing liquidity, the probability of getting
sniped is (N-1)/N, but now this is multiplied by the probability of being on
the new aggressive bid, 1/N; the probability of winning the snipe is 1/N, which
is now multiplied by the probability of being a sniper, (N-1)/N. This cancels
out the cost from the latency race, so it need not be passed off to liquidity
traders via a spread. S=0. </p>
<p class="MsoNormal">BCS states that it does not matter whether one always
chooses to be the liquidity provider or they chooses so stochastically. I suspect
they think it does not matter because the expected profit of posting liquidity
and sniping is equal in equilibrium. However, that assumes the HFTs make a
fresh decision as if they were certain to become the top of the next queue. In
practice, they will have to try to be the lead LP on a queue, and their success
will be stochastic, so they evaluate the LP and sniping role as a package deal
and apply probabilities to both roles instead of in isolation. <o:p></o:p></p>
<h4 style="text-align: left;"><b>Misspecified Objective Function</b></h4>
<p class="MsoNormal">Another issue is that sniped quotes are assumed to be losses
by marking them relative to a future mid-price. This would be true for a pure
LP/sniper; however, many HFTs can provide complementary services like
implementing VWAP trading algos for large buy-side clients. <o:p></o:p>A VWAP strategy does not simply cross the spread or jump on the best bid-offer, but employs both tactics when they find either attractive. It can include posting aggressive bids that are immediately taken or taking new aggressive bids as an alternative to merely crossing the spread. A resting order subject to HFT sniping leans on HFT liquidity; these other HFTs assist the LP in efficiently implementing their VWAP strategy.</p>
<p class="MsoNormal">An HFT is in a good position to sell $X of Apple stock at
tomorrow's VWAP plus a fee that covers the expected trading fees, price impact,
and spread. They profit if they can implement that strategy at a lower cost. Thus,
a subset of an HFT's orders may target minimizing trading costs instead of
making a profit. How much of an HFT's limit order trading involves this
complementary tactic? Who knows, but the fact that Budish has offered no
estimate or even mentioned it is a significantly omitted variable. <o:p></o:p></p>
<h4 style="text-align: left;"><b>Sequential 100 ms Auctions are Complicated</b></h4>
<p class="MsoNormal">As for the alternative, frequent batch auctions held every
100 ms, this is a solution only an academic could love. The current system
works very well, as evidenced by the dramatic reduction in spreads and fees
since electronic market making arose (no thanks to academics, except Christie
and Schultz). <o:p></o:p></p>
<p class="MsoNormal">The novel gaming strategies created by this mechanism are
not well specified. The model does not even consider the standard case where
trades happen on large queues, which is most of the time. One could easily
imagine an endgame like the California Electricity market debacle circa 2000-2001,
where a poorly implemented auction market was gamed, revealed, and then everyone
blamed 'the market.'<o:p></o:p></p>
<p class="MsoNormal">Could LPs keep tight markets across instruments and market
centers if matching were queued and pulsed like a lighthouse? All
exchanges would have to become frequent batch auctions and have the auctions synchronized
within 1 ms for the discrete-time auction model to work. The Solana blockchain,
which tries to synchronize at a 100-fold higher latency, goes down frequently.
On the world equity market, such failures would generate chaos.<o:p></o:p></p><h4><b>The Randomizer Alternative</b></h4><p class="MsoNormal">In BCS, they briefly address the alternative mechanism, adding randomized delay. They note it does not affect the race to the top. However, it affects the amount they should be willing to pay for speed. For example, if new orders added a delay of 0 to 100 ms, the benefits of shaving 3 ms off the route from Chicago to New York would be negligible, as it would increase one's chance of winning a latency race by a mere 1% as opposed to 100%, reducing the benefit 100-fold. In their own model, eliminating these investments directly lowers the spread. If one had to change CLOBs to reduce the allure of wasteful investments in speed, this would be a much simpler and safer approach.</p>
<h4 style="text-align: left;"><b>Talk about Stale Data</b></h4>
<p class="MsoNormal"><v:shape alt="A person holding a phone to his ear
Description automatically generated" id="Picture_x0020_2" o:spid="_x0000_i1025" style="height: 111pt; mso-wrap-style: square; visibility: visible; width: 149.25pt;" type="#_x0000_t75">
<v:imagedata o:title="A person holding a phone to his ear
Description automatically generated" src="file:///C:/Users/Eric/AppData/Local/Temp/msohtmlclip1/01/clip_image016.jpg">
</v:imagedata></v:shape></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6PgrIV9iB4eMOLoPD1kUjVuEoSWb38H2o6gQJGtd5uTKmbhupiC5-8vDMrkQWUyshz1-fa6MkXLOU8e8ybQTo87aqtudWe4FmGqcyie9499zY37ARjWJ5B8gI1Q12baZhMPlfpjXa-KgMYUEvsnqQbb1gXCmjpEhFpkVGLLEZOoO8cLHrycd-7w/s310/q.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="231" data-original-width="310" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6PgrIV9iB4eMOLoPD1kUjVuEoSWb38H2o6gQJGtd5uTKmbhupiC5-8vDMrkQWUyshz1-fa6MkXLOU8e8ybQTo87aqtudWe4FmGqcyie9499zY37ARjWJ5B8gI1Q12baZhMPlfpjXa-KgMYUEvsnqQbb1gXCmjpEhFpkVGLLEZOoO8cLHrycd-7w/w192-h143/q.png" width="192" /></a></div>The data driving his extrapolated costs are from 2005-2011 for
the ES-SPY data and 2015 for the LSE. Strangely, his recent 2023 presentations
at a16z and the NBER did not update the data. Remember your cell phone
capabilities circa 2005-11? Currently, the major exchanges all generate multiple hardware timestamps and correctly sequence incoming orders within 5 nanoseconds. If he is confident that his mechanism can save the
world $5B a year, getting data from the 2020s would seem obvious. While
technology has improved significantly, so have the tactics. No one in this
field thinks a strategy backtested on message data from before 2022 is
relevant. This is clearly an academic idea.<div><b><br /></b></div><div><b><br /></b></div><div><h4 style="text-align: left;"><b>Co-located Level 2 Tactics != Regional Arbitrage</b></h4><div>
<p class="MsoNormal">The microsecond speed race in their LSE data differs significantly
from the ES-SPY arbitrage game. Co-located servers involve a trivial expense
and are a massive improvement in efficiency. With co-location, you can have
hundreds of investors at precisely the same distance with a leveled plain
field. Without co-location, the competition for closest access will be discrete
and more subject to corruption; the playing field will not be leveled, their
costs will be higher, and they will have to maintain their own little data center.
The costs and tactics for co-location vs regional arbitrage are incomparable,
and we should not encourage regulators to treat them the same way. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As mentioned, the nice thing about this proposal is that it
is clear enough to highlight its flaws. Those who just want to add a stamp tax
to fund all of college (or health care, etc.) don't even try to justify it with
a model; they just know its costs would tax people in ways that most voters
would not feel directly. Nonetheless, like cash-for-clunkers, this is not an
economic policy that will do any good.<o:p></o:p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-4559214199524404622024-02-08T12:05:00.000-06:002024-02-08T12:05:10.822-06:00Uniswap V2 Made Money. What Happened?<p> I was surprised to see a <a href="https://twitter.com/AnthonyLeeZhang/status/1753563488062935252" target="_blank">tweet </a>by @AnthonyLeeZhang that referenced a short paper showing liquidity providers (LPs) making money on Uniswap's ETH-USDC pool, as <a href="https://efalken.substack.com/p/video-on-how-to-calculate-amm-lp" target="_blank">I have noted</a> that Uniswap LPs have been losing money consistently since they began. I initially thought there was a mistake, but found his metric of PNL is ultimately identical to mine. </p><p>Specifically, he used <a href="https://arxiv.org/abs/2208.06046" target="_blank">Milionis, Moallemi, Roughgarden, and Zhang</a>'s pnl formulation, which they call Hedged LP PnL. This is the LP profit after accounting for <b>impermanent loss</b> (<i>aka</i>, loss vs. rebalancing, <b>LvR</b>, <b>convexity costs</b>).</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p>HedgedLpPnL = fees - LvR = Vt - V(t-1) - mints + burns + hedgePnL</p></blockquote>Here, V(t) is the value of the pool's reserves. If we use the ETH-USDC pool, where p(t) is the ETH price is USDC, we get<br /><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Aptos; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">V(t)
= USDC(t) + ETH(t)*p(t)</span></p><p><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Aptos; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">V(t-1) = </span><span style="font-family: "Times New Roman", serif; font-size: 16px;">USDC</span><span style="font-family: "Times New Roman", serif; font-size: 16px;">(t-1) + ETH(t-1)*p(t-1)</span></p></blockquote><p data-pm-slice="1 1 []">The difference in the value of reserves is affected by the price change and the changes in USDC and ETH that come from mints (LP deposits), burns (LP withdrawals), trades, and fees. The ETH and USDC coming into the pool contain both fees and the tokens traders sell (swap into the pool), so this implies</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p class="MsoNormal">USDC(t)=USDC(t-1) + mints(t, t-1) - burn(t, t-1) + NetUsdcIn(t,
t-1)</p><p class="MsoNormal">ETH(t) = ETH(t-1) + mints(t, t-1) + burns(t, t-1) + NetEthIn(t,
t-1)</p></blockquote><p class="MsoNormal"><o:p></o:p></p><p>
</p><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal">[note: (t, t-1) is the flow in the period from t-1 to t]. This reduces to just valuing the pool's net USDC and ETH reflected in trader swap event logs, valued at the end of the period. There is a slight difference created by ignoring the prices when mints and burns happen, but both approaches make assumptions that make these PnL calculations approximations, and the differences are insignificant. I prefer this formulation because it requires less data.</p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p class="MsoNormal" style="text-align: left;">Hedged LPpnl = NetUsdcIn(t, t-1) + NetEthIn(t, t-1)*p(t)</p></blockquote><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal">While one can use periods of arbitrary duration, in the limit, it does not matter, and as a practical matter, pulling this by calendar day works well for seeing trends, as well as avoiding trading costs if one were to actually hedge their LP pool position. </p><p class="MsoNormal">More importantly, this introduced me to the fact that Uniswap's v2, the old capital-inefficient automated market maker (AMM), makes money for its LPs. I figured it was obviously worse in every way, which is why its flagship ETH-USDC 30bp fee (basis points, 0.3%) pool has about 2% of the volume of the ETH-USDC 5bp v3 pool, which is about half of the unpopular 30bp v3 pool. </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicYCQ_o9LLMbSP_k473zDd_RAuYhq-x225B-VoqHDhv3dikQd7Am-C8Z_jZy58OeOlcF1qRhKYbmKZnNltgYxQXf1s-Gv7rUSeAN-4js_t9CLFX0hSNudWQNogGOpdiNIl1gCKaNf3DTO8ZNT8mIkAFPut-42oMo5K6R0MOR9CkmPdVRefir4jJA/s692/v2v3volume.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="452" data-original-width="692" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicYCQ_o9LLMbSP_k473zDd_RAuYhq-x225B-VoqHDhv3dikQd7Am-C8Z_jZy58OeOlcF1qRhKYbmKZnNltgYxQXf1s-Gv7rUSeAN-4js_t9CLFX0hSNudWQNogGOpdiNIl1gCKaNf3DTO8ZNT8mIkAFPut-42oMo5K6R0MOR9CkmPdVRefir4jJA/s320/v2v3volume.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">ETH-USDC pools</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Uniswap's v2 started in May 2020, and volume peaked when Uniswap's upgraded v3 pools started in May 2021. Not only did their v2 LPs make money in the past, but they have continued to make LP profits to this day. In its first year, 2020, Uniswap's v2 pool was making $100k+ per day for the pool, which annualized to a sweet 30%+ annual return on total value locked in the pool (after accounting for impermanent loss/LvR/convexity costs). </div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyukdKVPc3_YRIQbEgVrUeBqwjnLuPiUPsNq5sXiU8tFLGcicRR8l8Pa7RUgzOx2lJT8LGyk6d1F7uytfPMqYSA6kLUXbb-Y9sl07lDHoFhz1VEb1bXok7TH5JyZMALqg6o9sLckJmQbPFzZQ6T9w5KHc7ivnzVzGZwLmja847ODBeyKuIE0ScIA/s680/uniprof.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="452" data-original-width="680" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyukdKVPc3_YRIQbEgVrUeBqwjnLuPiUPsNq5sXiU8tFLGcicRR8l8Pa7RUgzOx2lJT8LGyk6d1F7uytfPMqYSA6kLUXbb-Y9sl07lDHoFhz1VEb1bXok7TH5JyZMALqg6o9sLckJmQbPFzZQ6T9w5KHc7ivnzVzGZwLmja847ODBeyKuIE0ScIA/s320/uniprof.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Uniswap v2 ETH-USDC pool</td></tr></tbody></table><div><br /></div><div>Currently, there is about $100MM worth of tokens in the ETH-USDC v2 pool, and it generates a modest, but still positive, 3% APY all-in. On a PnL/USD traded basis, it has been more impressive, showing stable profitability (see below). In contrast, the v3 pools have lost money from inception. While v3 LPs make money twice as many days as they lose money, the problem with selling gamma (having a negative convexity) is that the losses are relatively large when they happen. Unfortunately, this leads many scammers and fools to think that they only need to time or size their bets better.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio1eoaO7P3aHsIViCDTcXKYMUDrdxpbH8eXix4XRuBFtKhjsKPyge1A79bpLN5euux9eJ2B7mJwkGzO_zeh8r3HS938lw04ZlVYs5nVP25QyU9iXc6NuRfRtOZNiFnmQqxRFJdvFcs6_JCpe9htaJ35F5FenDRZdLYNVWMs8e4W5jKq5tkcic1eg/s670/pnlusd.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="452" data-original-width="670" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio1eoaO7P3aHsIViCDTcXKYMUDrdxpbH8eXix4XRuBFtKhjsKPyge1A79bpLN5euux9eJ2B7mJwkGzO_zeh8r3HS938lw04ZlVYs5nVP25QyU9iXc6NuRfRtOZNiFnmQqxRFJdvFcs6_JCpe9htaJ35F5FenDRZdLYNVWMs8e4W5jKq5tkcic1eg/s320/pnlusd.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">ETH-USDC pools</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div>This is quite an interesting equilibrium. The 30bp-fee v3 pool corresponds to the 30bp-fee v2 pool, yet the v3 LPs lose money while the v2 LPs make money. The problem is that the v3 pools have too much liquidity relative to the total amounts traded. If the pool is near the 'true' price as reflected on Binance, etc., standard fluctuations imply a certain amount of trading. Specifically, over short frequencies, the percent change in price relates to an amount traded relative to the liquidity. Remember that in an AMM liquidity is defined as</div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div><p class="MsoNormal" style="text-align: left;">liquidity = sqrt(USDCinPool * ETHinPool)</p></div></blockquote><div><p class="MsoNormal">Applying AMM math, we get</p></div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div style="text-align: left;">return% = 2 * <span style="font-family: Symbol;">D</span>USDC/(liquidity
* sqrt(p))</div></blockquote><div></div><div><br /></div><div>If we take daily volatility to be 5%, the standard deviation every five minutes is 0.3%. If arbitrageurs pushed the price by an average of 0.3% every five minutes, that's a total of 85% that needs to be effected. This implies the amount traded for arbitrage or price setting is a linear function of liquidity.</div><div><br /></div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div style="text-align: left;"><span style="font-family: Symbol;">D</span>USDC(from arbs) = 0.85 * liquidity * sqrt(p) / 2</div></blockquote><div><br /></div><div>If LPs need a certain ratio of liquidity traders relative to arbitrage traders, then if the ratio of (USDC traded / liquidity) is lower for a pool with the same fee, it will make less money, if not lose money. The 5bp pool needs at least 6 times more USDC traded per unit of liquidity. </div><div><p data-pm-slice="1 1 []">We see that for the v3 5 bp pool, volume/liquidity has been 2.5 times higher than in the v2 pool, far lower than the 6 times it needs. In the v3 30bp pool, the ratio is about 50% of the v2 pool. The flagship AMM for the flagship dapp on the flagship blockchain has been and continues to be a loser. This is an existential problem for AMMs because large users are constrained to centralized exchanges without a sustainable, liquid AMM. These centralized exchanges are necessary but cannot be essential for large trades if crypto is to avoid outside attacks by the institutions that control the major fiat currencies.</p></div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqMNwSJ4Ed6KAWU1AjY-idwMEhgj77hUn-a1d-Vq_278EL02C3tAcUNz5OvZWCRmAUPFgi_PXP8IDI_0tPJquywwpJC1t7wEKuOz628u94wV7z3VQDPfoLPegmD8JN1YWHoVZFq8vpVBz0swOkM6NEvECA3PI55vWZcA8IkRhY7HAiGDwBRBC6aA/s669/volliq.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="452" data-original-width="669" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqMNwSJ4Ed6KAWU1AjY-idwMEhgj77hUn-a1d-Vq_278EL02C3tAcUNz5OvZWCRmAUPFgi_PXP8IDI_0tPJquywwpJC1t7wEKuOz628u94wV7z3VQDPfoLPegmD8JN1YWHoVZFq8vpVBz0swOkM6NEvECA3PI55vWZcA8IkRhY7HAiGDwBRBC6aA/s320/volliq.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">ETH-USDC pools</td></tr></tbody></table><div><br /></div><div>I can only speculate as to why v3 fails so spectacularly relative to the v2 AMM. I suspect the cause is based on LPs not appreciating LP convexity cost. If you scroll through Reddit's Uniswap thread, you will see occasional posts inquiring about how to measure or hedge the LP's negative convexity, and banter is similar to when college freshmen discuss macroeconomic issues: strong, ignorant opinions. Most do not even realize the convexity cost. Those who do acknowledge it think it can be overcome by judicious timing, lower latency, or rewards programs that solve the chicken-and-egg problem. Others think the solution is to buy volatility as a hedge, which in the context of the blockchain is not only capital inefficient (you can't get cross-collateralization), but if you are selling volatility below actual volatility as with these v3 LPs, hedging it on centralized exchanges will just lock in your losses. </div><div><p data-pm-slice="1 1 []">With the v2 pool, there is one common cost for the LPs they all can intuit: capital. Every LP is treated pro-rata based on their stake in the AMM's pool. In contrast, many v3 LPs think that they get ahead of their fellow LPs by concentrating their liquidity in a narrow band or adjusting their ranges based on current volatility. The effect of extra liquidity never occurs to them. The end result is a persistent excess of liquidity that does not just dilute profits; it turns them into losses. The greater the liquidity, the greater the convexity cost, which, unlike merely adding shares to a stock, affects the sign of net income. </p></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP6ETiogihmrUxWFv91uyHN8omwvHgODpTtTv9deSH4Jca3Xey-GAzNDkN-Ic1DxC5Z_aCz-zaCQd_15I4zgEzTwYpVcM1PrZ7oCDsFmt-dROpVfFSK2q8WpouwtbczZAh9mQxioVRfzsRH_J-UM0zO9hS7D_11bHLNxHsCfUvrU-0F8jzOhkesQ/s648/v2capital.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="452" data-original-width="648" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP6ETiogihmrUxWFv91uyHN8omwvHgODpTtTv9deSH4Jca3Xey-GAzNDkN-Ic1DxC5Z_aCz-zaCQd_15I4zgEzTwYpVcM1PrZ7oCDsFmt-dROpVfFSK2q8WpouwtbczZAh9mQxioVRfzsRH_J-UM0zO9hS7D_11bHLNxHsCfUvrU-0F8jzOhkesQ/w287-h200/v2capital.png" width="287" /></a></div><div><br /></div><div><p data-pm-slice="1 1 []">Many have written about how adding money to a v3 pool is obviously a better strategy than LPing for a v2 pool because by restricting a range to a generous 20% up and down, they could deploy the same amount of liquidity with only 8% of the capital they would need for a v2 pool. They never considered the consequences if everyone else came to the same conclusion, leading to an excess of liquidity that is linearly related to the pool's convexity cost. As most people do not understand, let alone measure, convexity costs, they blithely deposit capital into these pools, ignorant of the equilibrium effect on costs that affect their bottom line.</p></div><div>This unfortunate situation could persist in that my spam folder is filled with the same scams that were a cliche in the 1990s. Yet, while the weiner enlargement pill industry is persistent, it isn't growing. For a contract on the blockchain to work, it has to go beyond gimmicks like token rewards (which just dilute LP fees) or leverage via using collateral tokens as collateral ad infinitum. Unfortunately, the investors that generated massive profits in 2021 and avoided prosecution or bankruptcy--probably out of pure luck--are the primary VCs directing our current development. They have a lot of money they do not want to report and nothing else to do with it. They know the shibboleths but do not understand gamma in particular or mechanism design in general. </div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-38263206987617829352023-03-30T15:59:00.000-05:002023-03-30T15:59:41.488-05:00FTX's Mythical Origin Story<p> One of the biggest mysteries about the Sam Bankman-Fried (SBF) debacle has been how he initially vaulted into the wealth stratosphere. The standard story is that he made a fortune on the price discrepancies between bitcoin in Asia vs. the US exchanges in 2017. Even SBF critic CoffeeZilla <a href="https://youtu.be/TjTEVNcuV80?t=211" target="_blank">accepts this narrative</a>, making it seem like SBF was a great trader caught in an anomalous crash. Most people accept the story uncritically, and my favorite version is this.</p><p>It was a daring feat of arbitrage—SBF is the only trader known to have pulled this off in any meaningful way—one which quickly made him a billionaire and achieved the status of legend.</p><p>Alameda’s capture of the kimchi premium (and other trades like it) gave SBF the grubstake he needed for his next move: founding the crypto exchange FTX</p><p>Unsurprisingly, the narrative he promoted was a lie. The money Alameda made on the Kimchi premium was gone within a couple of months, and they generated zero profits before starting FTX in the spring of 2019. The most likely explanation for his ascent was the faking volume on his new exchange, which enabled him to bring in VC money. With prominent VC backers and an exchange, he could issue a token and sell those for more money, access customer deposits on FTX, and make stupid investments that would only work in the first half of a bubble. </p><p>This highlights a persistent crypto problem. On the one hand, you have regulated exchanges that do not offer leverage, trade a limited number of coins, can expropriate, and restrict access via KYC, but are audited by independent third parties. On the other hand, you have unregulated exchanges that will give you 100-1 leverage in meme-coins and permissionless access but are trusted black boxes. It is what game theorists call a ‘separating equilibrium,’ and regulators should know they bear responsibility. Like prohibition laws, draconian crypto regulation encourages a large dangerous black market.</p><p><span style="font-size: medium;"><b>The Kimchi Premium Trade and Loss</b></span></p><p>Alameda was started in September 2017 by SBF, Tara Macaulay, and Gary Wang. All were members of the Effective Altruism movement living in the San Francisco bay area. SBF and MacAulay both had sinecures at the Centre for Effective Altruism, a charity headed by William MacAskill that focused on rationality and optimization (see his TED talk <a href="https://www.youtube.com/watch?v=WyprXhvGVYk" target="_blank">here</a>). The focus is on utilitarianism ($1000 matters more for a poor person), marginalism (smaller projects have greater returns), and existential risks that threaten generations a thousand years in the future (e.g., the AI apocalypse). These abstract concerns tend to attract analytical atheists, your typical Ph.D.</p><p>MacAulay had a background in pharmacy and health economics. Gary Wang was a childhood friend of SBF and worked for Google as a software engineer on the site’s front end for booking airline flights. SBF was given an introduction by MacAskill to Jane Street in college, and afterward, there for a couple of years, where he traded a variety of ETFs, futures, currencies, and equities. While this often is used to portray SBF as a precocious trader, there is no evidence. Someone with two years of experience, even if working for Goldman or Citadel, is still very ignorant and has little discretion in their job. Not only the Alameda founders but all of the initial Alameda employees were enmeshed in the EA community, and none had significant finance or crypto experience.</p><p>While I can only speculate why SBF et al. thought they could make money as crypto investors, there is a plausible explanation. MacAskill, like many analytical futurists, was familiar with crypto. In 2017 bitcoin was booming, and as an asset with unprecedented global reach, the new exchanges worldwide were not well connected. Thus in May 2017, the price in Korea would occasionally reach a 50% premium over the US, a huge opportunity.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVZ3cDwVrg3n8X5NUSOHzF61rMkXuI90_2wLxOF9kdsiEa3nZqz8mEgGuntWUs9dSrbilUsfUF7hWdG5GcXexlgzQd2zKZheFaRG4d7jStXCoK9V8sFFaB8IUbxavIqz1JPDzRgdbKmsI0y5WSY1uvG-I4_m8I3ZfyWS2XIF402uTy6cjHuRk/s691/bitPremMonthly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="491" data-original-width="691" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVZ3cDwVrg3n8X5NUSOHzF61rMkXuI90_2wLxOF9kdsiEa3nZqz8mEgGuntWUs9dSrbilUsfUF7hWdG5GcXexlgzQd2zKZheFaRG4d7jStXCoK9V8sFFaB8IUbxavIqz1JPDzRgdbKmsI0y5WSY1uvG-I4_m8I3ZfyWS2XIF402uTy6cjHuRk/s320/bitPremMonthly.png" width="320" /></a></div> <p></p><p>To arb this, one would need to make the following trades:</p><p>1.<span style="white-space: pre;"> </span>Buy bitcoin on Coinbase or Gemini with USD.</p><p>2.<span style="white-space: pre;"> </span>Send bitcoin to Japan</p><p>3.<span style="white-space: pre;"> </span>Sell bitcoin in Japan for yen</p><p>4.<span style="white-space: pre;"> </span>Sell yen for USD</p><p>5.<span style="white-space: pre;"> </span>Wire USD to Coinbase</p><p>6.<span style="white-space: pre;"> </span>Repeat</p><p>Wiring large amounts of money to a new account raises many red flags for regulators and compliance officers suspicious of money laundering, which is a cause for many severe regulatory fines. There are know-your-customer (KYC) rules, caps on withdrawals, citizen requirements, etc. This is where a trusted network pays off: a confidant with connections in Japan could handle one side of the transaction, and another in the US handling the connections to the US financial institutions.</p><p>MacAskill must have realized his tight-knit EA community was well-suited for this task. It had access to capital, as a funding report <a href="https://80000hours.org/2021/07/effective-altruism-growing/" target="_blank">suggests </a>around $10B in funding committed as of 2017. This capital is not spent immediately, and simple utilitarian logic implies that it would be a good thing if they could make arbitrage profits to fund more charities. The EA community in San Francisco was not only close but from all over the world, and young. This would allow them to place trusted people in various countries, which is necessary to set up banking accounts to arbitrage these country premiums. </p><p>Many financial dynasties were founded on a kinship network that reduced transaction costs. For example, when Mayer Rothschild sent his five sons to the major capitals of Europe around 1800, this allowed them to move capital much more quickly than those doing business merely backed by their reputation and civil law. Trust removes the delay in drafting contracts because you can be confident that the recipient of your money will not just disappear. Similarly, the EA community was small enough, and a shared vision of the ultimate good is a great foundation for trust. They could then get people into Korea or Japan to execute an arbitrage unavailable to anyone without a presence in both nations. As the opportunity was temporary, the speed generated by the trust was crucial.</p><p>As this Kimchi premium was the only trade mentioned by SBF before January 2018, it seems the obvious motivator, and MacAskill created the team to profit off this specific mispricing, internalizing his experience placing people at Jane Street and then waiting for their donations.</p><p>While the bitcoin premium disappeared when Alameda started in October 2017, it returned in December. Alameda tried to get around Korean capital controls, but this proved <a href="https://forum.effectivealtruism.org/posts/xafpj3on76uRDoBja/the-ftx-future-fund-team-has-resigned-1?commentId=hpP8EjEt9zTmWKFRy" target="_blank">impossible</a>, which is why it was so anomalously large. Japan, however, was different. An <a href="https://forum.effectivealtruism.org/posts/SP3Hkas3jo6i2cmqb/who-s-at-fault-for-ftx-s-wrongdoing?commentId=npvsMA42qYF2kQnhm" target="_blank">EA colleague</a> in Japan set up a bank account at a Japanese regional bank. Once SBF executed the arbitrage successfully with a small amount of money ($50k), he had a proof-of-concept that anyone could understand. At that point, wealthy EA members Luke Ding and Jaan Tallinn invested $50 to $100 million to capture this trade (see <a href="https://web.archive.org/web/20221110052207/https:/www.sequoiacap.com/article/sam-bankman-fried-spotlight/" target="_blank">here </a>and <a href="https://www.semafor.com/article/12/07/2022/charity-money-launched-sam-bankman-frieds-empire" target="_blank">here</a> for lower and upper bounds).</p><p>Given round-trip transaction costs were probably at least 2%, and it would take at least two business days to complete the transaction, estimates that Alameda made $10 to $30 million seem reasonable. Note that while the premium reached 15%, its average that month was only 5%. As Ding and Tallinn had given Alameda virtually all of its capital for these initial trades, they could demand an outsized percentage of the profits on these initial trades because Alameda was acting merely as a broker as opposed to a discretionary trader at that point. Everyone knew what needed to be done.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3BVBvWgwANoKZZI8u3Lafi_aUxEFGl0vNCMg9EXrwKFUHYgQiwVXN4RuBBI7qG3f87N5VUTT9d2MBzINGvAPIy8Ey96XlmySs4dtiG6JecOE4aI_rfBnJ45FoI-dz_VfpgLZx1AhSqeU_TxOv-SG4CIRLvSc3I-uiUXSNEPLbnEFqjN0Kchg/s692/bitPremJan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="460" data-original-width="692" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3BVBvWgwANoKZZI8u3Lafi_aUxEFGl0vNCMg9EXrwKFUHYgQiwVXN4RuBBI7qG3f87N5VUTT9d2MBzINGvAPIy8Ey96XlmySs4dtiG6JecOE4aI_rfBnJ45FoI-dz_VfpgLZx1AhSqeU_TxOv-SG4CIRLvSc3I-uiUXSNEPLbnEFqjN0Kchg/s320/bitPremJan.png" width="320" /></a></div><p><br />Alameda may have made several million dollars in January, but it was soon gone. Bitcoin fell by 40% by April, Etherum by 60%, and other coins more than that. SBF was blamed for several losses in that period, such as:</p><p>•<span style="white-space: pre;"> </span>A long ETH position</p><p>•<span style="white-space: pre;"> </span>OTC shitcoin trades</p><p>•<span style="white-space: pre;"> </span>A botched XRP trade</p><p>•<span style="white-space: pre;"> </span>Transferring a USDT to a bitcoin address</p><p>SBF was not merely a bad programmer, an <a href="https://www.youtube.com/watch?v=Ytaa_5liwMA" target="_blank">incoherent advocate</a> of crypto principles, but an incompetent trader.</p><p>With these failures and the Japanese premium over, big funders Ding and Tallinn had seen enough and <a href="https://www.semafor.com/article/12/07/2022/charity-money-launched-sam-bankman-frieds-empire" target="_blank">demanded their money back in March,</a> leaving Alameda with little capital. Most Alameda insiders blamed SBF, so in April, MacAulay and others offered to buy SBF out for $1M, but he refused, so they left to start their own firm, Pharos Capital (aka Lantern). As most trading firms pay bonuses annually, it is doubtful Alameda has a large bonus pool because leaving forfeits one’s bonus. Further, as a co-founder, SBF would have had legal ownership of a sizeable amount of the bonus pool, so any buy-out would have to include a premium over that.</p><p>In October 2018, another Alameda trader, Victor Xu, left to join Pharos. If Alameda made a boatload from April through October 2018, it is unlikely that Xu would have left then instead of waiting until the following year to get his bonus. This all suggests Alameda had virtually zero accumulated profits at the end of 2018, after the Kimchi trade that most think funded FTX.</p><p>Throughout 2018, SBF’s focus was on <a href="https://archive.ph/aj5IU" target="_blank">raising money</a> to start FTX. In January 2019, Alameda <a href="https://news.bitcoin.com/report-shows-financial-troubles-plagued-bankman-frieds-alameda-research-as-early-as-2018/" target="_blank">sponsored </a>an event at Binance Blockchain Week in Singapore, promising 20% returns “risk-free.’ Somehow he got the money to start FTX, which began trading on May 1. FTX reported $50 million daily trading by June 11, which grew steadily. Volume reportedly rose steadily until it hit $300 million daily on July 5, two months after inception (see <a href="https://www.alexanderjarvis.com/ftx-venture-capital-investment-memo/" target="_blank">here</a>). They had only ten employees.</p><p>This was sufficient to get $8MM in funding from well-known crypto VCs Race Capital, FBG, Consensus Labs, and Galois Capital in late July. FTX launched its token on July 31 with an initial market cap of $30 million. By the end of 2019, SBF convinced Binance head CZ to invest $100 million for a 20% stake.</p><p>At that point, FTX had enough money to capture the crypto bull market starting in June 2020. Through the end of 2021, bitcoin would rise by 400%, Etherum by 1500%, and new coins like Solana and Shiba Inu would rise 10-fold. Thus, the subsequent growth of FTX is straightforward, as Alameda/FTX was investing in small coins and funding new projects. </p><p>The volume stats FTX presented to VCs in July 2019 were almost surely fake. If you search on Google or Reddit for “FTX Exchange” before July 5, you find almost nothing. How could an exchange generate such volume without notice on the entire internet?</p><p>Just before FTX pitched the VCs in July, it released a white paper on fake trading, summarized like a press release by several media sites (see <a href="https://www.forbes.com/sites/jeffkauflin/2019/07/02/the-anatomy-of-a-fake-cryptocurrency-trade-how-exchanges-create-phony-transactions/?sh=3c82bc103132" target="_blank">Forbes</a>). This would make total sense if FTX was faking their trades, as they realized fake volume was a common tactic because it was feasible and effective. In creating their own fake trading statistics, they would necessarily learn to avoid fake trading signatures, as several reports had examined this phenomenon back then. Common tactics included regurgitating the trading tape from larger exchanges with minor modifications, implausibly small bid-ask spreads, having most trades post within a bid-ask spread, etc. A white paper on fake trading would have been the ultimate complementary good for someone engaging in fake trading stats.</p><p>Accusing others of doing something wrong before even being accused is disarming. Non-psychopathic people think no one would be so bold as to do what they campaign against. However, it happens all the time. For example, the government-led disinformation campaign on social media was done under the pretext of fighting disinformation. Their tendentious definitions of truth, or ‘higher truths,’ revealed them as the primary disseminators of disinformation.</p><p>It’s an SBF staple to inadvertently reveal his scammy tactics with the overconfidence typical of narcissistic fraudsters. In his April 2022 Bloomberg interview, he explained yield farming in a way that, as Matt Levine noted, was a classic Ponzi scheme. SBF responded, ‘that’s one framing of this,’ as if it was not a Ponzi if it had not collapsed. CoffeeZilla made a YouTube <a href="https://www.youtube.com/watch?v=C6nAxiym9oc" target="_blank">video </a>on that bizarre interview that, in retrospect, is quite humorous. I suspect this same Ponzi mindset was behind the initial VCs and CZ’s interest in 2019. While I am long-run bullish on crypto given government fiat incentives, one has to admit the current crypto community is a hive of scum and villainy on par with Mos Eisley.</p><p><span style="font-size: medium;"><b>The EarnToGive Alignment Problem</b></span></p><p>EA community was instrumental in creating the SBF train wreck. Not only did it supply all of the initial personnel and capital, but their wealthy and well-connected leaders would also give investors much reassurance. Further, the EA vision, applied to entrepreneurship, creates a classic misalignment of incentives. It centers on a profound flaw in their ‘earn to give’ and ‘80000 hours’ initiatives, promoted most conspicuously by MacAskill and Sam Harris, who were both big SBF supporters all the way through November 2022 (I think they are both innocent, but this naivete should disqualify them from administering a large charity ). </p><p>Earning to give involves deliberately pursuing a high-earning job or investment strategy as an instrumental goal to maximize their ultimate goal, ‘total welfare,’ the present value of the utility of billions of people over the infinite future. The EA conceit is that you can be a superstar, lawyer, entrepreneur, or investor while seeing it purely in instrumental terms. Anything not directly helping others, like giving food to the starving, or preventing existential risks like an AI apocalypse, is irrelevant in itself. It’s fine to be a well-paid rodeo cowboy or disc jockey, but only as a means to a much more ennobling end. The emphasis makes it highly unlikely one will excel at lawyering, investing, etc.</p><p>Almost everyone knows that their ultimate objective is not their day job. The difference is that the status or importance of most jobs is virtually indefensible within the EA worldview. In a traditional family, the loving wife of a great attorney loves not only that her husband’s income supports their family, but she feels pride in his excellence at his craft. The husband can then focus on his job, knowing that it not only supports his family but generates appreciation from those he loves most, as well as clients and colleagues. This helps him to focus and apply himself, making him an excellent attorney.</p><p>In a modern economy, the division of labor makes it virtually impossible to see how our jobs move the needle. It takes faith in the market, where the division of labor prices services at their marginal value, to believe that if you are well-paid for doing something, it adds to world utility, even if it is not as transparent as handing food to a starving child, or getting a million likes for a TED talk on saving the planet. Though this does not work perfectly, it works naturally, undirected, better than any centralized plan.</p><p>Abstract thinkers have always had a problem appreciating the value of various professions in an economy. Socialists thought that one could do without the entire field of finance and advertising. What did they produce? It has been a good thing that most people respond to market forces instead of intellectuals when choosing professions.</p><p>The earn-to-give ethos degrades all instrumental fields, those not contributing directly to the magical EA objective function. Given the nature of most people’s jobs, pride in their work would reflect a pathetic unworldliness. If you, and those you love, consider your job as important as a Clown Car driver, it’s inconceivable you will become elite in that field.</p><p>It is not rational to expect to make outsized returns on an avocation. In a competitive economy, builders of great companies not only have a vision but pay attention to details, the way that John D. Rockefeller implemented efficiencies in oil refining using meticulous cost-benefit analysis and understanding scale efficiencies. Rockefeller was a devout Christian and preferred fellow teetotaling Baptists like himself as partners, so he did not ignore his ultimate objective at work. However, he had confidence that doing one’s job well, whatever it was, was a great way to serve God. Most people not focused on abstract conceptions of world utility have no pangs of guilt doing something they find profitable and interesting. That allows them to focus and become great at it.</p><p>In contrast, the only people who boldly proclaim their EarnToGive attitude is consistent with extra-normal profitability are fools and frauds, like SBF.</p><p><br /></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-58112909531077551262023-03-24T10:05:00.000-05:002023-03-24T10:05:28.830-05:00Uniswap LP Profitability Update<p> Most crypto traders are confused by the Impermanent Loss (IL) generated in Uniswap’s Automated Market Maker (AMM). The question below posed on the Uniswap Reddit page is an earnest query that, unfortunately, generated the same answer quality a Medieval doctor would have offered on how to prevent scurvy. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYnQO4KN7dEjIQK18UXWhJPCEym4tXxU05Sn1vt-HQGFniGlMCix4cWAvDr9VHK61MfaeG4IAohLccOwLBAzVHC9QMfX7_j3bJPpvroKZ-EoRIwJc7dQuRmht_M7CxTfGS9IImqENcxnXK7nQZCxmKfHAqYxmHRftFjvT3iAqXVu4lZxxDAoM/s534/reddit.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="71" data-original-width="534" height="51" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYnQO4KN7dEjIQK18UXWhJPCEym4tXxU05Sn1vt-HQGFniGlMCix4cWAvDr9VHK61MfaeG4IAohLccOwLBAzVHC9QMfX7_j3bJPpvroKZ-EoRIwJc7dQuRmht_M7CxTfGS9IImqENcxnXK7nQZCxmKfHAqYxmHRftFjvT3iAqXVu4lZxxDAoM/w380-h51/reddit.png" width="380" /></a></div><p></p><p>Impermanent loss is an unavoidable consequence of the liquidity provider’s (LP’s) negative convexity. If you could avoid this cost via hedging, options would not have an option premium; they would be priced at intrinsic value. Methods to avoid this loss by providing liquidity to pools with two volatile tokens like ETH and WBTC, or pools with three or more coins, make the IL less conspicuous instead of removing it. </p><p>Crypto enthusiasts must understand that LPs generally lose money in AMMs due to IL. It is difficult enough to predict the future, but knowing the present is a lot more straightforward and provides the basis for any prediction. </p><p><b>Deriving the IL for an AMM</b></p><p>I will start first with a basic derivation of IL for a constant product AMM. I will apply this to the ETH-USD pair, but these formulas apply to any token pair. </p><p>We start with the formulas for ETH and USD pool tokens. Liquidity is both an intuitive and technical term within the AMM, and p here would apply the price of ETH in terms of USD. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlVKjHkjutX8EZVL2c0vmscGTjnSQDLoy8Dq0Hs1zED7otFzDiQ_hCX8MsKK_Ux0YphNvCBVxC4KY4FuykIzYl1Y43wgqrEdXUB3f11H8Ths1GFQMFlBI8utcpWxaQunECl4_CrgjMYONd1I42bu3XYiJhfyMja72vjQV4M4JwoaB16CjmXo/s158/Eqn001.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="158" height="77" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXlVKjHkjutX8EZVL2c0vmscGTjnSQDLoy8Dq0Hs1zED7otFzDiQ_hCX8MsKK_Ux0YphNvCBVxC4KY4FuykIzYl1Y43wgqrEdXUB3f11H8Ths1GFQMFlBI8utcpWxaQunECl4_CrgjMYONd1I42bu3XYiJhfyMja72vjQV4M4JwoaB16CjmXo/s1600/Eqn001.gif" width="158" /></a></div><p></p><p>The value of this LP pool position at any time is given as follows.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii8VvLbm5lGuFjNcHeVmcWi9GXAPZItOS2n7dwbhATpLxiNVVZ2eJLlh5wPP-KbNFSpYq-tCHt_-PpViVYGKsQkwLbRvaiNddzmUxzfnftRfb-w_xtVM7z9K5_JyE_amaN01lUZTnqy3o4X3N3f3ZAhnM1TcOaC0MwCwfaxoYNt5Zr5ngzU1o/s224/Eqn002.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="25" data-original-width="224" height="25" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii8VvLbm5lGuFjNcHeVmcWi9GXAPZItOS2n7dwbhATpLxiNVVZ2eJLlh5wPP-KbNFSpYq-tCHt_-PpViVYGKsQkwLbRvaiNddzmUxzfnftRfb-w_xtVM7z9K5_JyE_amaN01lUZTnqy3o4X3N3f3ZAhnM1TcOaC0MwCwfaxoYNt5Zr5ngzU1o/s1600/Eqn002.gif" width="224" /></a></div><p></p><p>Substituting for the token amounts given the above pool equations, we get can derive this simply in terms of the price and liquidity for an LP.<span style="white-space: pre;"> </span></p><p><span style="white-space: pre;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="white-space: pre;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi_gc6V_2H2cBV4P-tOGB9q-YFo485SCQkGtOtAWpymSBgKC3dYPeijg7Twrl8PJE_Suo48I5ySdw9YMI5ZugEmAD4CRNsADaFN7l987w7tQUa_octYjhk7vl60q2qsyL4ccFI0_S-4DnIeWD7k9LPtk0zZ0onW4PFBXax_9KVNyxqKqSPV1WQ" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="58" data-original-width="474" height="45" src="https://blogger.googleusercontent.com/img/a/AVvXsEi_gc6V_2H2cBV4P-tOGB9q-YFo485SCQkGtOtAWpymSBgKC3dYPeijg7Twrl8PJE_Suo48I5ySdw9YMI5ZugEmAD4CRNsADaFN7l987w7tQUa_octYjhk7vl60q2qsyL4ccFI0_S-4DnIeWD7k9LPtk0zZ0onW4PFBXax_9KVNyxqKqSPV1WQ=w371-h45" width="371" /></a></span></div><p></p><p></p><p>Taking the derivative of the LP’s pool value with respect to the price, we get the delta</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUkr5ulkcBzpUoRNef9NTEKkY8cjjelYkW9w1EpEjpNSNntSPqUFf-cbzllg6FjD6cYvIKx-zDx3Ep-IDbY41xXckubPUY4fA7roXcuMlvcgxpqD8DB3VED62b_mZUfTO6FAhO6X4VcMnb043-cBqy7H27sOfNAAVz02Dedt6HQdVBJMzgICs/s174/Eqn004.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="48" data-original-width="174" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUkr5ulkcBzpUoRNef9NTEKkY8cjjelYkW9w1EpEjpNSNntSPqUFf-cbzllg6FjD6cYvIKx-zDx3Ep-IDbY41xXckubPUY4fA7roXcuMlvcgxpqD8DB3VED62b_mZUfTO6FAhO6X4VcMnb043-cBqy7H27sOfNAAVz02Dedt6HQdVBJMzgICs/s1600/Eqn004.gif" width="174" /></a></div><p></p><p>The derivative of the delta, or second derivative of the pool value, is thus</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yUH64hXbpKaolQUKbDk4Z069iYQc-A-oJedPWb2J49RiF_agArkYjhCorc21gULDKJA-tX3xw7z8D5o_HR6TrKdvHpOom6P5Zp66Z_hqX8EOlryi2rqqOd9SStssGZHdc-68D5s5vK1wAzoGCglb3vN_IbH2ZlXpFR9OYihr1g9PQN91RDY/s241/Eqn005.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="46" data-original-width="241" height="46" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yUH64hXbpKaolQUKbDk4Z069iYQc-A-oJedPWb2J49RiF_agArkYjhCorc21gULDKJA-tX3xw7z8D5o_HR6TrKdvHpOom6P5Zp66Z_hqX8EOlryi2rqqOd9SStssGZHdc-68D5s5vK1wAzoGCglb3vN_IbH2ZlXpFR9OYihr1g9PQN91RDY/s1600/Eqn005.gif" width="241" /></a></div><p></p><p>Given this gamma in the AMM pool, we can apply this to the Black-Scholes formula for convexity cost (gamma/2 times variance), which gives us</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Bl--LFuO8AgW6WUzA3syoy4XWeWb1PFNhDF7CphcXZ1oWwRyg6VjtTT2-yKf7PmMJt3_CYRHZ8Ewv-HLZQqeOzxKU2-YfF9CZ_ygY6lr8TSqPmkmyMcsbVMdpHr7uVdhTrnptwr0GlpsWrWHWe6zmq1878htG7eaX9trVTQrda-LM0tVx0Y/s312/Eqn006.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="48" data-original-width="312" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Bl--LFuO8AgW6WUzA3syoy4XWeWb1PFNhDF7CphcXZ1oWwRyg6VjtTT2-yKf7PmMJt3_CYRHZ8Ewv-HLZQqeOzxKU2-YfF9CZ_ygY6lr8TSqPmkmyMcsbVMdpHr7uVdhTrnptwr0GlpsWrWHWe6zmq1878htG7eaX9trVTQrda-LM0tVx0Y/s1600/Eqn006.gif" width="312" /></a></div><p></p><p>The convexity cost equals the option premium via an equilibrium argument where profits are zero: if they were positive, it would not be an equilibrium because sellers would enter the market; if profits were negative, sellers would exit. This argument is used in the famous Black-Scholes equation. </p><p>This method of estimating the convexity cost is to determine the option value of an option. </p><p style="text-align: center;"><i> Convexity Cost = option premium</i></p><p>This does not mean a convexity payout equals its cumulative convexity cost in every case. A single option payout represents one observation like a draw from a normal distribution reflects the distribution. </p><p style="text-align: center;"><i> ATM straddle payoff = N(optionPremium, <span style="font-family: Symbol; line-height: 107%;">s</span><sub><span style="line-height: 107%; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">payout</span></sub>)</i></p><p class="MsoNormal"><o:p></o:p></p><p class="MsoNormal"><span style="line-height: 107%; mso-bidi-font-family: "Times New Roman"; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p></o:p></span></p><p>For an AMM LP position, which is like an ATM straddle, the convexity cost is the expected IL instead of an actual IL. This is also the IL a good market maker should approximate, in that good LPs hedge their delta risk, and hedging does not change the expected IL, but minimizing its variance reduces capital costs.</p><p style="text-align: center;"><i><span style="white-space: pre;"> </span> Convexity Cost = E(IL)</i></p><p>With the convexity cost function for an AMM, we can apply the daily volume and liquidity data from Uniswap’s pools and the actual daily volatility for the assets to calculate the average daily profitability for the LPs of these pools. I used daily liquidity and volume data from two of the most prominent Uniswap pools. I calculated the daily variance using the daily price and minute-downsampled price data daily. I then present the monthly average daily data to see if it’s trending. This is in the table below.</p><p style="text-align: center;"><b>Uniswap ETH-USDC Pool Profitability</b></p><p style="text-align: justify;"><span style="font-size: x-small;">Monthly data contain average daily values. Average daily volatility was taken from down-sampled minute data. Gross Margin is (revenue-convexity cost)/revenue. Liquidity and volume data are from Uniswap’s Ethereum mainnet. Data through March 21.</span></p><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVZSiHPaxZUurGMXlplBWRuTk_cXC6XrN9MYv6CuOrhTSdeLGFchs_KTTPe5u0xfZ8-xxU3_ELc0R_awIzp7EbUxpc-AbD4rYoZlEE6YgblnPgVRqA9TKfmZod-pjcqTFoDzlnSW765uPXq5KP6mPNMNE9v8lMS3nFFiQT1CEOqd1JtXJJDBM/s605/table3c.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="484" data-original-width="605" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVZSiHPaxZUurGMXlplBWRuTk_cXC6XrN9MYv6CuOrhTSdeLGFchs_KTTPe5u0xfZ8-xxU3_ELc0R_awIzp7EbUxpc-AbD4rYoZlEE6YgblnPgVRqA9TKfmZod-pjcqTFoDzlnSW765uPXq5KP6mPNMNE9v8lMS3nFFiQT1CEOqd1JtXJJDBM/w408-h326/table3c.png" width="408" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><p>This table shows that LPs have consistently lost more money via their IL than they made in trading fees. Worse, there is no trend. </p><p>The best explanation for the persistence of LPs despite losing money is that they are not calculating the option cost. This would explain the lack of growth, as smart money is not entering this new market. </p><p><b>Why are LPs so Stupid?</b></p><p>One reason the LP convexity cost is not appreciated is that it is not a direct cash charge. Instead, it’s cost relative to a pair of assets, as opposed to a simple USD value, which is uncommon. Consider the LP’s pool value, which can be represented as a linear function of the square root of the ETH price. </p><p><span style="white-space: pre;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqY5WijBY9v7kJ_IUOiMlCiRY4-20u7kSM2Y8fdhjNigCuTxmRxwWNo14kHRIqLki-CI99eZ5-x_N7PlBeZEGnPnucVG5QauSaTta0rHp6PX3mxMl9CRaRO4F8egUqnGGv3XqyZKKmOpKW-OhCZ-KhH19XtY63JUnUNKjuWBRkWephcnSKKcI/s205/Eqn010.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="28" data-original-width="205" height="28" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqY5WijBY9v7kJ_IUOiMlCiRY4-20u7kSM2Y8fdhjNigCuTxmRxwWNo14kHRIqLki-CI99eZ5-x_N7PlBeZEGnPnucVG5QauSaTta0rHp6PX3mxMl9CRaRO4F8egUqnGGv3XqyZKKmOpKW-OhCZ-KhH19XtY63JUnUNKjuWBRkWephcnSKKcI/s1600/Eqn010.gif" width="205" /></a></div><p></p><p>In comparison, the value of their initial deposit is a linear function of price, given an initial deposit of x USD and y ETH.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsz_tNFaZ_BRfBv1THPiK2_QHqB7d4vQqt8lexAkVDvPDlHxs_FUAvRFxbnFXjP0XrMbMpDZ5hTtyYKPSGibtwPxmsMTxJC8KZ7BC1xXPpnqZFDOGRVta7Gw62nVGIcf2D6CVk200OYQk-sEel3WmMntY1dtHE0xu9-iub5UfnDCSjF9mUrqg/s301/Eqn011.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="24" data-original-width="301" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsz_tNFaZ_BRfBv1THPiK2_QHqB7d4vQqt8lexAkVDvPDlHxs_FUAvRFxbnFXjP0XrMbMpDZ5hTtyYKPSGibtwPxmsMTxJC8KZ7BC1xXPpnqZFDOGRVta7Gw62nVGIcf2D6CVk200OYQk-sEel3WmMntY1dtHE0xu9-iub5UfnDCSjF9mUrqg/s1600/Eqn011.gif" width="301" /></a></div><p></p><p>The value of the initial deposit and the LP function are equal initially. However, as the LP value function is concave, and the initial portfolio value is linear, we know the LP’s future pool value will always be less than the initial portfolio pairs. The value of the LP position as a function of the ETH price is an increasing concave line tangent to the value of the LP’s initial deposit, as seen in the figure below. In equilibrium, fees should compensate for this predictable loss. </p><p>The daily IL is imperceptible without proper accounting. For example, the daily ETH price volatility is around 4%, and half of an LP’s pool value is from ETH, while the IL averages around 0.03%. Further, the benchmark is ambiguous. When the price of ETH rises, the LP’s pool value also rises (segment D in the figure below), just less than it would have if not in the pool (segments C+D). When ETH prices decline, the pool position declines (A+B), but so would their original portfolio (A), though less so. To appreciate the option they are implicitly selling, they would have to look at their position relative to an initial position that most only remember at its USD value. </p><p><b>IL Cost Superficially Ambiguous</b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEahQVN1Cbkz0NXPbAxPPtuqZiCb1QqNgXUZmuFqb2qP0oN_zI3fSqEwBicUpY3bqqFD6TEv-VfAq0DdJ-hanquDOMPNpQl_QrNR6hGMtLwDaBVTYfjUexXcg1LCvbqPvmDJx2qYA5cnqTaWrP2CFL6KAK6rnhqf-V4cPr9hGrmjfu2W0cmII/s625/ILconcave.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="625" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEahQVN1Cbkz0NXPbAxPPtuqZiCb1QqNgXUZmuFqb2qP0oN_zI3fSqEwBicUpY3bqqFD6TEv-VfAq0DdJ-hanquDOMPNpQl_QrNR6hGMtLwDaBVTYfjUexXcg1LCvbqPvmDJx2qYA5cnqTaWrP2CFL6KAK6rnhqf-V4cPr9hGrmjfu2W0cmII/s320/ILconcave.png" width="320" /></a></div><p></p><p>LPs ignorance is not remedied by more academic studies of LP profitability. Almost all focus on the realized IL of actual LPs assuming none of them hedged. This is like testing option returns by looking at the returns on options independent of the hedge, which no institutional option market maker does (I used to work for one). For example, a significant study by Topaze Blue (<a href="https://arxiv.org/ftp/arxiv/papers/2111/2111.09192.pdf" target="_blank">Loesch et al., 2021</a>) found that Uniswap pools generated $199.3M in fees over a period that incurred $260M in IL, and 49.5% of LPs lost money. Such a takeaway obscures the profound fact that the LPs lose money because it is tempting to think that those LPs with clever tactics were among the half that made money, and all one has to do is figure out what those tactics are. </p><p>Realized ILs will equal the convexity cost over many years, but the realized IL will have much greater volatility in small samples. This is related to why option sellers hedge their positions: reduced volatility reduces risk, which reduces required capital. If option market makers hedge their portfolios, those researching option expenses should use estimates as if the option was hedged. That is implicit in comparisons of implied to future volatility.</p><p><b>Why Realized IL is a Bad Metric </b></p><p>To help see the relative efficiency of these two approaches for estimating IL, I estimated the small-sample properties of both approaches using a Monte Carlo simulation. As I present about 600 daily Uniswap pool observations in my Uniswap LP profitability table above, I generated the price paths over 20 periods of 30 days to get a sense of the sample volatility. I recorded the mean and volatility of the two ways of measuring IL: realized IL based on starting and ending price, and convexity cost based on daily volatility. </p><p style="text-align: left;"><b>Monthly Realized IL in Monte Carlo </b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht-_UiNYjsoBXltfw8VpnJYQ1Bgqm1FgEhRLdm65BgSFH1t-37xjfvH4apYmrR-apSnve4xp5wnMcaxNbE-tQVVQUKpwytUWsjZvbZ9ww86ysm6nBmrOycz3p_oy4wjKcsop3FPwqH0tMVjTAXA5F0i7Bvd-5Fjqd3XE16Mn5R4KqQhHU8hKg/s317/Eqn012.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="26" data-original-width="317" height="26" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht-_UiNYjsoBXltfw8VpnJYQ1Bgqm1FgEhRLdm65BgSFH1t-37xjfvH4apYmrR-apSnve4xp5wnMcaxNbE-tQVVQUKpwytUWsjZvbZ9ww86ysm6nBmrOycz3p_oy4wjKcsop3FPwqH0tMVjTAXA5F0i7Bvd-5Fjqd3XE16Mn5R4KqQhHU8hKg/s1600/Eqn012.gif" width="317" /></a></div><p style="text-align: left;">I assumed fixed liquidity and had an initial price of 100. As I am interested in comparing one approach to the other, the specific numbers are irrelevant as long as they are the same for both approaches. We are looking at the relative differences generated by these IL estimation methods. The monthly realized IL in the samples can be simplified to the following (they are mathematically identical).</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfzA2qPByIj-GwpaCjdOAb4kWVF-JJ6mX2YK4U241lpgreQ8UjYouHtLoLKpFpSPnarjXilB5nEyHE8tBY9hBW8BRccXv2qdC-06OWXx8ygeYg3qkJaGFGVzgFzh0EqryUfCI3P82tepQuYGPAWo7yPBVjmN8xtshYvs48pmRMcrcmGq3VRo/s202/Eqn013.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="58" data-original-width="202" height="58" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfzA2qPByIj-GwpaCjdOAb4kWVF-JJ6mX2YK4U241lpgreQ8UjYouHtLoLKpFpSPnarjXilB5nEyHE8tBY9hBW8BRccXv2qdC-06OWXx8ygeYg3qkJaGFGVzgFzh0EqryUfCI3P82tepQuYGPAWo7yPBVjmN8xtshYvs48pmRMcrcmGq3VRo/s1600/Eqn013.gif" width="202" /></a></div><p></p><p><b>Monthly Convexity Cost</b></p><p>For the convexity cost approach, I used the basic formula derived above, that is:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBjl9D-PyFd89k8Hh9E-z2OVcL4ldmG3dCLMpRwtiJym5CNj_4tDohde3wkiy1xSmNU5jChT8jrI7A3A-q2WBPsRnGhvgmqasamb4xwErHYYyIouaWujcFeku6YZnwiyRzXVu72rxOTUaIeEgi-zWjNSUvz1p_yk7Y1AnW4z6oywrxxqVx-08/s226/Eqn014.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="226" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBjl9D-PyFd89k8Hh9E-z2OVcL4ldmG3dCLMpRwtiJym5CNj_4tDohde3wkiy1xSmNU5jChT8jrI7A3A-q2WBPsRnGhvgmqasamb4xwErHYYyIouaWujcFeku6YZnwiyRzXVu72rxOTUaIeEgi-zWjNSUvz1p_yk7Y1AnW4z6oywrxxqVx-08/s1600/Eqn014.gif" width="226" /></a></div><p></p><p>Applying this using time series of price and volatility generated the following formula for each monthly estimate. </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ5WcWZqioL9WJ-RCB3qQLUdR9VuryUsxqm1zIQ4lMFFFNkB7HsltL94wGTvW44YsxmKxpcjCDGPZGRoR_9fPHV5SdexCQowf4bZeDiFbhqFGV8s5lpJCxkBsGSjzgKeD7dFkJX9H8AFy-sX3O0ca-6NWr1pzRAr0jtISgn5xhFTMiP3HOgkc/s265/Eqn015.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="49" data-original-width="265" height="49" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ5WcWZqioL9WJ-RCB3qQLUdR9VuryUsxqm1zIQ4lMFFFNkB7HsltL94wGTvW44YsxmKxpcjCDGPZGRoR_9fPHV5SdexCQowf4bZeDiFbhqFGV8s5lpJCxkBsGSjzgKeD7dFkJX9H8AFy-sX3O0ca-6NWr1pzRAr0jtISgn5xhFTMiP3HOgkc/s1600/Eqn015.gif" width="265" /></a></div><p></p><p>These two formulas were applied to one million simulations to estimate means and standard </p><p style="text-align: center;"><b>Monte Carlo Estimation of Uniswap LP Costs</b></p><p style="text-align: justify;"><span style="font-size: x-small;">ETH minute-down-sampled data from July 2021-March 2023 were used to estimate daily volatility. These daily volatility estimates generated a heteroskedastic random price time series. 20 sets of 30-day realized IL and convexity costs. Both approaches assumed a liquidity=1000 and an initial price of 100.</span></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXyAho6HqqX-psaiME7pYHoUmdKGmnkNPH96WKL0irHlc2u9wt7wll5bnfzoP9fkNaEg4T7iiXktjrX-bKDEQmyhrEamVrBw94zYscOM0NjlHYFlDyW9bUBNumef5QBsD5yoSfrjOlj1lvaClL1sfYrOId1fQ9JJN6gwiFeOYzrDteJPnaEy4/s217/tablewhite.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="61" data-original-width="217" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXyAho6HqqX-psaiME7pYHoUmdKGmnkNPH96WKL0irHlc2u9wt7wll5bnfzoP9fkNaEg4T7iiXktjrX-bKDEQmyhrEamVrBw94zYscOM0NjlHYFlDyW9bUBNumef5QBsD5yoSfrjOlj1lvaClL1sfYrOId1fQ9JJN6gwiFeOYzrDteJPnaEy4/s1600/tablewhite.png" width="217" /></a></div></div><p>The absolute numbers do not matter, but the relative ones do. The results above show these approaches have approximately equal mean estimates for the IL, as expected. However, the sample IL approach had a three times larger standard deviation. Intuitively this makes sense because the convexity cost approach uses daily prices to estimate the next day’s price variance, information any hedger would use when managing their convex positions. In contrast, the realized IL approach uses only the start and end prices. As with many options results, many ways exist to prove and intuit these findings. results. The bottom line is that the convexity cost formula dominates the sample IL approach to estimating expected IL (something a good hedge can lock in). </p><p>There should not be much doubt that LPs are consistently losing money. Those LPs fortunate not to lose money in the TopazeBlue study were simply random draws that were below average instead of clever. </p><p>I don’t want to pick on TopazeBlue. Still, if one of the most prominent studies of ILs is misleading, it is understandable most LPs, who are not quants, will not see that LPs lose money outside of random shocks that obscure this loss when not hedged. The lack of LP profitability also explains why well-capitalized groups are not adding liquidity to these AMM pools. </p><p><b>Solutions Are Generally Lame</b></p><p>One hope for these AMMs is that volume increases substantially. We can see both the 0.05% and 0.30% Uniswap ETH-USDC pools generate losses, but the lower-fee pool losses are considerably greater. Thus, one potential solution would be to eliminate the 0.05% pool, which would drive the ETH-USDC traders to the 0.30% pool. That might help, but I do not see how it could be mandated.</p><p>Most other standard solutions are less promising. Note that given these pools lose money, no amount of capital efficiency helps, which includes yield stacking. If you can take your LP tokens as collateral elsewhere, that doesn’t make them profitable; it just means you are leveraging your money-losing investment. A stock that loses 12% a year is not turned into a good buy at 10-to-1 leverage. </p><p>The more common lousy solution is to use the reasoning Sam Bankman-Fried outlined in his <a href="https://www.youtube.com/watch?v=C6nAxiym9oc" target="_blank">interview </a>with Matt Levine. These AMMs add payout via convolution, such as bonus points paid in a new token which get multiplier points when staked for a year. Staking reduces the selling pressure, allowing insiders to maintain a price that does not reflect the total market value of the tokens. These are classic crypto grifter tactics: the 2017 <a href="https://cointelegraph.com/news/800-victims-of-massive-bitconnect-fraud-to-receive-17m-restitution" target="_blank">Bitconnect Ponzi</a> scheme took in bitcoin and paid out insane yields in its own coin and promised even higher returns if users staked their funds for a year. Surprise! Once new users stopped coming and bitcoin stopped rising, Bitconnect disappeared and left everyone with its worthless coins (eventually, $17MM of $2.4B was recovered!). </p><p>Many people in crypto have gotten wealthy using crypto-Ponzi tactics, and these aspiring SBFs fund many crypto projects, researchers, and journalists. These serial entrepreneurs are typical hucksters who know the right buzzwords and can hide behind the inherently complicated nature of blockchains and smart contracts. They do not drive serious innovation, just the next Dentacoin, Celsius, or Augur. </p><p>Tactics that are either foolish (leverage) or scammy (worthless rewards to pump usage metrics) try to elide the existential LP problem in AMMs, which are the basis for DeFi. People in crypto need to know about persistent LP unprofitability before they can and will address the underlying problem. </p><div><br /></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-48420357725398104282023-03-22T09:02:00.006-05:002023-03-22T10:17:03.503-05:00Why Trusted Blockchains Cannot Support CLOBs<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">Today's most efficient and liquid exchanges are <i>central
limit order books</i> (CLOBs). It is a computerized system that aggregates and
matches buy and sell orders for a particular financial asset, such as a stock,
currency pair, or commodity, in real time. In a CLOB, market participants can
place their orders to buy or sell a specific asset, and these orders are then
listed in the book according to their price and time priority. The system
automatically matches buyers and sellers at the best available price, filling
limit orders that arrive first (i.e., price-time priority). Orders outside the
current market price sit on the book as resting limit orders, available for
traders until they are canceled.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; text-align: center;"><b>A Limit Order Book</b><o:p></o:p></p><p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"><a href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6397281c-982d-4ab9-9811-6dfc9188c500_419x290.png" target="_blank"><span style="color: blue;"><o:p></o:p></span></a></p><p class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8odgKHBHyhg_oFAPG7IY_xrE6Wm1YUVxxoiO8bnb97k6bqs9is6z9YS333JsRfT2uafvsQPxl4jIG-5jKsep_MM17VTO3bHye5bX-H5eaybRxtYNVEI5V9DedDENegwTP54j5wnTeL0vIgyXU_E-2Z91ylf032ot8SEosmhH5O8h2_oLXvo/s419/clob.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="290" data-original-width="419" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8odgKHBHyhg_oFAPG7IY_xrE6Wm1YUVxxoiO8bnb97k6bqs9is6z9YS333JsRfT2uafvsQPxl4jIG-5jKsep_MM17VTO3bHye5bX-H5eaybRxtYNVEI5V9DedDENegwTP54j5wnTeL0vIgyXU_E-2Z91ylf032ot8SEosmhH5O8h2_oLXvo/s320/clob.png" width="320" /></a></div><p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">While these represent the gold standard, they require a
degree of low latency (i.e., speedy) that is only attainable because they are
centralized (ergo, CLOB and not LOB). This allows market makers to physically
place servers running their market-making algorithms next to the exchange
servers, allowing communications within milliseconds. Any decentralized trading
platform cannot directly compete with these platforms as a price discovery
mechanism.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">To understand why a CLOB cannot work on a blockchain, it is
helpful to understand the economics that drives its equilibrium. A CLOB has
three types of traders: uninformed, informed, and market makers. The informed
invest in data, models, and hardware to identify temporary mispricings and use
their comparative advantage to snipe stale limit orders. The uninformed are
ignorant for rational and irrational reasons: they may want to buy a car
(liquidity traders) or are delusional and trading on irrelevant information
(unintentional noise traders). As informed and uninformed traders do not show
up simultaneously, market makers arise to provide liquidity continually by
posting resting limit orders to buy and sell.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">In equilibrium, all groups generate benefits equal to their
costs. The informed trader’s costs—investments in hardware and statistical
algorithms—are balanced by revenue from adversely selecting stale market maker
limit orders. Uninformed traders pay the market maker by crossing the spread,
benefiting from convenient, quick trading. Market makers post knowing they will
trade with both types of traders, setting limit orders such that the revenue
from uninformed balances that they lose to the informed.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">There are many scenarios where low latency is costly, but
one applied to a market maker providing resting limit orders should suffice. A
market maker places a two-sided order to buy or sell 100 shares of XYZ stock
trading at a bid-ask price of $20.17-$20.18, its current bid price, $20.17.
Assume the stock will move up or down $0.05 before you can cancel that order.
If you get filled, it will only be because it is now trading at $20.12-$20.13,
meaning you bought at $20.17 and can sell now at $20.12; you lost $0.05; if the
price went up $0.05, you would probably not be filled on your $20.17 order to
buy. This is called ‘adverse selection,’ where conditional upon getting filled,
you paid too much or sold too low. It generates a loss profile for market
makers like for those selling straddles or a liquidity provider’s impermanent
loss.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">The effect of higher latency on a central limit order book
is a classic example of Akerloff’s ‘<a href="https://noemi.giszpatrick.com/econfon/lemons.pdf" target="_blank"><span style="color: #f4c7c3;">Market for Lemons</span></a>’ (<i>Quarterly Journal of
Economics</i>, 1970).<span style="font-family: Times New Roman, serif;"> [1]</span> In
that paper, he analyzes markets where parties with asymmetric information
separate, so the only viable transactions are those with a negative value, and
the market collapses (i.e., no trades).<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">The lemon’s problem applied to limit order books is the
following. High latency leads to market makers suffering higher adverse
selection as it amplifies the relative speed advantage of informed traders, causing
market makers to increase their spreads. Higher spreads discourage uninformed
traders. With fewer uninformed traders, the market maker widens his bid-ask
spread further to protect against adverse selection by the informed traders by
making more profit per uninformed trade. This discourages more uninformed
traders, creating a positive feedback loop until none are left.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">Another way to think about the necessity of liquidity
traders focuses on the zero-sum nature of trading without them. With no liquidity
traders, the remaining participants are then playing the unattractive game of
trying to outsmart and out-speed others who have made the same commitment. The
Milgrom-Stokey ‘<a href="https://www.econstor.eu/bitstream/10419/220737/1/cmsems-dp0377R.pdf" target="_blank"><span style="color: #f4c7c3;">no-trade theorem</span></a>’ (J<i>ournal
of Economic Theory</i>, 1982) states that if all the traders in the market are
rational, all the prices are rational. Thus anyone who makes an offer must have
valuable and accurate private information, or else they would not be making the
offer. Similarly, Grossman and Stiglitz’s ‘<a href="https://academiccommons.columbia.edu/doi/10.7916/D8ZP4H27/download" target="_blank"><span style="color: #f4c7c3;">Impossibility of Informationally
Efficient Markets</span></a>’ (<i>American Economic Review</i>, 1982) shows how
without liquidity traders, no one has an incentive to put information into
markets because the other rational traders infer what he knows via his market
demand. There are no trades because every order is presumed to be informed and
thus unprofitable for the other side.<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">A deficiency of liquidity traders creates a positive
feedback loop that causes markets to ultimately unravel. There will not be
enough liquidity traders to support an active set of market makers, who need
the uninformed retail flow to offset their losses to the informed traders. The
high spreads and meager volume on decentralized limit order book exchanges are
consistent with this result (e.g., Augur).<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">One can imagine the layer 2 blockchains will eventually
become fast and secure, preventing this problem. However, even in this case,
miners or validators can sequence transactions with some discretion. It takes
60 milliseconds for light to travel from Tokyo to San Francisco, creating a
large lower bound to this discretionary time window. Successful market makers
on modern CLOBs have reaction speeds of 5 milliseconds, implying the
feasibility of front-running such a system with impunity (see <a href="https://www.bis.org/publ/work955.pdf" target="_blank"><span style="color: #f4c7c3;">Aquilina, Budish, and O’Neill, 2020</span></a>).<o:p></o:p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">A CLOB has price-time priority, so it fills limit orders first by price, and within a given price using first-in-first-out logic. Even without a minimum tick size, the sequencers could front-run limit orders by posting orders conditional upon the price in the newer orders. There is no way for the layer 2 validators to agree on the time sequence of transactions if it is configured to prevent censorship, which would require a globally distributed set of validators. Given the disproportionate advantage of being first on limit order books, the unavoidable sequencing discretion makes transparent competition impossible, enabling and encouraging corruption.</p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">Low-latency chains like Solana, meanwhile, are centralized, which invariably leads to corruption via Acton’s Law. This centralization is not obvious, as many have more validators than Bitcoin or Ethereum (e.g., EOS has 21), but this <a href="https://learn.bybit.com/blockchain/nakamoto-coefficient-decentralization/" target="_blank">Nakamoto coefficient</a> is meaningless because the validators on low latency blockchains have to work together, and they are invariably controlled by a central agent. When a blockchain representative proclaims a bald-faced lie about a foundational crypto principle, its developers fall down the slippery slope, leading to more lying and, ultimately, a cesspool of deception. In markets dominated by unaccountable insiders, we should expect every sort of malicious trading tactic (e.g., FTX pumped its Serum token via its low-latency Project Serum exchange on Solana). This leaves blockchain CLOBs only for tokens with no alternatives, like in markets for NFTs and shitcoins.</p><div>
<hr align="left" size="1" width="33%" />
<!--[endif]-->
<div id="ftn1">
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">[1] In
this application, the market maker trading with informed traders generates a
loss, like a lemon car, hoping to offset this with his trades with ‘peach’ cars
(gains). In 70’s slang, a ‘lemon’ is a bad type, as opposed to a good type,
e.g., a ‘peach.’ <o:p></o:p></p>
</div>
</div><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><o:p></o:p></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-32495647337056036212023-03-17T11:53:00.006-05:002023-03-17T11:53:58.148-05:00Perp Funding Rate Farce Continues<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgJ6jmg0aCMy9heQDFeABaERTSEon2Qa-D4AuLAD3ERFz_f3RQnmCs1NySkkrPtshjvGZo5fkN96aDSfpcvuN7ePff--uPXvANcoU17eWNnNl_bcJsoLfYvzQzVIPCNke6bDli10bCELKSUZcv_PHyW4Z05Okt2coSg8Lfr9jYgeZqOYBXcY0c" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="508" data-original-width="769" height="267" src="https://blogger.googleusercontent.com/img/a/AVvXsEgJ6jmg0aCMy9heQDFeABaERTSEon2Qa-D4AuLAD3ERFz_f3RQnmCs1NySkkrPtshjvGZo5fkN96aDSfpcvuN7ePff--uPXvANcoU17eWNnNl_bcJsoLfYvzQzVIPCNke6bDli10bCELKSUZcv_PHyW4Z05Okt2coSg8Lfr9jYgeZqOYBXcY0c=w406-h267" width="406" /></a></div><br /><p></p><p></p><p class="MsoNormal">Recent 20% crypto movements have demonstrated again that perp markets continue to gouge their customers. I have written about this several times before, but as it is economically significant, corrupt, and continues unabated, I figured it would be worth revisiting. Alas, reading my old posts, I can see how I muddled my point, perhaps explaining why I am a lone wolf on his issue, so I hope this is clearer. </p><p class="MsoNormal">The funding rate mechanism used to link perp prices with spot prices is a farce in that it does not and cannot tie a synthetic price with a spot price via arbitrage, and in practice, it is used to defraud its users. As a practical matter, the perp price is a <a href="https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed" target="_blank">Schelling point</a> in that its obvious target is the spot price, and the funding rate is just there to make traders feel comfortable that it is not merely a Schelling point. The fact that there is a vague relation to an equilibrating mechanism is good enough for most traders, as they are happy to use centralized platforms like BitMex and DyDx. As in those cases, many users are happy to have access to perps as long as it seems fair.</p><p class="MsoNormal">One can forgive the perp funding rate scam as its foundational white lie facilitated a much-needed market. In 2016, short or leverage bitcoin was impossible, but there were no exchanges to do this. All one could do was swap one token for another and generate an unleveraged long position. There were no stablecoins or wrapped Bitcoin. BitMex, a centralized unregulated exchange that only took bitcoin deposits, created the first popular perpetual swap, aka ‘perp.’</p><p class="MsoNormal">Instead of an expiration date and settlement in a perp market, a perp anchors its price to the spot via a funding rate mechanism. When the perpetual contract’s price exceeds the spot price, the story is that this implies longer than short demand. The long traders pay short traders a fee proportional to this price premium to equilibrate the market. Crypto funding rates prevent continuing divergence in the price in perp and spot markets.</p><p class="MsoNormal">The perp premium is the percent difference between the perp and spot prices. The spot price could be from external markets like Coinbase, or for centralized perps, from spot markets on their exchange:</p><p class="MsoNormal" style="text-align: center;"><i>PerpPremium = PerpPrice/SpotPrice - 1</i></p><p class="MsoNormal">The funding rate is like the future expiring once daily, as this premium is applied to 24 hours based on the perp premium. One can apply it to 8-hour windows or anything else, but the standard is to apply the simple premium above and divide it by the number of periods within a day.</p><p class="MsoNormal">For example, suppose you short a BTC perpetual future trading 10% above the underlying index all day. In that case, it’s perp premium—then you will receive a total funding payment of 10% over that day to compensate for the fact that, unlike traditional futures markets, there is no expiry or settlement, as it is perpetual. This sounds reasonable, but to understand why this is not, you must first understand the theory of how funding rates work in swap markets or how basis rates work in futures markets.</p><p class="MsoNormal">The basis in futures markets acts as a funding rate in swap markets, defined as the difference between the futures and spot prices. The chart below shows the horizontal time axis moving from a current futures price to its delivery/expiry date if the black line represents the current spot price.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0plu6YlrJliGHGYeRUoZQunPLsZKpqnLQBcCEF7TwVqnJdugE4ZW0qkJvTIt_R_jxqN6wHW_nRJ-WQvxW1Twm5NVHAecstRb1l17DDpigB_ekMlmviWDKApgJ5wDNNYAGHmx9zvvPJgYcVQZKvkyvovZ_W1iwzz_HazRznH057Py8EKib_xU/s444/basis.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="278" data-original-width="444" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0plu6YlrJliGHGYeRUoZQunPLsZKpqnLQBcCEF7TwVqnJdugE4ZW0qkJvTIt_R_jxqN6wHW_nRJ-WQvxW1Twm5NVHAecstRb1l17DDpigB_ekMlmviWDKApgJ5wDNNYAGHmx9zvvPJgYcVQZKvkyvovZ_W1iwzz_HazRznH057Py8EKib_xU/s320/basis.png" width="320" /></a></div><p class="MsoNormal">The <b>basis </b>is the difference between the futures and spot price. It can be positive or negative depending on whether the futures price is above or below the spot price. The funding rate is implicit in the amortization of the basis over time, in that, at expiration, the spot price equals the futures price, so the basis is sure to be zero at that time.</p><p class="MsoNormal">There is no basis for swap markets; a funding rate is applied daily, acting precisely like the basis in futures markets. Swap accounts trade at spot prices, facilitated by broker margin. Here the basis goes from being implicit to explicit.</p><p class="MsoNormal" style="text-align: center;"><i>LongSwapPnL = Notional (p(t+1)/p(t) - 1 - FundingRate)</i></p><p class="MsoNormal"><b>Funding rates</b> in prime broker swap accounts are charged daily and determined independently of the spot prices, like how a bank sets interest rates. For equity swap accounts common among hedge funds, they are generally a fixed markup to the Fed Funds rate, such as adding 25 basis points when a customer borrows USD to go long and subtracting 25 basis points when a customer goes short (which lends USD to the broker).</p><p class="MsoNormal">Thus far, the similarity of swap funding rates and the futures’ basis to the perp funding rate seems plausible. Two academic articles are generally referenced when presenting perps. The first is by <a href="https://gwern.net/doc/economics/1988-gehr.pdf" target="_blank">Gehr (1988)</a>, which describes how gold was traded at the Chinese Gold and Silver Exchange Society of Hong Kong (CGSE) in the 1980s. This was when trading was not possible around the clock, and there was no internet, so a price had little volatility outside the trading day. The CGSE was unique because its futures market was undated, i.e., perpetual. The market settled daily and held a 30-minute auction to determine the funding rate. Those long gold compare the cost of paying storage and interest on the spot vs. the funding rate; those short gold futures take delivery if they feel the funding rate is too low. This funding rate was added to the spot price to create a new closing price used in the subsequent day’s pnl.</p><p class="MsoNormal">The effect on prices and cash flows in the CGSE futures market was as follows. If the market price closed at 100.00, and the funding rate was determined to be 0.01% over the next day, the cost basis for the next day’s PNL is 100.01. If the price stayed constant at 100.00 each day, the longs would lose 0.01 because the daily pnl would be 100.00 – 100.01 on a long position, where 100.00 is the spot close, and 100.01 is the previous day’s futures close. The traded price would never be 100.01; it would just be used in the daily calculation of the trader’s pnl on the next trading day.</p><p class="MsoNormal">Nobel laureate <a href="https://www.nber.org/system/files/working_papers/t0131/t0131.pdf" target="_blank">Robert Shiller (1993)</a> proposed a perpetual futures contract for single-family homes. Unlike a stock index or a commodity, the underlying asset, housing, is challenging to create into a futures commodity because it is not homogeneous like a commodity. Quality varies considerably by location and structure, creating a lemons problem. Shiller proposed a rental index to create a rental return proxy for a housing price index. He proposed a statistical model that correlated with real estate’s average rental return, net of depreciation. This rental return would then be paid by the short to the long.</p><p class="MsoNormal" style="text-align: center;"><i>s(t+1) = f(t+1) - f(t) + d(t+1) – r×f(t)</i></p><p class="MsoNormal">In the equation above, <i>s</i> is the daily margin change in a trader’s account; <i>f</i> is the perpetual futures price, <i>r</i> is an interest rate adjustment, and <i>d</i> is determined outside the market. While this is interesting, the difficulty in generating a robust rental index for d is probably why this has never been implemented. The market was supposed to trade at a spot price that did not reflect the daily funding charge, <i>d</i>, only its present discounted value. However, rental income, like macroeconomic profit, is challenging to estimate via macroeconomic indicators, and most macroeconomic models work poorly out-of-sample, generating considerable uncertainty for potential traders.</p><p class="MsoNormal">Nonetheless, the estimation method implied that this funding rate would move slowly, like interest rates. There was never the suggestion that the market price reflects the spot price and the funding rate, as there is no spot price in this hypothetical, never-realized market.</p><p class="MsoNormal">The perp premium funding rate charge is like Gehr’s funding rate charge added to the market’s spot price after trading. It is also like the <i>d(t+1)</i> term in Shiller’s model. Thus, at 30k feet, the connection between the perp premium and the funding rate seems consistent. However, the average synthetic/spot price ratio is not determining the funding rate in either of these mechanisms, as it is for perps.</p><p class="MsoNormal">In crypto perps, the modal daily funding rate and perp premium is 0.03%, which annualizes to 11%. This is a significant funding rate compared to interest rates that have been near zero over the period where perps have existed. A 0.10% perp premium would imply a massive 36.5% funding rate paid by longs to shorts. The average transaction costs for the most liquid US equities, which are more efficient than any crypto market, are estimated at around 0.1%. This is consistent with Gemini tic data that show a 0.15% standard deviation in the price change from one trade to the next (reflecting a bid-ask bounce).</p><p class="MsoNormal">The perp premium incenting trades at any instant is below the transaction cost, given not just the fees but gas and the effective bid-ask spread, which is paid twice over a round trip. If one were frequently trading, as the price-setting arbitrageurs tend to do, extreme funding rates would be less than a round-trip in transaction costs. For example, a 50% funding rate would imply a 0.006% funding payment for a one-hour position, considerably less than their transaction costs.</p><p class="MsoNormal">Additionally, the perp premium applied to longs and shorts is based on the average perp premium in the future. Even if one could know exactly one’s perp premium at the time of trade and transaction costs were zero, it would tell the long-term traders little about what it would be in the future. If one targets positions held for a month, the current perp premium at the trade time is irrelevant.</p><p class="MsoNormal">Supposedly, with all the perp premium’s economic insignificance for motivating short- and long-term traders, we expect the market to determine the funding rate by inspiring people to buy and sell perps based on current perp/spot premium movements of 0.02%. This is why it is a farce; it is absurd.</p><p class="MsoNormal">This leads to why the perp premium is consistently positive (payments from longs to shorts) and frequently rises to 40% after crypto prices jump, as it did this week. Market makers dominate price setting, and all perp markets are effectively centralized and run by unidentified and unaccountable coalitions of insiders. They can target 0.03% or 0.13% above the current spot index. No independent auditors regulate an immutable tape of trades with objective time stamps (as the once-perceived compliance-oriented FTX demonstrated). Anything that can be gamed will be gamed, and perp markets can be gamed.</p><p class="MsoNormal">On average, market makers on standard CLOBs have net zero positions on their assets. On perp exchanges, however, the market makers are generally short because it is much easier for these insiders to hedge their short exchange positions with long positions off the exchange [exchanges have different options depending on the nature and size of other markets on their exchanges, so exceptions exist]. A short hedge would require large amounts of capital on another exchange, generating significant operational risk from regulatory attack surfaces and hackers. This allows the perp market makers a significant extra return on the capital needed for market making.</p><p class="MsoNormal">Theoretically, the perp funding rate should be insignificant, if not zero. Neither USDC nor ETH has a dividend on the blockchain. The cost of carry for USDC and ETH are identical. ETH may have an interest rate if one considers the benefits of staking, but this rate is stable and around 4%, implying a negative funding rate (i.e., longs would get paid to compensate for forgone interest). There are no supply shocks in tokens to generate option value, such as when oil tankers are full. There is nothing like a draught destroying a corn harvest that generates a convenience yield for those with corn inventories. To the extent there is hedging pressure generated by natural long or short ETH, the only natural positions are stakers and miners who are perforce long, implying a negative funding rate (they would pay traders to take their naturally long risk).</p><p class="MsoNormal">Nothing in the theory of futures basis rates or funding rates implies the large and variable funding rates we observe in perp markets. Standard efficient markets theory, the law of iterated expectations, implies current sentiment is reflected in spot prices, not forward curves. This is why funding rates are generally independent of asset prices, as with equity swap markets or auto loans.</p><p class="MsoNormal">To the extent there is a correlation between the basis and price movements on standard exchanges, it is unlike the perp markets. In crypto, perp funding rates are generally high when the price has risen, as they did this week, but generally do not go much below zero when the price has declined. This is the opposite of what occurs in commodity markets, where jumps in oil prices correspond to negative funding rates, and big declines correspond to positive funding rates.</p><p class="MsoNormal">Crypto perp funding rates are best explained by insider manipulation. When prices generate windfall profits to long perp traders, they do not mind 50% annualized funding rates the following day, which amounts to a mere 0.14% daily charge. It’s like how big winners in Vegas often give the dealer a big tip: house money. The 50% funding rate premium on perps relative to the regulated and more transparent CME in February 2021 reflects insiders taking what they can from abused customers. Market makers, generally short, receive the funding rate windfall; the game is rigged as heads-they-win big, tails-they-win-a-little.</p><p class="MsoNormal">The theory that explains the positive return/funding-rate correlation is a typical story that is clear, simple, and wrong. It makes no sense when you get into the details. Like the explanation that price increases come from 'more buyers than sellers,' the idea that long demand shows up in futures price premiums has never made sense.</p><p class="MsoNormal">The perp funding rate reflects insider manipulation of customers, a crypto-crypto cost that, if eliminated, would create a superior exchange for those wanting leverage. Some of these exchanges are under quasi-regulatory control, which would be a good issue for regulators to rectify, as it is indefensible, and there is a lot of data out there. </p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-47616282558470650802022-11-01T11:42:00.019-05:002022-11-03T13:02:38.089-05:00How to Eliminate Impermanent Loss<div class="separator"><picture style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span> </span><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/251d1130-995a-46b5-afc8-45761a963a98_695x464.png","fullscreen":null,"imageSize":null,"height":464,"width":695,"resizeWidth":391,"bytes":32421,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="261.041726618705" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png 1456w" width="391" /></picture></div><p> <a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png" target="_blank"></a></p><div class="image2-inset" style="display: inline;"></div><div class="captioned-image-container" data-pm-slice="0 0 []"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F251d1130-995a-46b5-afc8-45761a963a98_695x464.png" target="_blank"><div class="image2-inset"><div></div></div></a></figure></div><p>Impermanent loss (<strong>IL</strong>) is like an exogenous tax on the suppliers in automated market makers (<strong>AMMs</strong>). While liquidity providers (<strong>LPs</strong>) can hedge their IL, this tactic merely reduces its variance. Worst of all, it exceeds the fee revenue in most AMMs, which is not a long-run equilibrium. Fortunately, there is a straightforward way to significantly reduce the IL while maintaining the autonomy of these algorithmic trading contracts. A contract with the functionality described below is on the Goerli testnet and can be accessed <a href="https://sam-ruddy.vercel.app/" rel="noopener noreferrer nofollow" target="_blank"><strong>here</strong></a> (its verified code is revealed <a href="https://goerli.etherscan.io/address/0xda2389099b9514a1f7ca8b5ef64e83721f7cddff#code" rel="noopener noreferrer nofollow" target="_blank"><strong>here</strong></a><strong>)</strong>. I gave away my previous musing on extending Uniswap’s AMM to handle perps and stablecoins, but this one is copyrighted and has a patent pending.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a></p><p>The key to removing IL is having the liquidity providers (<strong>LPs</strong>) dominate price-discovery trades on their pools. In practice, an AMM’s arbitrageurs are not the LPs, and we commonly model the IL assuming the LP passively leaves his position alone or hedges on Binance. However, if the LP collective drives the net price changes on their pools, its net position is unaffected, as the change in the LP position mirrors the price-setting trades. If the LP's net position does not change, it avoids adverse selection, and its IL is zero.</p><h3><strong>The simplest case</strong></h3><p>Consider a constant product AMM where Bob is the only LP and its only trader.<a class="footnote-anchor" href="#footnote-2" id="footnote-anchor-2">2</a> I will use the leveraged AMM I described earlier <a href="http://falkenblog.blogspot.com/2022/11/an-alternative-capital-efficient-amm.html" rel="noopener noreferrer nofollow" target="_blank">here</a>. In this AMM, traders <em>and </em>LPs can leverage their positions, and when they do so, the borrowed tokens are debited from their ETH or USD accounts. This nets an LP's pool positions with subsequent trades, generating a cross-margining effect. Further, this lowers the operational risk created by having to transact on different platforms, often off the Ethereum main chain.</p><p>Assume LP Bob is levered at 20:1, so the pool tokens implied by Uniswap v2 math are 20 times greater than his actual token amounts invested. While this approach generates an unrestricted range, leverage enables it to be as capital efficient as a Uniswap v3 restricted range pool; 20:1 leverage is about what one gets with a v3 range with price bounds +/- 10% from the current price. For example, Bob adds 1.0 ETH to become an LP in this LAMM, and the current ETH price is 1296 USD. There is 20x leverage for LPs, so his pool ETH is 20.<a class="footnote-anchor" href="#footnote-3" id="footnote-anchor-3">3</a> </p><p>With 20x LP leverage, this implies liquidity of 720 via</p>
<ul><li>poolETH = liquidity /sqrt(price)</li><li>sqrt(1296)= 36</li><li>poolETH = 20</li><li>liquidity = 20*36 = 720</li></ul>Given this liquidity, we calculate the pool USD<ul><li>PoolUSD = liquidity * sqrt(price) = 720 * 36 = 25,920</li></ul>With poolUSD of 25,920 and 20x leverage, he will need to deposit 1,296 in USD.His trading accounts will reflect his initial ETH and USD deposits and the borrowed amounts in his pool positions.<ul><li>Initial trade account ETH = ETH deposit – poolETHborrowed = 1 – 20 = – 19</li><li>trade account USD = USD deposit – poolUSDborrowed = 1,296 – 25,920 = – 24,624</li></ul>LP Bob’s net ETH position is 1.0, his initial ETH deposit. This is the sum of his pool ETH and trade account ETH. His liquidity number and the square root of price imply his pool positions, so these change as the AMM’s price changes. Bob’s subsequent trades are credited and debited in his trade accounts.<ul><li>pool ETH = liquidity/sqrt(price)</li><li>trade account ETH = initial ETH deposit – initial poolETH + subsequent trades</li><li>pool USD = liquidity*sqrt(price)</li><li>trade account USD = initial USD deposit – initial poolUSD + subsequent trades</li><li>Net tokens = pool tokens + trade account tokens</li></ul>In Figure 1 below, all price movements are caused by Bob's trades that are added to his trade account, where his ETH purchases reduce his ETH debt. These increases are precisely offset by declines in the contract's pool ETH position, which in this case means Bob's pool ETH position, leaving Bob’s net ETH position unchanged. With his net ETH and USD positions unchanged, his IL is zero. Intuitively this should make sense because he cannot lose money trading with himself, regardless of the algorithm.
<h5><strong>Figure 1</strong></h5><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZyYgNqucDo79aMkdCAgFGse6btgzUabcLcvjx0sa0tfEOu2G4RK6njVHU4ybBkkbdbrV4zKth4AcC6rakFi_7QgQY9HTpTCLaHLyEUdDJPIyd0djL5dxBZkBlC4gk0bgKCGwaiHLCQTfrZ2ppyv_JEOvoLHBvFaXa83fol-XQicXkWwz05ws/s700/fig1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="700" height="90" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZyYgNqucDo79aMkdCAgFGse6btgzUabcLcvjx0sa0tfEOu2G4RK6njVHU4ybBkkbdbrV4zKth4AcC6rakFi_7QgQY9HTpTCLaHLyEUdDJPIyd0djL5dxBZkBlC4gk0bgKCGwaiHLCQTfrZ2ppyv_JEOvoLHBvFaXa83fol-XQicXkWwz05ws/w515-h90/fig1.png" width="515" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div>
<p></p><h3><strong>Arbitrage Trading and Price Discovery</strong></h3><p>Price discovery happens on the cheapest and lowest latency exchanges. If you know the price of ETH is going up, your best strategy for capturing this price movement would be to buy on a low-latency exchange first and then send an order to a blockchain AMM. Sending trades to a blockchain AMM and a centralized exchange simultaneously would generate the same result, as the blockchain trade would appear at least ten seconds after your Binance trade went through. It would make no sense to send a large buy on the blockchain first and then send a large buy order to Binance after it gets processed because that would only allow others to front-run your second trade.</p><p>Many people think that since there is so much volume on Uniswap, it is likely that ETH price discovery is happening on these blockchain AMMs. If Uniswap had comparable latency, this would make sense, but the latency difference is 100-fold at minimum. If we remember that way back in 2009, firms spent $300 million building a more direct cable from Chicago to New York to save four milliseconds; even the centralized blockchains like Solana are orders of magnitude slower than standard centralized exchanges. </p><p>Ultimately, this is an empirical issue. Figure 2 below shows that 80% of the time, Uniswap prices are within Gemini prices by 0.1%. More importantly, for my argument, we see that when the Uniswap price diverges from the Gemini price, the Uniswap price moves towards the Gemini price and not vice versa. </p><p><strong>Figure 2</strong></p><p><strong>Uniswap 0.05% ETH/USDC Pool</strong></p><p><strong>Gemini/Pool premium vs. Future Gemini & Pool Price Changes</strong></p><p>Data from the second quarter of 2022. I took the Gemini minute-downsampled prices, paired them with the next Uniswap price, and then looked at the price 3 minutes later.</p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixP2Xy20Ty3_UJb6CiT4fmIEny8vskIoyeSVTA_j6rSEg_F5E2GOpbvfa8gJwDf0M_M43Gsl0kFoEUoOGoyFIJQCbBCaWNFPFQ52av5FcM0yWLL8X4CJQNHPSxBfPlJIRc3fUVa1UroZkAc50xQVbVGgAdzYXH-uDAcQJRlF6xm9SL14QER10/s361/fig2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="241" data-original-width="361" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixP2Xy20Ty3_UJb6CiT4fmIEny8vskIoyeSVTA_j6rSEg_F5E2GOpbvfa8gJwDf0M_M43Gsl0kFoEUoOGoyFIJQCbBCaWNFPFQ52av5FcM0yWLL8X4CJQNHPSxBfPlJIRc3fUVa1UroZkAc50xQVbVGgAdzYXH-uDAcQJRlF6xm9SL14QER10/s320/fig2.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div><p>To give LPs an arbitrage-trader advantage, we let LPs trade for free on the contract, while everyone else would have to pay a fee, such as 0.2%. Traders paying the fee need the AMM's price to deviate by 0.2% from the 'true price' to consider an arbitrage trade, while the LP is incented to arbitrage trade well below that level (above unlisted costs like those from gas). If LPs traded each time the Binance/Gemini price deviated by 0.2% from the AMM, the non-LP traders would never see an arbitrage opportunity and be relegated to liquidity trading.<a class="footnote-anchor" href="#footnote-4" id="footnote-anchor-4">4</a> </p><p>An efficient exchange needs arbitrage traders setting prices. The LP should not pay arbitrageurs anything in AMMs because price discovery for latent exchanges is not subtle: arb the AMM with Binance/Gemini prices. Non-LP arbitrage profits add a significant cost to an essential party in the exchange, a cost that must eventually get charged to liquidity traders in a sustainable AMM. When the arbitrageur and arbitragee are the same entity, this eliminates a significant deadweight cost, which is always a good thing.</p><p>A simple fee exemption would be sufficient to make this work if there was only one LP, but with multiple LPs, we need more rules to prevent some LPs from dominating arbitrage trading. </p><p>Consider the case where Bob and Alice are LPs. In figure 3 below, Bob has twice the liquidity as Alice, and Bob trades twice as much as Alice, and the result is that both end up with the same net ETH at the new price. There will be slight IL because Bob's USD change is not exactly twice that of Alice, but this is generally insignificant (or at least second-order).<a class="footnote-anchor" href="#footnote-5" id="footnote-anchor-5">5</a> </p><p><strong>Figure 3</strong></p><p><strong>LPs Bob and Alice trade proportional to their liquidity</strong></p><p>Data to the right are units of ETH</p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUO1fh54nCwcGZPhZ_K4beMcgD-lyl_rk6Qvs0D5hsq8bX2JDwJgZWzbx9Pv8lYoW9SrZBUAYXundBkuAf233SRwOP7I_PYi1zCpd8lHzLbInocfjJ8fyX8FoIuLATiVe4SFLap3FdIW83y3IB324dcK7KguK2o85hzyfvV3VUTCMKUMdHDeE/s700/fig3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="700" height="103" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUO1fh54nCwcGZPhZ_K4beMcgD-lyl_rk6Qvs0D5hsq8bX2JDwJgZWzbx9Pv8lYoW9SrZBUAYXundBkuAf233SRwOP7I_PYi1zCpd8lHzLbInocfjJ8fyX8FoIuLATiVe4SFLap3FdIW83y3IB324dcK7KguK2o85hzyfvV3VUTCMKUMdHDeE/w587-h103/fig3.png" width="587" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div><p>In contrast, in Figure 4 below, only one LP trades, resulting in significant net ETH position changes for both LPs. While some LPs would be averse to generating a change in their net ETH position, some would appreciate the profit as worth the risk. Without some sort of restriction, LPs with superior blockchain connectivity would dominate arbitrage trading, leaving those without bleeding-edge access susceptible to the standard IL. </p><p><strong>Figure 4</strong></p><p><strong>Only One LP Trades Alice Trades</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI2eB3JR51gFzG-4xJ_aXfdmK4kowsRqy9QyLubOVP5NBJWPZhwLHQ5AoUa3n21rwZYOIsipVKpCkfdKsRdd70otddEjIKAGzjVigMK-dQ1HNEXyrbb-dEwYTGpquQ7CHrJC2Qny-eL-9cQBE2kHVcnQmMCsfiKr3vitxL68b6MXQ3J4Kkypo/s700/fig4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="123" data-original-width="700" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI2eB3JR51gFzG-4xJ_aXfdmK4kowsRqy9QyLubOVP5NBJWPZhwLHQ5AoUa3n21rwZYOIsipVKpCkfdKsRdd70otddEjIKAGzjVigMK-dQ1HNEXyrbb-dEwYTGpquQ7CHrJC2Qny-eL-9cQBE2kHVcnQmMCsfiKr3vitxL68b6MXQ3J4Kkypo/w518-h91/fig4.png" width="518" /></a></div></div><p>We need to add conditions to prevent low-latency LPs from dominating arbitrage. A simple rule based on the LP’s current net ETH position compared to their initial net ETH position can do this because when LPs trade proportional to their liquidity, their net ETH position is constant. Therefore the LPs can buy for free only if their net ETH position is less than 100% of their initial ETH position and can sell for free only if they have more than 100% of their initial net ETH position. This incents LPs to arbitrage price changes only when it reduces their IL, so aggressive LPs will get a ‘time out’ when they trade too much.</p><p>An LP’s net ETH position relative to her initial net ETH reflects her relative arbitrage trading, assuming she does not add or subtract ETH exogenously. To make the LP’s net ETH position reflect their relative trading, we need to restrict LPs from depositing or withdrawing ETH from their accounts while they provide liquidity, as otherwise, their net ETH position would not reflect their relative trading.</p><h3><strong>Managing LP Liquidity</strong></h3><p>In a standard constant product AMM, when the price moves the pool amounts of one of the tokens decrease. In an AMM with 20:1 leverage, the LPs would generate negative net token positions when prices move by about 10%. While traders could supply sufficient tokens for trading in the short run for this AMM to continue operating, it is not an equilibrium for a sustainable pool.</p><p>To mitigate this risk, the liquidators can remove an LP’s liquidity when they have a negative net position in either ETH or USD. This constraint will bind well before the LP becomes insolvent.<a class="footnote-anchor" href="#footnote-6" id="footnote-anchor-6">6</a> An LP liquidation is comparatively benign in that it merely removes liquidity and nets the pool tokens with the ex-LP's trade account debts, so no trades are dumped onto this market. </p><p>An LP arbitraging the pool would not need to get tokens elsewhere and deposit them into the pool to avoid liquidation. If the LPs were not arbitraging the pool, they would be forced to wrangle up tokens to deposit into the pool, which requires more capital, trading expense, and operational risk. This wrangling is avoided when they can trade on the same contract where they provide liquidity. Ideally, the LPs trade proportionate to their liquidity and never need to rebalance their pool using outside tokens.</p><p>A hack to this system would be for a 'just in time' liquidity provision and trade. Carlos could add liquidity, make a trade, then remove liquidity, all in one block. Such transactions are parasitic and need to be discouraged. Therefore we penalize LPs who remove liquidity within a week, so anyone just wishing to trade will find the tactic of 'add liquidity/trade/remove liquidity' unattractive.<a class="footnote-anchor" href="#footnote-7" id="footnote-anchor-7">7</a></p><h3><strong>Liquidity trader Imbalances</strong></h3><p>If the LPs generate 100% of the net trades needed to move the AMM price, the non-LP trades must be zero-sum. If there is a temporary excess demand in one direction, the LPs can handle this in two ways. </p><p>First, they can arbitrage the price premium generated by the excess net liquidity trading and accept the resulting net ETH position change. For example, excess non-LP buys push the AMM price above its true price, and an LP can sell on the AMM, generating an arbitrage profit. The downside is the LP now has a net short position relative to her initial net ETH position, which may generate an unacceptable risk. </p><p>Alternatively, the LPs can do nothing. Non-LP demand pushing the AMM price to a premium over its true price will cause the LPs to become short ETH relative to their initial ETH position, but being short an overpriced asset is not a bad situation. On average, at some point, non-LPs will arbitrage the AMM price, pushing it down, and restoring the LP position to its initial neutral condition. If, for some reason, users prefer to buy ETH with leverage on this AMM, generating a persistent price premium on the AMM, that is not so much a problem as an equilibrium. This is purely an empirical issue but easily soluble.</p><h3><strong>Active LPs</strong></h3><p>This strategy is subtly different than hedging one’s LP position. In classical option hedging, it is assumed the hedger is a price taker, and such hedging reduces risk but does not change the expected loss for a position with negative convexity. In contrast, if the hedger effectively sets the price as an informed trader, they eliminate this convexity cost. The LP fee advantage combined with the latency of blockchain AMMs allows the LPs to trade like market wizards. </p><p>If LPs are expected to arbitrage their pools, this implies access to arbitrage bots that monitor centralized exchanges and the blockchain. The LP’s informational advantage only exists within the price-premium window of the fee amount, which requires an algorithm, APIs, and web3 capabilities. They need the ability to react to 0.2% price deviations at all hours of the day. The high latency of the blockchain works to the AMM’s benefit here, as it makes it possible for an LP arb-bot to implement a simple algorithm based on centralized exchange prices. </p><p>While such a setup is straightforward, many LPs will need assistance. One solution is that someone can provide a contract that acts as a vault and manages an arbitrage bot for that vault. The capital supplier and vault owner can then split fee revenue in some mutually agreeable way. Alternatively, the contract can allow LPs to designate other accounts to make arbitrage trades on their account but not withdraw or do anything else. This would allow an LP to hire arb-bots that can seamlessly add their account to an algorithm, tapping the various LPs depending on their individual net ETH position. The arb-bot would need a fee, but as there are economies of scale in creating and running such a program, it would generate mutual gains from trade.</p><p>It should be no surprise that active traders can game passive LPs in an AMM. Over the past century, the riskless real interest rate has been less than 1%. It is not an equilibrium for passive investors to make 5%+ without risk or effort, and many pools advertise 10% or even 100% returns for passive LPs. If investors want such returns, they will either have to create an arb-bot or find an arb-bot partner, and to expect otherwise is fanciful. Over time, those with the better arb-bots will dominate. Market making has never been only about providing capital. In centralized limit order books, the market makers always post two-sided markets—a bid and ask—which are adjusted continuously. These are highly competitive markets, and every competitive market requires a significant investment of capital and time, as well as a little alpha.</p><p>The inherent latency advantage will make AMMs derivative markets for the foreseeable future. When secure L2 solutions come around with latency comparable to centralized exchanges, traditional centralized limit order books can be used.</p><h3><strong>Example Spreadsheet</strong></h3><p>The spreadsheet below shows how a sequence of random prices affects three AMM participants' net ETH position and demand functions. There are two LPs and one non-LP. In each period, the true price changes randomly via a random walk. The LPs then generate their desired ETH trades based on the current price on the AMM, the true price, and their current net ETH position relative to their original net ETH position. The non-LP trades randomly or targets the price if the AMM deviates from the true price by more than the fee. </p><p>You can see how the mechanism works if you play around with it. I find such simple models helpful for my intuition.</p><p> </p><h2><strong>Summary:</strong></h2><p>The essential rules for an IL-free AMM are as follows. They apply to a leveraged AMM so that the contract can monitor the LP’s net ETH position, given that the LP has both pool positions implied by his liquidity and a trade account reflecting trades against the aggregate pool. The trade account for an LP starts as a negative number, reflecting the ETH borrowed to go into the pool; however, the initial net position for an LP is positive.</p>
<ul><li>Standard accounts pay a fee to trade</li><li>LP accounts qualify for a discounted fee if a trade moves the account's net ETH position towards its net ETH position at the time of initiating a liquidity position.<ul><li>LP’s currentNetETH < LP’s initialNetETH, buy only for zero fee</li><li>LP’s currentNetETH < LP’s initialNetETH, sell only for zero fee</li></ul></li><li>Restrictions<ul><li>LPs cannot add or withdraw tokens from their accounts while providing liquidity.</li><li>Withdrawals less than several days after initiating liquidity position pay a fee on pool USD removed</li></ul></li></ul>
<h2><strong>Appendix</strong></h2><p><strong>Impermanent Loss Significance</strong></p><p>IL is a significant problem for AMMs, but it is commonly ignored for two reasons. First, it is not a direct cost in that it is reflected in receiving back more of the less valuable token and less of the more valuable token. A pool with initial token amounts of ETH(0) and USD(0) will change over time to ETH(t) and USD(t). The mathematics of AMMs imply ETH(t) and USD(t) are functions of the price such that if the price of ETH rises, the LP will have less ETH and more USD, and the inverse (see more on this <a href="http://falkenblog.blogspot.com/2022/11/a-simpler-formula-for-impermanent-loss.html" rel="noopener noreferrer nofollow" target="_blank">here</a>).</p><p><strong>IL(t) = p(t)*(ETH(t) – ETH(0)) + (USD(t) – USD(0))</strong></p><p>More importantly, the main reason an LP position value changes comes from the variation in the token price unrelated to IL. Note that the IL formula above highlights it is just capturing the adverse selection of an LP’s pool positions, not the total pnl. If the token quantities are constant, the IL is zero, but the position value will change dramatically due to the change in the ETH price.</p><p>F<strong>igure 5</strong> below shows the relative magnitudes of the total change in value for an LP vs. the IL for an unrestricted (i.e., v2) ETH/USDC pool. It is common to ignore second-order costs like these.</p><p><strong>Figure 5</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png" target="_blank"><div class="image2-inset" style="text-align: center;"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png","fullscreen":null,"imageSize":null,"height":383,"width":583,"resizeWidth":413,"bytes":40631,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="271.3190394511149" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6079f7c0-f1e1-4ab5-b688-d4daccd1f8d9_583x383.png 1456w" width="413" /></picture><div></div></div></a></figure></div><p>While the IL expense is <em>relatively</em> small, it is still significant. This is more conspicuous in the concentrated liquidity ranges offered in Uniswap v3 because a 10%+/- range uses only 5% of the capital in v2, which implies the IL becomes 20 times more prominent relative to the base price pnl changes.</p><p>If you do not calculate the loss, it is easy to ignore, and AMM promoters are not inclined to mention costs if they are not forced to. For example, a <em>Bankless</em> newsletter listed <a href="https://newsletter.banklesshq.com/p/here-are-the-best-real-yields-in" rel="noopener noreferrer nofollow" target="_blank">the top yield-farming opportunities</a> but did not mention IL. <a href="https://app.ribbon.finance/" rel="noopener noreferrer nofollow" target="_blank">Ribbon</a> presents its option writing pools by listing the option premium as if it were a dividend. Uniswap’s <a href="https://info.uniswap.org/#/pools/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8" rel="noopener noreferrer nofollow" target="_blank">pool portal</a> conspicuously presents the fee revenue but nothing about the IL. When people do not mention a cost, it is no surprise they underprice it.</p><p>The major Uniswap pools generate ILs greater than their fee revenue, a net loss. This is easy to measure. Fee income is simple: fee times the volume traded. The IL payoff is very similar to a short straddle, which has negative convexity in that the second derivative of the LP position is negative. Specifically, we call this second derivative gamma, which for an LP position is defined as</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif" target="_blank"><div class="image2-inset" style="text-align: center;"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":172,"resizeWidth":178,"bytes":1588,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="50.7093023255814" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8a4c0d-ebe9-4065-ab5d-6e1e24e9286b_172x49.gif 1456w" width="178" /></picture><div></div></div></a></figure></div><p>Options theory tells us that the convexity cost is the price variance divided by two times gamma. This cost over time is called theta, which represents the expected option decay needed to offset the option seller’s gamma.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif" target="_blank"><div class="image2-inset" style="text-align: center;"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif","fullscreen":null,"imageSize":null,"height":44,"width":346,"resizeWidth":356,"bytes":2039,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="45.27167630057804" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7322ae1-7663-4862-a91d-7fe3911b0848_346x44.gif 1456w" width="356" /></picture><div></div></div></a></figure></div><p>Applying this formula to Uniswap pools reveals a consistent negative pnl for LPs in that their fee income does not outweigh their convexity costs. The chart at the top of this post shows the average daily liquidity and volume for the popular ETH/USDC Uniswap v3 pool. Note it is generating a slight positive pnl this month because ETH volatility has been lower than average (data are through October 9).</p><p>A persistent systemic option underpricing has happened before. Convertible bonds are standard corporate bonds with an option, usually an out-of-the-money call with a long maturity. Before around 2005, it was common for these bonds to price their option below the price of explicit stand-alone options on stocks. These underpriced options allowed hedge funds focused on convertible bonds to generate significant Sharpe ratios for decades.</p><p>The driver of this underpricing was caused by a lack of transparency and bad incentives. The option value was rarely estimated independently, but the option value allowed the bond to have a lower explicit interest rate. If the company's stock price fell, the option expired worthless. In that scenario, the company was clearly better off for having sold the worthless options, and management would highlight the money they saved by issuing convertible bonds. If the company's stock price rose so that the option was in the money, shareholders were sufficiently distracted by their above-average returns that they did not criticize management.</p><p>Eventually, investment banks made it easier to isolate the options component of these bonds, and the options were priced efficiently via arbitrage. A simple convertible bond hedge fund strategy no longer generates a 1.5+ Sharpe ratio. We should expect something similar in AMMs. Currently, LPs are selling underpriced options, which creates an opportunity for those who can offer that same revenue for that service at a lower cost.</p><h3><strong>AMM Volume Not What it Appears</strong></h3><p>The net loss to LPs leads one to suspect that the impressive AMM volume is not a sign of a vibrant trading tool as it is a mechanism for savvy investors to fleece LPs who ignore their IL. As an analogy, consider the Defi exchange dYdX, which recorded a huge volume in late 2021. This was mainly driven by people taking advantage of their rewards program. Activity on their exchange was rewarded with tokens worth more than the fees generated, creating an arbitrage opportunity for throwing in some ETH and trading back and forth. Once the rewards system stopped, volume on the dYdX platform declined by over 95%. </p><p>Some believe fees from arbitrage traders generate net revenue, but this is wrong because arbitrage is purely voluntary, and they only do it to make positive profits. The arbitrageur profits are just the other side of IL. Thus the relative volume differential between the ETH/USD pools with different fees is proportional to the fee difference: six times the fee generates one-sixth the volume. The marginal trader seems to be the pool arbitrageurs, who need to make a profit to cover costs outside the pool, such as fees on centralized exchanges and capital costs (significant because they cannot be netted).</p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>I do not yet have a master plan for applying this, so contact me for suggestions. I think it would form the foundation for a decentralized perp and stablecoin contract without frictions created by unnecessary governance tokens or funding rates. </p></div></div><div class="footnote" id="footnote-2"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-2">2</a><div class="footnote-content"><p>I will ignore LP fee revenue in this explanation because I merely want to focus on the IL, and fees complicate the examples while providing no additional insight. I will also assume a simple ETH/USD pool, though it generalizes to any pair of tokens.</p></div></div><div class="footnote" id="footnote-3"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-3">3</a><div class="footnote-content"><p>LP leverage is not as dangerous as trader leverage. A trader leveraging 20x would be wiped out when the price moves 5%, while for an LP, it would take a 50%+ move if the LP did not trade.</p></div></div><div class="footnote" id="footnote-4"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-4">4</a><div class="footnote-content"><p>If LPs monopolize arbitrage trading on the AMM, everyone else who trades there would be 'liquidity' traders. These traders just want to alter their crypto exposure for myriad reasons unrelated to its current price premium to centralized exchanges (eg, need cash for a vacation or a long-term investment decision). These uninformed traders are also called 'noise' traders because 'white noise' refers to a mean zero random variable.</p></div></div><div class="footnote" id="footnote-5"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-5">5</a><div class="footnote-content"><p>Even if the LPs trade strictly proportional amounts of ETH, that will not necessarily imply their USDC changes will also be strictly proportional. The USDC amounts exchanged as a price move depends on whether the LP traded early in the sequence or later. As a practical matter, however, the resulting IL volatility is negligible: an order of magnitude lower and mean-zero (opposed to strictly negative).</p></div></div><div class="footnote" id="footnote-6"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-6">6</a><div class="footnote-content"><p>There are edge cases where an LP can become insolvent while never having a negative token balance, basically, terrible directional trading. However, it’s highly improbable.</p></div></div><div class="footnote" id="footnote-7"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-7">7</a><div class="footnote-content"><p>The minimum time is not obvious—a day, a week—but the key is making it more attractive to put on a position directly instead of doing so disguised as an LP. </p><p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-78130691156209310232022-11-01T11:40:00.010-05:002022-11-04T11:32:24.515-05:00An Alternative Capital Efficient AMM<p> Uniswap v3 introduced restricted ranges to address automated market maker capital efficiency. An alternative way to economize capital would give liquidity providers leverage. I will refer to this as a leveraged v2 contract or LAMM (Leveraged Automated Market Maker).</p><p>I made a prototype that works on Rinkeby <a href="https://sam-ruddy.vercel.app/" rel="noopener noreferrer nofollow" target="_blank">here </a>(you can see the contract code <a href="https://rinkeby.etherscan.io/address/0xc81C35Fdb2aB020cb35Eb256e480c93be7a60bb2#code" rel="noopener noreferrer nofollow" target="_blank">here</a>). </p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png" target="_blank"><div class="image2-inset"><picture><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png","fullscreen":null,"imageSize":null,"height":517,"width":1287,"resizeWidth":null,"bytes":107506,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="222" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02b2a586-f1a5-4af4-9661-2da9e9cd3cc2_1287x517.png 1456w" width="552" /></picture><div></div></div></a></figure></div><p>Adding leverage to an AMM has several benefits in addition to capital efficiency. For example, given the ability to extend leverage to LPs, extending leverage to traders is straightforward. This means a leveraged swap contract can allow traders to short and leverage long, previously only available in perpetual swap (‘perp’) markets. This perp market would have the added benefit of not requiring an oracle because the price is set by arbitrage, in that an underpriced token can be bought on the LAMM and then sold on another exchange at a higher price. This avoids the ridiculous funding rate premium mechanism, which is simply a conspiracy by insiders to milk extra revenue out of users (to see why it does and cannot ‘arbitrage’ the perp price see <a href="https://efalken.substack.com/p/perp-funding-rate-fraud" rel="noopener noreferrer nofollow" target="_blank">here</a>).</p><p>There are several other significant advantages to using a leveraged AMM compared to restricted ranges. For example, with leverage account insolvency is possible, there needs to be a reserve or insurance fund within the contract to prevent contract insolvency. In corporate financial theory, equity is often thought of as the residual tranche, the part of the capital structure that takes the first loss and that part that takes any extra revenue. Equity holders have rights and responsibilities, so they are correctly incented to make the contract work well; equity receives revenue for an essential continual service. In contrast, adding a fee to Uniswap going to their equity holders is simply a payment for branding, which seems quaint in the domain of open contracts.</p><h3>Preliminaries</h3><p>The canonical AMM is based on two formulas. First, the price is represented by the ratio of the tokens in the pool. For example, with 1500 USD stablecoins and 1 ETH, the price would be 1500, which is common sense.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5f368b87-e950-4999-ab69-22f732c00655_110x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":110,"resizeWidth":110,"bytes":1233,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="49" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5f368b87-e950-4999-ab69-22f732c00655_110x49.gif 1456w" width="110" /></picture><div></div></div></a></figure></div><p>Secondly, for an existing pool, a trade with ETH going in and USD going out is subject to the following rule: the product of both tokens must be maintained at its existing level, a constant.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif","fullscreen":null,"imageSize":null,"height":25,"width":138,"resizeWidth":150,"bytes":1074,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="27.17391304347826" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e332fed-bf5b-47ac-abc2-8c27f2fd7d34_138x25.gif 1456w" width="150" /></picture><div></div></div></a></figure></div><p>While this model works, unrestricted ranges are capital inefficient. For example, if you wanted sufficient liquidity so that a $10K order would move the price of a token priced at $1500 by 0.1%, you need $40 million in ETH and USDC in the pool. This is insanely inefficient for stablecoins, where 99.999% of the time, prices are locked at parity.</p><p>In May 2021, Uniswap released v3, allowing users to provide <em>restricted </em>or <em>concentrated </em>ranges. I describe the mathematics of v3 in this post <a href="https://efalken.substack.com/publish/post/72611169" rel="noopener noreferrer nofollow" target="_blank">here</a>. With v3, you use the same foundational equations above but have to adjust individual LP USD and ETH pool quantities to reflect their particular ranges and also track the vector of total liquidity provided across all possible prices. </p><p>One can see the capital efficiency by noting how much capital is required to provide the same amount of liquidity for various ranges. Below we see how much capital is needed as a percent of the unrestricted range (i.e., v2) for range sizes.</p><p><strong>Figure 1</strong></p><p><strong>Relative Capital For Symmetric Restricted Ranges of Various Sizes</strong></p><p><strong>Same liquidity</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png","fullscreen":null,"imageSize":null,"height":163,"width":424,"resizeWidth":null,"bytes":3798,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="163" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffec8430a-b0e0-45e3-82c0-f797f4d6274e_424x163.png 1456w" width="424" /></picture><div></div></div></a></figure></div><p>* e.g., a 10% spread for a token priced at 100 would have bounds at 90 and 111 (i.e., 100/0.9)</p><p>As shown above, a stablecoin pair where an LP offers liquidity between 99.9 and 100.1 can provide 0.05% of the capital for the same amount of ‘liquidity.’ This v3 pool would be 2000x more capital efficient than v2.</p><p>For pairs with risky tokens, like ETH/USDC, a range covering 15% up or down corresponds to about a week’s volatility. An LP receives fees only while the current price is within its range, defined as an ‘active’ range. If one wanted to be 95% sure their range would be active after a week of neglect, a token like ETH with an annual volatility of 90% needs a 30% range, which requires only 15% of the capital of a v2 range.</p><p>While the market price can breach all restricted ranges, such a case generates no risk to users; the pool would merely become irrelevant. There would be no trades so that the LPs would generate no trading fees, but neither LPs nor traders would have credit risk. A pool where all the LP ranges were inactive would be like if there were a venue where one could buy Bitcoin for $100k; no one would use it. In v3, the total absence of active ranges is rare because other LPs arise to capture fee revenue; the first to provide liquidity with a dynamic range would get 100% of fee revenue.</p><h3><strong>Alternative</strong></h3><p>Uniswap’s concentrated range is not the only way to economize on LP capital. Indeed, as a v3-style approach capital efficiency is absent off the blockchain, it is not the simplest way to leverage capital. While admirably clever, it is a product of path dependence, aiming to maintain the standard functionality of v2 by adding several parameters. Leverage, or its converse margin, is the common traditional finance method. Remember that leverage and margin are just two sides of the same coin, in that maximum leverage of 8 implies a 12.5% required margin.</p><p>Consider the case where Alice provides liquidity for a range covering the current price by +/- 10% with the same liquidity as an unrestricted pool (hereafter, ‘v2’). Below the v2 case is presented as a special case of v3 where the range is infinite (zero to infinity). The capital needed for the v3 range is about 5% of that required for a v2 pool, consistent with Figure 1 above.</p><p><strong>Figure 2</strong></p><p><strong>Alice’s v3 LP vs. a v2 LP with the Same Liquidity</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxU7gVcNn68ZzHRmYWbSNAaMMx-ouSxOUwbSH8oVv1sY5oN_acGxquLeO5UqMHO3m5ZMA4uXWF29xFQDcfgfXxYIfnKY0BJ5mm9qQ2hF8-mY7GJUwQez4LrBAyQ21CYoGqccr1oMUsqWRui9cgocmVsDXhrwxKtK84rnhlo5ZU_O_aJxXWWt8/s301/afig2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="201" data-original-width="301" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxU7gVcNn68ZzHRmYWbSNAaMMx-ouSxOUwbSH8oVv1sY5oN_acGxquLeO5UqMHO3m5ZMA4uXWF29xFQDcfgfXxYIfnKY0BJ5mm9qQ2hF8-mY7GJUwQez4LrBAyQ21CYoGqccr1oMUsqWRui9cgocmVsDXhrwxKtK84rnhlo5ZU_O_aJxXWWt8/s1600/afig2.png" width="301" /></a></div></div><p>We can replicate the v3 capital savings via leverage, which implies giving the LP an asset and liability. Assume Bob provides 1.32 ETH and 1987 USDC in a leveraged v2 pool, the same token amounts Alice provided in her v3 pool. Here Bob would need to borrow ‘25.82 - 1.32’ (24.49) ETH, and also 36,742 USD. Instead of Alice’s extra account parameters pLow and pHigh, Bob has the additional account parameters corresponding to the ETH and USDC he borrowed to establish his v2 range. For Alice in her v3 range, and Bob in his levered v2 range, their account parameters look like this:</p><p><strong>Figure 3</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8iFsXyuRJEqgoQJ-h2kM3oOAFAUPx99gnE4qOp_0CtE_NX9CiTkuwkpSOJ8DwvLN15VHnwRlbuRcWMhfUn9XtvQ3cTu4MDIlh7gMs8-Zy2zJJgODCGHdaasbj0mhgLpLRYvec_wIJvTiHbZKGRuKTv8ubaylAOr54SSn12jF9zvqnUgZjlw/s301/afig3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="204" data-original-width="301" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8iFsXyuRJEqgoQJ-h2kM3oOAFAUPx99gnE4qOp_0CtE_NX9CiTkuwkpSOJ8DwvLN15VHnwRlbuRcWMhfUn9XtvQ3cTu4MDIlh7gMs8-Zy2zJJgODCGHdaasbj0mhgLpLRYvec_wIJvTiHbZKGRuKTv8ubaylAOr54SSn12jF9zvqnUgZjlw/s1600/afig3.png" width="301" /></a></div></div><p>Bob borrows 24.49 ETH so that in addition to his initial ETH deposit, he has the right amount of ETH in the pool (and the same for USDC). This is reflected as a debit in his account labeled ‘vETH.’ Initially, his borrowing does not affect his account’s market value; it creates a symmetric asset and liability that cancels out. Bob’s net or ‘real’ ETH is 1.32, just like for Alice.</p><p>They have identical net amounts of ETH and USDC in their accounts, supporting the exact same amount of liquidity. As the price changes, this implies changes to their pool amounts, which in both cases are fictive numbers representing the implied amounts for a v2 pool. The pool amounts are levered LP Bob’s assets. As long as the price is within Alice’s range, Alice and Bob will have identical LP account values and thus also PnLs. This implies their <strong>impermanent loss</strong> (IL) will also be identical.</p><p><strong>Figure 4</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png","fullscreen":null,"imageSize":null,"height":583,"width":882,"resizeWidth":408,"bytes":48394,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="269.687074829932" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F79dc219c-7302-4bb6-bba2-63325d0df840_882x583.png 1456w" width="408" /></picture><div></div></div></a></figure></div><p>The difference between the PnL and the IL is the effect of the initial 1.32 ETH invested. Given their initial investment of $3975, Alice and Bob have an identical account value at the inception ETH price of $1500. The approaches generate identical PnLs across Alice’s v3 price range. </p><p>Over a broader price range, however, these approaches differ significantly. This is because Alice’s portfolio positions are static outside her price bounds. Bob’s levered position, however, changes continuously so that his account value becomes negative when prices move significantly up or down. [This all ignores fee revenue to make the presentation simpler.]</p><p><strong>Figure 5</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f690e385-2a08-447e-8cea-47468479e677_898x567.png","fullscreen":null,"imageSize":null,"height":567,"width":898,"resizeWidth":446,"bytes":43883,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="281.6057906458797" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff690e385-2a08-447e-8cea-47468479e677_898x567.png 1456w" width="446" /></picture><div></div></div></a></figure></div><p>While Bob’s levered position is riskier over the infinite price range, the difference between Alice and Bob is slight over a broad price range from $1000 to $2000. Indeed, as noted for Figure 5 above, their PnLs are <em>identical</em> when the price is within Alice’s range of $1350 to $1667.</p><p>Bob’s potential for a negative account value, insolvency, implies a liquidation method is needed to protect the levered pool because if one party has a negative account value, not all accounts will be able to retrieve their full account values. Insolvency without any insurance fund would generate a run as those with assets in the pool would want to withdraw early enough to get their total account value; with an insurance fund, the equity owners would suffer a loss. </p><p>In the above example, we have 20x leverage given to LP Bob in that his pool ETH and USDC are about 20 times his initial ‘real’ ETH and USDC deposits. Leverage applied to an LP is very different than giving that to a trader. <em>LP </em>Bob’s account becomes insolvent at price moves of -50% and +95%, while a <em>trader </em>with 20x leverage would lose all of his money with a mere 5% price move. As the daily volatility of ETH is 5%, the protocol has adequate time to anticipate and rectify potential insolvencies before they are realized.</p><p>As a practical matter, however, a LAMM will be more concerned with LP token deficits rather than insolvency. As Bob matched Alice’s 10% range with his initial token allocation, a +10% price move would exhaust his ETH, and a -10% move would drain his USDC. At the price point of $1350 in Figure 6 below, Bob has zero net USDC, just like Alice. </p><p><strong>Figure 6</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png","fullscreen":null,"imageSize":null,"height":637,"width":989,"resizeWidth":394,"bytes":56348,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="253.76946410515671" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa96a5479-7e91-4f2d-adee-200b66960ff1_989x637.png 1456w" width="394" /></picture><div></div></div></a></figure></div><p>While Bob has no more USDC to give out when the price of ETH falls to $1350, the value of his account is $3674, a loss of only $301, or 7.5%. Thus, well before the price moves that would render a LAMM LP insolvent, the protocol needs a mechanism for either motivating Bob to add tokens or incenting new LPs to add tokens so that swaps can resume.</p><p>A price where the LPs have net nonpositive USDC, such as $1350 in this example, implies no swaps can occur below this price. As with v3, this is not a danger to anyone, just a lost opportunity. Unlike the v3 case, new LPs will not get all the fees if they rectify this situation but instead share this fee revenue pro-rata with the existing LPs. This weakens the incentive for providing essential additional liquidity in the LAMM without some extra mechanism.</p><p>As a practical matter, there will be several, if not hundreds, of LPs, each with different starting price points and so each with different net token amounts. One LP with a net negative USDC would probably not mean the LPs as a whole have a net negative USDC balance. It is not essential to immediately liquidate an LP with a negative net token position, as the contract will still probably have positive net amounts of both tokens. This implies the rule for liquidation need not assume a single LP’s net token deficit implies a complete token deficit. For example, Bob could be liquidated when his net USDC fell below -1000, as opposed to 0.</p><p>Remember that in v3, the pool can also run out of a token if the price exceeds all LP ranges; historically, this has not been a significant problem. As the LAMM has weaker incentives for adding liquidity when the pool is out of a token, the key is creating incentives so this situation would be as rare as we see with v3 pools. This is a problem with several solutions.</p><h3><strong>Mechanisms for Incenting LPs to Maintain Positive Token Positions</strong></h3><p>An LP liquidation would be seamless in that no large trade is needed. An LP liquidation simply takes the ‘pool’ ETH and USDC implied by his liquidity given the current contract price, adds it to his vETH and vUSDC accounts, and zeros out his LP liquidity. The LP is left with an account with a positive value but deficient in one of the tokens. The contract could require the LP to have non-negative ETH and USDC balances before withdrawing his tokens. In the example below, the price has fallen to $1300, giving Bob a deficit of 686.83 USDC. Bob would be incentivized to deposit an additional 686.83 USDC in the contract, allowing him to withdraw his 3.24 ETH (worth $4,212). Once removed, the situation would be like when a v3 pool has no active ranges: no risk for anyone, just an opportunity for new LPs.</p><p><strong>Figure 7</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ738Qw_BadBeHKeTByGHJEORc_uH7UVnUvYTGH3eUQOQ32BuGgIEHnIATh6gftSdBR9qihyJJ1u-aaf-wZcWsPpBNqlA0Xf5MPjS7q-5BftAWklAkGK_zO76gCRkEgUYSutobSG3w-9i2oNVvgFOjSBwUPC3SE6Eaex9rkrRJa-UCOzvHZUI/s301/afig7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="204" data-original-width="301" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ738Qw_BadBeHKeTByGHJEORc_uH7UVnUvYTGH3eUQOQ32BuGgIEHnIATh6gftSdBR9qihyJJ1u-aaf-wZcWsPpBNqlA0Xf5MPjS7q-5BftAWklAkGK_zO76gCRkEgUYSutobSG3w-9i2oNVvgFOjSBwUPC3SE6Eaex9rkrRJa-UCOzvHZUI/s1600/afig7.png" width="301" /></a></div></div><p>One solution would allow new LPs to remove deficient LPs when adding liquidity simultaneously. For example, a new LP could specify an existing LP deficient in one of the tokens at the time of adding liquidity. The contract would check to validate the LP was in default, then liquidate the LP while adding the new LP (here, default is triggered by a minimum net token balance, as opposed to the usual market value vs. required margin). This would give the new LP a greater incentive to rectify the problem, as it would make the situation identical to v3, where new LPs are incented by the lure of 100% of fee revenue.</p><p>Alternatively, one could emphasize the cost of the deficient LPs by giving keepers an incentive fee to liquidate LPs who are deficient in one token. This would be like the above condition, but with a different agent policing the contract for deficient LPs and a more prominent cost applied to these defaulting LPs. One could add that a liquidator must also rectify the liquidated LPs deficient token balance (which would require giving the liquidator an equal value of the defaulting LP’s surplus token).</p><p>Another solution would apply a funding rate based on the total LP’s net ETH and USDC. This would be a profoundly different application of the funding rate commonly used in perps, where the perp price is compared to an external spot price. One could use various functions, but the gist would be that the cost applied to deficient LPs would increase exponentially as the contract’s net ETH or USDC approached zero, giving LPs an incentive to add the deficient token. </p><p><strong>Leveraged Traders: Perps</strong></p><p>The leveraged LP has pool tokens implied by his liquidity and a corresponding debt reflecting his leverage so that his real or net ETH balance is the sum of these two accounts.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a> If we treat his vETH account not merely as a debt but as a general trade account that can be negative or positive, traders could get leverage in the exact same way. The liquidation and accounting mechanisms would already be in place.</p><p>For example, trader Bob could deposit $750 USDC into the contract, generating the following account profile on contract.</p><p><strong>Figure 8</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png","fullscreen":null,"imageSize":null,"height":124,"width":193,"resizeWidth":null,"bytes":1885,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="124" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f90bf19-bde7-4c53-b10b-6ed4b35407ea_193x124.png 1456w" width="193" /></picture><div></div></div></a></figure></div><p>Assume Bob then sells 1.0 ETH. Assuming no fees or price impact and a margin requirement of 20% (i.e., 5x leverage max), this would generate the following account data.</p><p><strong>Figure 9</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png","fullscreen":null,"imageSize":null,"height":124,"width":193,"resizeWidth":null,"bytes":2036,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="124" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3d8486ad-b11c-4e74-ad0a-c3c0bdb33aa9_193x124.png 1456w" width="193" /></picture><div></div></div></a></figure></div><p>Alternatively, trader Alice could deposit $375 worth of ETH</p><p><strong>Figure 10</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/aaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png","fullscreen":null,"imageSize":null,"height":124,"width":211,"resizeWidth":null,"bytes":1948,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="124" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faaecc187-fe2a-4160-a1c3-658fe95ab710_211x124.png 1456w" width="211" /></picture><div></div></div></a></figure></div><p>If she shorted 1.375 ETH, her account would look identical to Bob’s in figure 9. </p><p>Or consider the case where a trader deposits 1 ETH and goes long 2 ETH, shown in Figure 11 below. His account would look like this:</p><p><strong>Figure 11</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/25476326-b255-4d02-9133-6b7bc0400b98_193x124.png","fullscreen":null,"imageSize":null,"height":124,"width":193,"resizeWidth":null,"bytes":2132,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="124" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F25476326-b255-4d02-9133-6b7bc0400b98_193x124.png 1456w" width="193" /></picture><div></div></div></a></figure></div><p>One need only monitor whether the trader’s account market value exceeds his required margin, regardless of whether they are long or short. As long as traders cannot withdraw more than their required margin, and there is a mechanism and incentive for liquidators to liquidate defaulting accounts when they violate their required margin, the contract is safe.</p><p>Leveraged trading would allow the contract to function in a limited sense until some LP rectified the pool USDC deficit by depositing USDC. That is, while the contract has no USDC, traders cannot sell ETH for USDC as a swap, but those with collateral could sell ETH on the contract, generating a credit to their USD balance. A liquidation rule or funding rate approach will incentivize the existing LPs to shore up their balances soon, at which time the trader could withdraw their USD credit as USDC. </p><h3>No Oracle-based Funding Rate</h3><p>By having both Uniswap and perp functionality, the contract price would be set by arbitrage, not a funding rate linked to an oracle. This would eliminate several problems in perp protocols. Oracles needed for standard perp funding rate calculations can be hacked and censored. More importantly, the funding rate mechanism used to link perp prices with spot prices is a farce in that it is profoundly different than the funding rates applied in traditional swap markets or the basis in futures markets.</p><h4>The Funding Rate Farce</h4><p>In prime broker swap accounts, the funding rate is completely independent of the price; the assets in these accounts trade on spot markets as if they were not in swap accounts (you cannot tell which trades on the NYSE were made from swap accounts). Swap funding rates change slowly like general interest rates, are known ex-ante, and only apply to overnight positions. There is no reason to apply intraday funding rates because it is a pointless extension, as the magnitudes are too small to incent behavior meaningfully.</p><p>In futures markets, the difference between the futures and spot price is called the basis. It converges to zero at maturity, and as the futures moves toward the spot price over time, its change acts as a funding rate. This basis, however, is orders of magnitude greater than the usual 0.03% price premiums in perp markets. This larger basis allows for real arbitrage because it covers transaction costs and can be locked in. In contrast, in perp markets, the perp premium at the time of trade means almost nothing, as the funding rate is a function of the average perp premium over a position’s duration, not its value at the time the trade was initiated. </p><p>A perp price is set by a Schelling point, in that the most obvious target is the spot price, and the funding rate is just there to make traders feel comfortable that it is not <em>merely</em> a Schelling point. The fact that there is a vague relation to an equilibrating mechanism seemed a necessary and sufficient condition for perp markets when users had only one coin in the protocol, as was the case with BitMex in 2016. However, when trading ETH for USDC, this mechanism is an anachronism: let <em>real </em>arbitrage set the price.</p><p>The perp premium funding rate mechanism is incoherent and used to fleece traders whenever they are drunk with house money. If the market has just gone up, many ETH holders are sitting on big gains, so they do not mind paying an extra 5% for a month (aka only 0.018% every 8 hours). If your perp protocol has a funding rate based on its perp price premium to the spot, your perp protocol managers are either ignorant or evil.</p><h3>StableCoin</h3><p>An ETH-USDC contract with perp and Uniswap functionality naturally produce a stablecoin. Consider a user who deposits 0.375 ETH, where the ETH price is $2000. Her account value and required margin would look as follows:</p><p><strong>Figure 12</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7su50SE8MbLySlA0_uKzD7LOgvT-lufgHOIVLa2D3Cc8BhQW2-ILlTZFWLnZh2BorNh57a_TGN4YMFGb-XHq4_E_CqcSTX8ie6DYU32ix804-RfAHINWaRhKpxEWaWqILNoF9DsDWwxQnhpCcHky9pX53m1feY7o9ngoK_5vhgpTbE7HR0yU/s211/afig12.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="211" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7su50SE8MbLySlA0_uKzD7LOgvT-lufgHOIVLa2D3Cc8BhQW2-ILlTZFWLnZh2BorNh57a_TGN4YMFGb-XHq4_E_CqcSTX8ie6DYU32ix804-RfAHINWaRhKpxEWaWqILNoF9DsDWwxQnhpCcHky9pX53m1feY7o9ngoK_5vhgpTbE7HR0yU/s1600/afig12.png" width="211" /></a></div></div><p>Assume the trader goes long 0.625 ETH using leverage. Her account value would look like this:</p><p><strong>Figure 13</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHBDrIDJlOj5dZcTUGq7h16zlhrsN0qABh4yGWdVvqywUAr0xRcsV5IAWXg_3Go77hZCvCcKWSJIphQOCpv_uK4XOpdALwrk-tPChrkGi8xpwRU-PtkN9SOrsOarOtjtVjeD2Ka16COEo957J8tle4f54WrcrRv8RQsFxaKQjzIVKjSgsNtPg/s211/afig13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="211" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHBDrIDJlOj5dZcTUGq7h16zlhrsN0qABh4yGWdVvqywUAr0xRcsV5IAWXg_3Go77hZCvCcKWSJIphQOCpv_uK4XOpdALwrk-tPChrkGi8xpwRU-PtkN9SOrsOarOtjtVjeD2Ka16COEo957J8tle4f54WrcrRv8RQsFxaKQjzIVKjSgsNtPg/s1600/afig13.png" width="211" /></a></div></div><p>As she is long $2000 worth of ETH, she needs 20% of that value in her account to satisfy her margin requirement.</p><p>Now consider Bob, who deposits 1 ETH in the contract. His initial account value would look like this:</p><p><strong>Figure 14</strong></p><div class="captioned-image-container"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxrHyeYJdE1szL_dg_hOr0oGsZK5zVxV5tA3B8smlzmqB7U2SUN3e5jq5j8BqDf3N8kGBoQf2bgFH0zUTVMHg3jmCxb8oczGvPU8BK0oDdt8qXXeMANfgNJJ8MBtip0ULFpFEYiHBu4nkFeYEG_Q2_4Sz_81Yn7jPI8UHTRtRScIT-ept9kb8/s211/afig14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="211" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxrHyeYJdE1szL_dg_hOr0oGsZK5zVxV5tA3B8smlzmqB7U2SUN3e5jq5j8BqDf3N8kGBoQf2bgFH0zUTVMHg3jmCxb8oczGvPU8BK0oDdt8qXXeMANfgNJJ8MBtip0ULFpFEYiHBu4nkFeYEG_Q2_4Sz_81Yn7jPI8UHTRtRScIT-ept9kb8/s1600/afig14.png" width="211" /></a></div></div><p>He also has a $400 required margin, but as his position is not leveraged, it is never a concern. This is because if the value of ETH goes down, so does his margin requirement, and vice versa.</p><p>Bob can turn this into a MakerDao-like CDP position by withdrawing a new stablecoin, vUSD. Such a coin would be worth USDC within the contract, both adding to a user’s USD account when deposited, subtracting from the USD when negative. Yet the stablecoin would help economize on the contract’s USDC. By giving users cheaper fees when withdrawing a new vUSD stablecoin instead of USDC, a user would be incentivized to withdraw vUSD instead of USDC. The ultimate fungibility of USDC into vUSD on the contract would set the value of vUSD at parity with USDC as long as the contract is solvent. A withdrawal of $1250 vUSD would leave Bob’s account looking like Figure 15 below:</p><p><strong>Figure 15</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0ce0138a-5d9c-43eb-83b5-9a44e5246794_302x194.png" target="_blank"></a><div class="separator" style="clear: both; text-align: center;"><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0ce0138a-5d9c-43eb-83b5-9a44e5246794_302x194.png" target="_blank"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgbRIJtGEiqHmODfgvz-tH2lWJq7vpqdZGhReCNEZaIz_rc7RT8wAjlDUGLcd294sLfPd2GQLeMKO0oNJSJtgrFOfDHQTQDdqhdpINtGccbRXMC15hOajnTmiDq74xUiZJZShFJ8ZhiEhuOPltnBfRFas0rWPhn5FcYpr2HYW6eQ4KFCSP-jo/s211/afig15.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="211" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgbRIJtGEiqHmODfgvz-tH2lWJq7vpqdZGhReCNEZaIz_rc7RT8wAjlDUGLcd294sLfPd2GQLeMKO0oNJSJtgrFOfDHQTQDdqhdpINtGccbRXMC15hOajnTmiDq74xUiZJZShFJ8ZhiEhuOPltnBfRFas0rWPhn5FcYpr2HYW6eQ4KFCSP-jo/s1600/afig15.png" width="211" /></a></div><div class="image2-inset"><div></div></div></figure></div><p>Bob’s account is exactly the same as Alice’s, though they arrived via different trades. A MakerDao CDP that generates a stablecoin is identical to a levered long position collateralized by ETH. A LAMM with swap and perp functionality makes stablecoins the way a donut maker makes donut holes, it’s an unavoidable complementary product. Just as it would be inefficient to produce donut holes but not donuts, it would be inefficient to produce stablecoins without a perp contract. </p><p>The benefit of this approach is that it creates stablecoins more efficiently because, unlike MakerDao, it does not rely on auctions or oracles. Auctions can be gamed, as <a href="https://medium.com/@whiterabbit_hq/black-thursday-for-makerdao-8-32-million-was-liquidated-for-0-dai-36b83cac56b6" rel="noopener noreferrer nofollow" target="_blank">when </a>MakerDao sold $8MM worth of ETH in March 2020 for zero USD. In a LAMM, a defaulter’s net ETH position is straightforward to close on the contract. Relying on oracles is also problematic, as these can be hacked or censored.</p><p>In the long run, one could have several independent contracts, each with its own stablecoin. For example, a vUSD2 for a WBTC-USDC contract and a vUSD3 for a UNI-USDC contract. These other stablecoins would be supported solely by their specific LAMM contract, independent. Eventually, if one of these stablecoins became popular and used like USDC for transacting with several other contracts or products, it could act as if it were USDC. Like the creation of fiat money or valuation in new tokens, use eventually implies real value even if no ‘real’ assets are backing the token. Eliminating centralized stablecoins such as USDC from the blockchain is essential for long-run security. The creation of efficient decentralized stablecoin mechanisms is essential for that objective.</p><h3><strong>In summary</strong></h3>
<ul><li>Leveraged AMMs can economize on capital like restricted ranges<ul><li>LAMMs naturally extend to provide perps and stablecoins</li></ul></li><li>Current Perp Markets are Censorable and Gamed<ul><li>Perps on low-latency platforms are effectively centralized</li><li>The BitMex-style funding rate equilibrating mechanism is a farce; it does not and cannot equilibrate the perp market<ul><li>funding rates are manipulated to benefit insiders</li><li>see my <a href="https://efalken.substack.com/p/perp-funding-rate-fraud" rel="noopener noreferrer nofollow" target="_blank">prior post</a> for an explanation</li></ul></li><li>A LAMM generates perps supported by real arbitrage</li></ul></li><li>Existing Stablecoins Not Sustainable<ul><li>Most centralized, fine for now, but not a long-run solution</li><li>Decentralized stablecoins have regulatory attack surfaces<ul><li>Identifiable persons with control over choke points</li><li>Oracles like Chainlink are censorable</li></ul></li><li>Governance tokens have weak revenue endgames<ul><li>incentive to embrace regulations when token growth stops</li></ul></li><li>A LAMM generates stablecoins without centralized attack surfaces</li></ul></li></ul>
<p>Concentrated liquidity in AMMs is a great innovation but ultimately ephemeral because it is inefficient. If there are ways to generate the same leverage but with more functionality, those will be adopted. There are many overvalued Ethereum tokens, and it would be nice to be able to short these on-chain, not just sell them. It would be nice to be able to short BTC or ETH, or take a position on BTC/ETH on-chain. None of this is feasible with only Uniswap pool functionality.</p><p>Shorting would benefit the Ethereum ecosystem because Ponzi tokens are a systemic threat in that they are common and run by stupid or evil people taking advantage of new crypto investors. These crap-coins sully the reputation of everything on the blockchain. It is much harder for insiders to maintain the value of a Ponzi token when people can short.</p><p>Yield farming highlights how inefficient many liquidity positions are because if collateral can be used elsewhere, that implies it is not used efficiently. If we ignore transaction and information costs, using LP tokens as collateral on other platforms is efficient; in practice, these costs are significant. For example, if you could use your house down payment to collateralize a car loan, your car lender would be better off requiring less collateral in cash. This is because lenders specialize in certain assets and are not efficient at monitoring the value of every asset one could apply collateral to and then making transactions in these other markets. A car seller would prefer you take out an additional home equity loan and give them the cash as collateral for a car loan, allowing the car seller to avoid building the infrastructure to monitor and potentially seize a person’s house. </p><p>This post is already too long for most readers, so I will not outline the best part of this approach, which is how it facilitates a mechanism to eliminate impermanent loss. Maybe later.</p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>LP(i) net ETH = vETH + liquidity(i)/sqrt(price); net USD = vUSD + liquidity(i)*sqrt(price)</p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-71481766781004725992022-11-01T11:40:00.006-05:002022-11-04T11:09:00.310-05:00My $340k Hack<p> On Monday, April 4, 2022, a hacker stole $340,000 worth of crypto from my 401k’s Kraken account. Below is a post-mortem in that, hopefully, others will learn to avoid the mistakes I made.</p><p>I awoke on Monday, April 4, around 6 AM Central Time, and could not access my Gmail account. When I asked Gmail to send a recovery code to my phone via SMS or my recovery email account, none arrived. The phone seemed to be working because my home Wi-Fi access allowed sufficient functionality not to suspect my phone number was transferred, and so I figured my problem was some bug, a minor annoyance.</p><p>I went to my local T-Mobile shop as soon as it opened at 11 AM to see why I could not get my phone messages. The T-Mobile agent informed me that my SIM chip had 'died,' an unremarkable failure. I noted it was suspicious that I was locked out of my Gmail at the same time, but this additional information made the T-Mobile rep extremely defensive. He then explained how T-Mobile has absolutely nothing to do with Google and that I should contact Google about such matters, etc. There is no Google helpline to answer specific questions about my account, which they should have known. </p><p>In retrospect, the local T-Mobile rep who told me my SIM chip malfunctioned should have known my number was transferred earlier that day, which had very different implications. His defensiveness makes me think T-Mobile has a policy of focusing hacked customers on every attack surface but T-Mobile, even at the cost of not divulging relevant information.</p><p>With possession of my phone, I could get back into my Google account, still thinking my problem was a mere bug. Then I discovered that my backup email account did not receive a code because someone had changed my recovery email to my Gmail account, i.e., itself, indicating I had been hacked. </p><p>I discovered the hacker sent two creepy sexual emails to women pulled from some of my recent conversations. This was probably meant to distract me from attending to the hack, as it did. I wrote these people several emails explaining my situation, hoping they would believe me when I told them I had not sent such emails (of course, that's what a creepy perv <em>would</em> say). </p><p>A phone SMS was one of my Gmail recovery devices, so it was obvious how the phone hacker could access it (click ‘forgot password’ and get a temporary password sent to the phone). Unfortunately, I used Google's password manager, so once the hacker had my Google account access, he could access all my other usernames and passwords.</p><p>While an online password manager like Google is not super secure, I felt safe because my traditional finance accounts would be difficult to hack. These inform me about transactions, and they have a one or two-day grace period where transactions can be reversed. As for crypto, all my accounts on regulated exchanges were secured by Authy (Gemini) or Google's Authenticator (Kraken, Coinbase). I supposed these could not be accessed without access to my physical phone and its password; that is, my Authenticator’s various account information was only on my physical phone.</p><p>After several calls to T-Mobile, I finally learned that my phone had been transferred at 1:17 AM PT at a T-Mobile store in California near Oakland. I asked T-Mobile how this could have happened, as that store was closed at that time, it was 2k miles from my home, and the thief would need a photo ID and my phone security code. I was given no further explanation, though they would often end their stonewalling with the exasperating phrase: "is there anything else I can help you with today?"</p>
<ul><li>1:17 AM hacker transfers phone number in Gilroy, CA. This gave him access to my Google account because it used a phone's SMS messaging as a recovery tool. Once in, he could then access the passwords I had on Google's password manager</li><li>1: 22 AM accesses my Google account</li><li>1:58 AM accesses Kraken account</li><li>In the period between getting into my Kraken account and the hour it took to get my coins out, the hacker did the following searches and went to the following URLs. He was logged into my Gmail account then, and this type of information is recorded under Google activity.<ul><li>“withdraw from kraken”</li><li>https://support.kraken.com/hc/en-us/articles/360048656092-How-to-withdraw-funds-from-your-Kraken-account&usg=AOvVaw2oGFinYY_ZxcsWvp_oKiok</li><li>“avalanche wallet”</li><li>https://www.avax.network/&usg=AOvVaw1b3ozPJI09cm5KStcq8fSC</li><li>https://support.avax.network/en/articles/4626956-how-do-i-set-up-metamask-on-avalanche&usg=AOvVaw3MZjNtjYeFqKFil9gV-vSa</li><li>https://mathwallet.org/avalanche-wallet/en/&usg=AOvVaw2zZRXM5UFi-xYY3D2k41u9</li><li>https://mail.google.com/mail/#search/Funding%202FA</li><li>“funding 2fa kraken”</li><li>https://support.kraken.com/hc/en-us/articles/360000911763-How-does-two-factor-authentication-2FA-for-funding-deposits-withdrawals-work-&usg=AOvVaw0qkFXWTHaI3kt1VLJNF_2k</li><li>“gauth.nl”</li><li>https://gauth.apps.gbraad.nl/&usg=AOvVaw0zHn5z4zpPZQPrm4Evo-gf</li><li>“tornado eth”</li><li>https://tornado.cash/&usg=AOvVaw3FIZBAZWZE8_CYLHuNBu1K</li><li>“how long do kraken withdrawals take”</li><li>https://support.kraken.com/hc/en-us/articles/360000674046-Cryptocurrency-withdrawal-statuses&usg=AOvVaw1vYeY9SDEqtU1iz63Y86up</li></ul></li><li>2: 32 AM withdraws 903.9399 AVAX tokens ($85k)</li><li>2:33 AM Removed the restriction on withdrawals > $100k</li><li>2: 48 AM withdraws 2711.91 AVAX tokens ($260k)</li></ul>
<p>I logged into my Coinbase account and discovered the hacker had been on this account earlier that morning, but as there was nothing in there, he did nothing. While my account username and password were in my Google passwords, which he had access to, this account required access to my Google Authenticator. Yet it was not just Authenticator, as the hacker got into my Gemini account that uses Authy.</p><p>I had not saved any recovery information for Authy or Authenticator, so I was perplexed about how the hacker had gotten in. Perhaps they could repopulate them by asking the exchanges for a Master Key or other such information. I asked Kraken, etc., if they knew how Authenticator could be transferred, but they all put up a wall of silence once informed of my hack, saying they would only respond to law enforcement officials in this matter for compliance reasons.</p><p>On Gemini, I had only a trace amount of money, but I had a linked bank account. The hacker initiated a deposit of $50k from my connected bank account within the Gemini account (i.e., he didn't log into my bank account), which enabled the hacker to buy $50k worth of bitcoin. The hacker could not withdraw that bitcoin until the $50k bank transfer was settled in two days. This would have worked if I had been distracted for the week, but I closed that position immediately and canceled my bank transfer. I lost about $1k on the hacker's Bitcoin trade as the price declined.</p><p>Searching online, I found the T-Mobile fraud office, but it could only be reached by snail mail. I informed them about my hack and got a reply a few weeks later, telling me they were glad they had solved my problem (I did get my phone number back!). They did not mention how my phone number could be transferred when the store was closed, whether the sales rep listed on that transfer existed, etc.</p><p>I could see logs of my sessions with the various exchanges that morning. The IPs used differed each time but all from my hometown metro area of Minneapolis. They were close enough to get through standard fraud protection algorithms, though this tactic is easy to do with a VPN. Clearly, he knew my name, address, etc., and that I probably had crypto on various exchanges.</p><p>A mere 75 minutes after accessing my iPhone, the hacker withdrew $90k worth of AVAX coins (<a href="https://snowtrace.io/tx/0x2ae973c88807ae9cbaf557094903d45e93603fc62633771930ca63fe6b70d2f1" rel="noopener noreferrer nofollow" target="_blank">this </a>transaction on the AVAX blockchain). This account had an extra security feature enabled that required a separate process for withdrawals of more than $100k, but somehow, he was able to disable that requirement, rendering it pointless. Looking back at Kraken's emails to my attached email account, I could see a Kraken message notifying me of the withdrawal restriction change around the time the hacker's initial withdrawal was processed. Kraken would not respond to the specifics of my case, so I do not know the protocol that enabled this disabling. </p><p>This secondary Kraken account withdrawal restriction was also in my Google Authenticator, so it seems either the hacker did not see this additional Authenticator item, or his Authenticator access only had initial log-in accounts. Alternatively, he used some other means of getting around the initial Authenticator log-ins via a mere email account connected to my Kraken account, and relevant emails were erased from my email account by the hacker before I could see them.</p><p>After the final Kraken withdrawal restriction was removed, he withdrew the remaining AVAX tokens, worth around $260k at the time (tx <a href="https://snowtrace.io/tx/0x71e491ee913d7a035a044fc920ab92a2de7b46bd531dd2bb296e15e1d4d88188" rel="noopener noreferrer nofollow" target="_blank">here</a>). This all occurred within 90 minutes of accessing my phone as I was sound asleep.</p><p>The hacker never even tried to access my traditional financial accounts.</p><p>A common issue in my case is that anytime I spoke with someone from one of my hacked accounts, they would ask the same stupid questions and give the same stale advice. For example, they all asked if I had recently shared my passwords with anyone and told me to change them. Every conversation included this annoying 5-minute lecture.</p><p>I contacted the FBI's cybersecurity squad, giving them all the information I had from the various activity logs at each account. I asked the FBI if they could find which T-Mobile employee transferred my phone while the store was closed, as this seemed like an insider job. Strangely, all the FBI would say about T-Mobile, and my phone hack was that they doubted T-Mobile was at fault, giving me no other information. The FBI did mention they would check into the IPs used to access my various accounts, but nothing ever came of that, which makes sense because they were probably spoofed IP addresses facilitated by a VPN. They were uninterested in figuring out how the hacker was able to disable my Kraken withdrawal restriction or get around my Authenticator.</p><p>I hired a lawyer who told me that to get restitution from T-Mobile, I would need first to get around the standard EULA's 'contract of adhesion,' enabling me to have the standing to file a negligence claim where I could sue for damages. These would take $100k+ and a couple of years.</p><p>My lawyer also told me that my T-Mobile hack was probably related to two T-Mobile data breaches in 2021. He got this insight from one of his assistants, which shows up in a quick web search. However, these hacks only contained customer information like address, phone, and social security numbers, which would be insufficient to transfer a phone number. I had to show my photo ID and my T-Mobile security code, something not in my Google passwords, to get my phone number back. </p><p>My lawyer hired a cyber security 'expert,' but this clown merely summarized the account log information I had given him (for $5k). This crypto expert's only recommendation was to check the various IPs used to access my accounts, the same singular insight the FBI had. The area is so new that experts in the field can get by with useless superficial knowledge, as the non-experts who hire them have even less knowledge. </p><p>I learned that just about everyone on the web advertising a crypto recovery service or who claims they can rectify account hacks is a hacker himself. You hear about white-hat hackers rescuing or tracing stolen funds, but any useful and honest ones are probably focused on those multimillion-dollar hacks. If you mention your hack in any chat rooms, you will get a handful of DMs from people eager to hack you a second time (their Reddit or Twitter profiles are always new). Worst, I posted about a minor scam by the pseudo-anti-hacker hackers <a href="https://hireahacker.com/" rel="noopener noreferrer nofollow" target="_blank">Nobelium Hackers</a> and <a href="https://ghostpay.io/" rel="noopener noreferrer nofollow" target="_blank">Ghostpay </a>on the Reddit/cryptoscams forum, and it was inexplicably removed for ‘violating content policy.’ It appears scammers know the right words to invoke the automated acceptance of a complaint, allowing them to keep their reputation clean on the web.</p><p>Since then, I have stopped using email services like Gmail as a password manager for all but my most trivial accounts. I still have crypto off the exchange per the truism "not your keys, not your coin." I intend never to trust centralized exchanges, even when they supposedly have extra security features like a withdrawal restriction (e.g., Kraken's WD restriction can be disabled instantly, unbeknownst to me).</p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com1tag:blogger.com,1999:blog-7905515.post-61584606333160423172022-11-01T11:39:00.008-05:002022-11-04T11:34:41.147-05:00Deriving Uniswap v3 from v2<p>Uniswap version 3 (v3) uses restricted ranges, such as price ranges from $1000 to $2000 for ETH, while in version 2 (v2), the ranges are unrestricted (i.e., 0 to infinity). In v2, an LP supplies equal values of both tokens, while in v3, the relative values depend on the price bounds and the current price. LPs can choose a variety of price bounds called ticks. The LP ranges are defined by these ticks, one low and one high, bounding the LP’s range.</p><p><strong>A current aggregation of v3 concentrated ranges for the ETH-USDC 0.3% pool</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png","fullscreen":null,"imageSize":null,"height":384,"width":788,"resizeWidth":632,"bytes":14897,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="270" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5967a71f-0f75-45df-a852-1d8808870ce0_788x384.png 1456w" width="554" /></picture><div></div></div></a></figure></div><p>I will assume a simple ETH/USDC pool for the rest of this example, as opposed to tokens A and B. This makes it easier to interpret and is straightforward to generalize.</p><p>Within any set of ticks, there is a measure of pool liquidity called ‘liquidity’ in the Uniswap documentation. While this term has an intuitive meaning, it has a specific definition in the context of a constant product automated market maker (AMM).</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":213,"resizeWidth":251,"bytes":1393,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="30.63849765258216" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30a6af44-7414-4db2-a3cd-88636963987d_213x26.gif 1456w" width="251" /></picture><div></div></div></a></figure></div><p>To see how this is done, consider a v2 range defined over the prices {2500, 2601}, with a liquidity of 1000</p><p><strong>Table 1</strong></p><p> <strong>LP ETH and USDC, Liquidity=1000</strong></p><blockquote><p> ETH USD</p><p> ETHprice = 2500 20.00 50,000</p><p> ETHprice = 2601 19.61 51,000</p><p> Difference 0.39 1,000</p></blockquote><p>Liquidity is more intuitive than its square, <em>k,</em> because it reflects how many dollars are needed to move the square root of the price by 1. In the above example, swapping $1000 USDC for ETH pushes the price down from 2601 to 2500, while buying $1000 would push the price up from 2500 to 2601. In v3, the trick is finding a way to replicate this price and quantity relation while not requiring all the capital in a v2 pool.</p><p>In v2, for a given amount of liquidity, USDC in the pool is always increasing with price, while ETH is continuously decreasing with the price. Their product at any given price is constant if LPs do not add or remove liquidity, and the pool is merely subject to trading. Below is a simple ETH/USD pool in the unrestricted range over a wide interval (0 to 2500).</p><p><strong>Figure 1</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/90d950ea-489a-42a7-a439-1f73c4170267_550x331.png","fullscreen":null,"imageSize":null,"height":331,"width":550,"resizeWidth":502,"bytes":40164,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="265" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90d950ea-489a-42a7-a439-1f73c4170267_550x331.png 1456w" width="441" /></picture><div></div></div></a></figure></div><p></p><p>While v2 creates a nonlinear function for the token quantities over price, the relationship looks approximately linear within a range representing the average daily price change (~ 4%). If we constrain ourselves to the range 2500 to 2601, the pool amount of USDC spans from 50,000 to 51,000, while the ETH goes from 20.00 to 19.61. A concentrated range allows the LP to provide the net amount exchanged only in that range, not the extra USD and ETH needed outside that range. Thus, if the current price is 2500, and LP targeting the range {2500, 2601} needs only 0.39 ETH. She needs no USDC because she is only offering liquidity above the current price and does not have to provide USDC to buy; someone selling would push the price down and outside of her range, so that event is irrelevant to her. Similarly, if the price were 2601, she would only need to provide $1000 USDC and zero ETH.</p><p>Another way to see this is that in v2 and v3, within a particular set of ticks for a specific level of liquidity, the change in the pool tokens is identical; however, the amounts of tokens in these two contracts are not. Below in Figure 2, we see that in both cases, the changes in USDC and ETH are 1000 and 0.39, respectively, though v2 requires ten times the total amount.</p><p><strong>Figure 2</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png","fullscreen":null,"imageSize":null,"height":317,"width":786,"resizeWidth":636,"bytes":35839,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="216" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F540e6d4a-bca2-4aaa-806a-512f69379acc_786x317.png 1456w" width="536" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png","fullscreen":null,"imageSize":null,"height":318,"width":786,"resizeWidth":634,"bytes":35514,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="217" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9b71d46-8303-44eb-a9a8-581aedab7cc4_786x318.png 1456w" width="536" /></picture><div></div></div></a></figure></div><p></p><p>To get the math to work with fewer tokens, we need to find the necessary adjustments to get the slopes of the above graphs to be the same because that represents the amount of ETH and USDC needed for price changes in this range. Let us call the amount of ETH in a v3 concentrated range ETHv3; this is the real or non-negative amount of ETH needed to satisfy traders within this restricted range. To match the v2 mathematics, we will call ‘virtual’ ETH, the ETH amount required to make the math work.</p><p>Starting from the standard v2 logic</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif","fullscreen":null,"imageSize":null,"height":25,"width":172,"resizeWidth":172,"bytes":1247,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="25" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85e7a0cb-1f11-4f5d-9bf4-825ec1a5906a_172x25.gif 1456w" width="172" /></picture><div></div></div></a></figure></div><p>We replace the ETHv2 with the new ETHv3 components</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif","fullscreen":null,"imageSize":null,"height":24,"width":178,"resizeWidth":178,"bytes":1243,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="24" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa13bad00-e490-4e17-868f-13c71fb8bf39_178x24.gif 1456w" width="178" /></picture><div></div></div></a></figure></div><p>Substituting, we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":256,"resizeWidth":256,"bytes":1647,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F461d2aa8-1311-4fbe-a365-224de41902e0_256x26.gif 1456w" width="256" /></picture><div></div></div></a></figure></div><p>Given</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":169,"resizeWidth":171,"bytes":1212,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26.307692307692307" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4c00e5f6-0098-4bd6-a3fd-b57917a41e5e_169x26.gif 1456w" width="171" /></picture><div></div></div></a></figure></div><p>We can substitute for USD and get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif","fullscreen":null,"imageSize":null,"height":28,"width":324,"resizeWidth":null,"bytes":1936,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="28" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8dab0a-c808-4622-afbb-d0ccf39506a3_324x28.gif 1456w" width="324" /></picture><div></div></div></a></figure></div><p></p><p>Rearranging we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif","fullscreen":null,"imageSize":null,"height":46,"width":197,"resizeWidth":197,"bytes":1600,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="46" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1bdb3280-1305-455b-8be9-3e5dc7d266bb_197x46.gif 1456w" width="197" /></picture><div></div></div></a></figure></div><p>The amount of ETH required for the v3 LP at the top of the range is zero, so we know:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":173,"resizeWidth":173,"bytes":1138,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb906099f-77e0-4084-b1d2-1e16560b3b85_173x26.gif 1456w" width="173" /></picture><div></div></div></a></figure></div><p>The above equations imply that for the range {2500, 2601}, our virtual ETH is just</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/bfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif","fullscreen":null,"imageSize":null,"height":44,"width":136,"resizeWidth":154,"bytes":1328,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="49.8235294117647" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfe759dc-247a-4e1d-9e53-917c04182379_136x44.gif 1456w" width="154" /></picture><div></div></div></a></figure></div><p>If the price goes above 2601, Alice is unaffected. That is because she is no longer providing any more ETH for USD. This implies that ETH-virtual over the entire price range is a function of the price at the top of the range. So now we take the definition of v3 compared to v2:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6821f761-ec9b-4470-980c-862a800a027f_178x24.gif","fullscreen":null,"imageSize":null,"height":24,"width":178,"resizeWidth":190,"bytes":1240,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="25.617977528089888" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6821f761-ec9b-4470-980c-862a800a027f_178x24.gif 1456w" width="190" /></picture><div></div></div></a></figure></div><p>Given the equation above and generalizing by replacing 2601 with pHigh, we can solve for the ETHv3 for various prices within Alice’s range</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif","fullscreen":null,"imageSize":null,"height":53,"width":256,"resizeWidth":256,"bytes":1813,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="53" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F85b28a3f-e784-4224-bc0b-fa1f8d51eb37_256x53.gif 1456w" width="256" /></picture><div></div></div></a></figure></div><p>This formula, derived from v2 pool math, gives us the accounting trick needed for an LP supplying concentrated liquidity on a v3 pool.</p><p>Similarly, we can apply the same logic to get the amount of USDvirtual within a given range:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif","fullscreen":null,"imageSize":null,"height":46,"width":266,"resizeWidth":266,"bytes":2005,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="46" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F535e7cd7-9785-48ee-bd15-516624ec536f_266x46.gif 1456w" width="266" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":237,"resizeWidth":237,"bytes":1529,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8154e81e-1e4b-4932-8877-8e91a6f25911_237x26.gif 1456w" width="237" /></picture><div></div></div></a></figure></div><p>Given the equation above, we can calculate the USDvirtual needed to make the v3 math work. Here the USDvirtual is a function of the lower price bound.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif","fullscreen":null,"imageSize":null,"height":28,"width":356,"resizeWidth":356,"bytes":1880,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="28" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F73cd5248-4f2f-4013-89ba-e5cfbf04b986_356x28.gif 1456w" width="356" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":182,"resizeWidth":182,"bytes":1266,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5baf917d-da36-4e29-8dd9-87b0498ed261_182x26.gif 1456w" width="182" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif","fullscreen":null,"imageSize":null,"height":32,"width":245,"resizeWidth":247,"bytes":1564,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="32.26122448979592" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc23c450c-2ee4-47b3-9b0e-856b04f970f1_245x32.gif 1456w" width="247" /></picture><div></div></div></a></figure></div><p>The v3 LP token quantities, their ‘real’ amounts, are adjusted by constants to match v2. As constants, they do not affect how price changes affect changes in the v3’s tokens within a range.</p><p><strong>Range Math Outside the Range</strong></p><p>Outside of the range, we need to make substitutions for the fact that the range is inactive; it does not supply liquidity outside the range. The LP has a simple position of {ETH=0.31, USDC=0} at and below 2500, and {ETH=0, USDC=$1000} at and above 2601. Thus, a concentrated range LP treats all prices above its range as if they were the price at the top of the range, and when below the range, the price can be treated as if it were the bottom price point.</p><p>One can use the following formula for a robust function within a program or spreadsheet:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d30d3294-5b95-45e3-a711-12395c00d571_316x93.gif","fullscreen":null,"imageSize":null,"height":93,"width":316,"resizeWidth":318,"bytes":3168,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="93.5886075949367" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30d3294-5b95-45e3-a711-12395c00d571_316x93.gif 1456w" width="318" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":248,"resizeWidth":248,"bytes":1459,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3414bc97-74ed-41c0-980f-6e938780c15c_248x26.gif 1456w" width="248" /></picture><div></div></div></a></figure></div><p>A v3 LP specifies {liquidity, pLow, pHigh} to establish a range. Combined with the current price, this implies a certain amount of USDC, ETH, and a specific USD value.</p><p><strong>Tick Fee Math</strong></p><p>A range of {2500, 2601} entitles the LP to a percent of the fee revenue generated from trades within that range. There needs to be a method for excluding trades below 2500 and above 2601. The accounting mechanism for doing this is extremely clever.</p><p>Each initialized tick is allocated a state variable for its ETH and USD fees. When combined with the global ETH and USD fee state, one can back out the fees generated to an LP, given their lower and upper ticks.</p><p>The tick fee allocation rule applies to fees for both tokens (here ETH and USDC), but we will focus on one token to simplify notation. Define globalETHfee as the global sum of the fees divided by the liquidity it experienced when applied (e.g., if the user paid $10 when liquidity was 1000, globalETHfee would increment by 0.01).</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":214,"resizeWidth":214,"bytes":1824,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="49" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fef504505-21e1-4ff6-865c-af67669aaaf2_214x49.gif 1456w" width="214" /></picture><div></div></div></a></figure></div><p>The equation above makes it easy to calculate an LP’s fee revenue. For an LP who provided liquidity at j=4, and assuming the current j=n, we would have</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":429,"resizeWidth":435,"bytes":2272,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26.363636363636363" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77c03fe-eea8-44a1-89eb-7cde3e9cccb8_429x26.gif 1456w" width="435" /></picture><div></div></div></a></figure></div><p>In v3, we must exclude the fees derived from trades outside the LP’s range. We use the following rules applied to all ticks to keep track of the relevant fee revenues for LPs with various tick endpoints. There are six different variables updated each time a tick is crossed. Relevant to the tick fee math, there is an ETH and USDC fee parameter for each tick. Remember that any LP range uses a subset of these ticks.</p>
<ul><li>If crossed for the first time<ul><li>tickFee= globalETHfee</li></ul></li><li>if crossed again<ul><li>newTickFee= globalETHfee - oldtickFee</li></ul></li></ul>Ticks are only updated when crossed, though the global tick fee is incremented with each trade.When the LP withdraws her liquidity, her fee state—which will be multiplied by her liquidity—is then calculated using her low and high ticks as follows:<ul><li>If above range, that is, pLast>pHigh<ul><li>tickFee(pHigh) - tickFee(pLow)</li></ul></li><li>If below range<ul><li>tickFee(pLow) - tickFee(pHigh)</li></ul></li><li>If in range<ul><li>globalETHfee - tickFee(pLow) - tickFee(pHigh)</li></ul></li></ul>
<p>The attached worksheet shows how this works for a range with pLow=1900 and pHigh=2000 and a fee of 0.3%. In columns G:H we see the per-trade fees, and in columns I:J we see the global state of the fees, which is just the cumulative sum. Columns K:L show how the tick fee state is updated on every cross for the 1900 tick, and columns M:N show how it is updated for the upper tick. This follows the ‘tick fee update’ rules above.</p><p>Columns S:T shows how the ‘fee calculation’ rule is applied at various prices—above, below, and within one’s range—using the global and tick fee state variables. In this example, I calculated fees for the {1900, 2000} range, which are in yellow. Note the LP here only should get fees for trades done in the yellow region. The “brute force” calculation method uses an excel if-rule to show that the logic generates the same results as counting all the fees generated in the yellow region (those are in columns g:h).</p><p>The pool generates a total of 281.34 in USDC and 0.097 ETH, and of this, in the end, 162.25 in USDC and 0.086 ETH go to the LP supplying liquidity from 1900 to 2000.</p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-61642070540824660612022-11-01T11:38:00.007-05:002022-11-04T12:56:06.619-05:00Perp Funding Rate Fraud<p> Supposedly, perp funding rates enable a futures/swap market to equilibrate at a spot price without delivery, so the market is a perpetual swap, hereafter denoted as a 'perp.' This mechanism is superficially like the basis in futures markets but ultimately profoundly different in theory and practice. The fact people are satisfied with this flawed but plausible feedback control system story implies some necessary detail is involved to see why it does not work. The basic disconnect is that the best predictor of the funding rate is not the current perp/spot price ratio but a moving average of the funding rate. Yet, if that is so, why is the perp/spot ratio purportedly defining the funding rate that is equilibrating the market?</p><p>As a practical matter, the perp premium does not equilibrate supply and demand on perp markets; the spot price is sufficient for that job. The primary reason perp markets track spot markets can be explained as a <a href="https://en.wikipedia.org/wiki/Focal_point_(game_theory)" rel="noopener noreferrer nofollow" target="_blank">Schelling point</a> or <a href="http://www.millenniumpost.in/sundaypost/beacon/the-ace-game-theorists-453467" rel="noopener noreferrer nofollow" target="_blank">correlated equilibrium</a>.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a> The perp premium does not determine the funding rate but is determined by a funding rate decision made by insider market makers specific to each exchange. The exchange controls these insiders to various degrees in general. As tens of billions of dollars are currently outstanding on Defi perp exchanges and multiples more on centralized exchanges, the economic significance of this charade is immense, even if your typical perp trader seems blissfully indifferent.</p><div class="subscription-widget-wrap" data-attrs="{"url":"%%checkout_url%%","text":"Subscribe"}"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>BitMex Creates the Perp</strong></p></div></div></div><p>Seven years ago, it was impossible to short or leverage a long position in bitcoin. All one could do was swap one token for another and generate an unleveraged long position. There were no stablecoins or wrapped Bitcoin, so the quest was to find a way to trade the Bitcoin without USD. In 2016 the centralized exchange BitMex created the first popular perp, enabling leveraged positions while only transacting in Bitcoin.</p><p>Instead of expiration dates and settlement, a perp anchors its price to the spot via a funding rate mechanism. When the perpetual contract's price exceeds the spot price, the standard story is that this implies more long than short demand. To equilibrate the market, the long traders pay short traders a fee proportional to this price premium. Crypto funding rates prevent continuing divergence in the price of both markets. The funding rate at BitMex is applied every 8 hours to every position that is active at that time. The 8-hour window is now a convention for quoting, though today's funding rate applications are sometimes hourly or continuously.</p><p>The perp premium is defined as the percent difference of the perp price from a spot price. The spot price could be from external markets like Coinbase, or for centralized perps, from spot markets on their own exchange:</p><p> Perp premium = perpPrice/spotPrice - 1</p><p>The funding rate is like the future expiring once per day. For example, if you sell a BTC perpetual future that is trading 0.03% above the underlying index all day—it's perp premium—then over that day or the next day, you will receive a total funding payment of 0.03%.<a class="footnote-anchor" href="#footnote-2" id="footnote-anchor-2">2</a> If bitcoin's current market price across a range of exchanges is $20,000, the funding rate mechanism will help make sure the perpetual swap contract price is also priced around the same $20,000 level over time.</p><p>At 30k feet, this all seems reasonable. I have not seen anyone dispute its logic. Even <a href="https://www.youtube.com/watch?v=BZSARSWrnaA" rel="noopener noreferrer nofollow" target="_blank">Campbell Harvey</a>, a prominent finance professor well-acquainted with traditional futures data and theory, accepts this logic. Perps vaulted BitMex into prominence and inspired new exchanges to offer perps. This was often necessary because of the many limitations back then (no stablecoins or wrapped coins from other blockchains). Over time, traders have become comfortable with the product and trust that its perp-premium/funding-rate mechanism works.</p><p>A hundred years ago, bucket shops were a common way for people to trade stocks listed on major exchanges. A shop would take bets and give leverage up to 100 to 1, trading on stocks, grain, oil, etc. There was no transfer or delivery of the stock or commodities nominally traded, so customers were essentially betting against the bucket shop operator. Often the ticker prices were not real, but even when real, the more capitalized bucket shop manager could manipulate prices to exhaust client margins. While some were deluded into thinking they were trading against 'real' security prices, others knew it was not necessarily related to exchange-traded prices but figured it was close enough. These were effectively banned by 1922 after a 50-year run, highlighting how long bad business practices can persist even if patently unsustainable.</p><p>Current perp crypto perp markets share much in common with bucket shops: manipulation, lack of true settlement, 100-1 leverage, indifferent gamblers happy to trade. Unfortunately, the high-handed approach of regulators gives willing and able crypto investors few and unattractive alternatives. You can short on the CME, but the minimum notional is $100k (5 bitcoin), and the margin for a short position has been 150%. The onboarding costs for trading futures are high in terms of time, moving money from an equity brokerage to one that handles futures, and the many questions about where you got your money. If there were simply an ETF for crypto, millions of investors would be able to go long in a much safer way and avoid unsavory perp markets, and an ETF would give people the ability to short. This has kept most crypto investors in the unregulated exchanges, whether via exchanges one can access through the blockchain (e.g., <a href="https://dydx.exchange/" rel="noopener noreferrer nofollow" target="_blank">dydx</a>), or more explicitly centralized exchanges overseas via a VPN and a fake identity. The zero-tolerance approach of regulators has significantly hurt retail crypto investors by severely limiting regulated opportunities for crypto investors.<a class="footnote-anchor" href="#footnote-3" id="footnote-anchor-3">3</a></p><p>I do not expect regulators to embrace crypto. It will be forced upon them in how government bureaucrats discovered that banning encryption was technically futile or how UBER exposed the inefficient taxi monopolies and made it politically unpopular to return to the old system. However, the key to accelerating the future in crypto dapps such as perps is to expose bad practices so that consumers can make informed decisions. Competition is the best regulator in history and involves active constructive criticism as opposed to the status quo of naïve criticisms by ignorant bureaucrats worried about their monopoly power versus the credulous reporting by crypto media funded by the latest incarnation of Bitconnect.</p><p><strong>Theory of a Funding Rate</strong></p><p>To understand the problem, you must first understand how funding rates work in futures/swap markets. The basis in futures markets acts as a funding rate in swap markets, defined as the difference between the futures and spot price. Figure 1 shows the horizontal time axis moving from a current futures price to its delivery/expiry date if the black line represents the current spot price.</p><p><strong>Figure 1</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png","fullscreen":null,"imageSize":null,"height":278,"width":444,"resizeWidth":null,"bytes":23844,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="257" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9f88504b-a117-4d4b-b8ca-a75dacf90fd7_444x278.png 1456w" width="411" /></picture><div></div></div></a></figure></div><p>The' basis' is the difference between the futures and spot price. It can be positive or negative. The amortization of this basis can be considered a daily funding rate; in <em>contango,</em> the longs pay the shorts, while in <em>backwardation</em>, the shorts pay the longs. The funding rate is implicit in the amortization of the basis over time, in that, at expiration, the spot price equals the futures price, so the basis is certain to be zero at that time.</p><p>There is no basis for swap markets; instead, a funding rate is applied daily, acting precisely the same way as the basis in futures markets. They are settled daily using a funding rate known in advance. Here the basis goes from being implicit to explicit.</p><p> LongSwapPnL(t+1) = Notional(t)*[p(t+1) / p(t) - 1 - fundingRate]</p><p>Unfortunately, the literature on basis rates and funding rates is not uniform when defining the basis or funding rate. You can see the basis = 'futures – spot' in one book and 'spot – futures' in another. I will stick to the crypto convention in defining the funding rate as follows:</p><p> Positive funding rate: longs pay shorts (contango).</p><p> Negative funding rate: shorts pay longs (backwardation).</p><p>Arbitrage ensures various costs and benefits of possessing the asset are reflected in the futures' basis or swap funding rate. They all are based on the following reasoning.</p><p>Assume you have $1 and want to compare two investments. First, buying a Treasury bill. This generates a simple interest rate return</p><p> $1*(1+R(us))</p><p>Secondly, you have asset A. Many things affect its net return, but this can be represented by <em>Ret(A)</em>. To get this return, you must first translate from USD into asset A; with $1, you get 1/Prc(A) units of A. You will turn this back into F(A) dollars at the end of a certain period. A futures market allows you to set that futures price today at f(t+1)</p><p> $1/spotPrice(t) * (1 + R(A)) * futuresPrice(t+1)</p><p>Here we define the futures (F) and spot (S) prices in terms of USD/A. We expect equality of these two equations, as otherwise, it would not be an equilibrium. With some rearranging, we get</p><p> F(t+1) / S(t) = {1 + R(us)} / {1 + R(A)}</p><p>If we put this in terms of the perp premium, it would be</p><p> F(t+1) / S(t) - 1 = {R(us) - R(A)} / {1 + R(A)}</p><p>The perp premium is driven by the net returns of USD relative to asset A. These factors are defined as follows:</p><li>Interest rates</li><p>Going long $100 in a spot position has the opportunity cost of forgoing the return of a riskless asset like Treasury Bills. Without this adjustment, one could go long an asset using a swap and make the riskless rate on the cash needed to buy spot. Gold has none of the other attributes listed below, so its futures price is determined solely by US interest rates, always in contango (futures price > spot price). For currencies, however, there are interest rates on both, so the net interest rate is positive only half the time. It is not obvious whether a stablecoin should be assumed to carry the US Treasury rate, as one cannot directly purchase a US Treasury with a stablecoin but instead must first go into fiat. Whatever the case, US interest rates have been near zero for the past decade, so this effect is second order in explaining perp funding rates (at most 2% annualized).</p><ul><li>Cost of carry</li></ul><p>Standard storage costs are like interest rates, subtracted from <em>R(A)</em>. They include insurance and warehouse costs, as with oil, as well as deterioration as with agriculture products. A long spot position pays for them, so the long swap position must pay as well, in the form of the long futures price declining over time, a positive funding rate. These are irrelevant to crypto.</p><ul><li>Dividend</li></ul><p>For a stock that pays dividends, its price in the future will be adjusted to account for this dividend. For example, if a $100 stock has a $10 dividend before an imminent futures expiry, it will be expected to be worth $90 at expiration, so the dividend is subtracted from the current price to generate the forward price. These are irrelevant for crypto, which has no dividends.</p><ul><li>Option value (aka convenience yield, theory of storage)<a class="footnote-anchor" href="#footnote-4" id="footnote-anchor-4">4</a></li></ul>Inventory for commodities has a floor of zero and a maximum as well. For assets like wheat or oil that have a continuous positive consumption stream, the inventory floor causes price spikes as desperate users bid up prices. This option value in shortages causes the spot price to be above the futures price, which is why backwardation is the general rule for oil prices. However, sometimes the oil tanks become filled, as in the depths of the global recession in April 2009 or during the covid shut-down in April 2020 when the front-month oil futures price went negative. This is irrelevant to crypto.<ul><li>Risk premium aka hedging pressure</li></ul><p>If hedgers are net short or long, they must pay speculators to take the other side to transfer their risk. Keynes famously asserted this was the general case, which he called 'normal backwardization.' His example was when farmers sell their anticipated wheat output in the futures market, paying a premium via the appreciation to the long futures price as it approaches maturity. There are also cases where hedgers are naturally short, such as when airplane manufacturers lock in the cost of their aluminum inputs by buying futures, the shorts are paid via the futures price declining to the spot price (contango). The natural long story fits best for crypto because miners generate a stream of crypto and may wish to hedge that by locking in prices now. This would imply a negative funding rate. I cannot think of a natural short story, a group that must buy crypto regularly.</p><ul><li>Sentiment</li></ul><p>This theory is the standard argument for explaining why crypto funding rates are positive (see Binance <a href="https://www.binance.com/en/blog/futures/a-beginners-guide-to-funding-rates-421499824684900382" rel="noopener noreferrer nofollow" target="_blank">here</a>). It is not in the traditional literature explaining funding rates.<a class="footnote-anchor" href="#footnote-5" id="footnote-anchor-5">5</a> A shock in the demand for an asset should be reflected in the current price, not the future price; it is wrong to say there are ever ‘more longs than shorts’ for any market.<a class="footnote-anchor" href="#footnote-6" id="footnote-anchor-6">6</a> <a href="https://investmenttheory.org/uploads/3/4/8/2/34825752/paulsamuelson-proof.pdf" rel="noopener noreferrer nofollow" target="_blank">Samuelson (1965)</a> proved that if you know demand will be higher tomorrow, that gets reflected in the price today, not in future or expected spot prices. This reasoning is the basis for the random walk assumption, which is an excellent general first-order approximation to any asset price time series despite its criticisms. Nonetheless, one must admit the special case for crypto: there are unprecedented regulatory restrictions on owning or leveraging crypto. Thus, it is possible that in bull markets like late 2017 and early 2021, the extra demand constrained by regulators pushed up the leveraged perp price, and longs were willing to pay a funding rate for access they could not get anywhere else.</p><p>Financing rates are generally positive in crypto, indicating contango. Storage costs, dividends and option value are irrelevant for crypto. The risk premium would only imply a negative funding rate, as the only demographic with a natural position to hedge are those long, such as miners or dapps that need crypto to function. US interest rates are a couple of percentage points, but it is not obvious that stablecoins should be assumed to have this interest rate, in that you cannot directly buy a US Treasury with a stablecoin. That leaves the sentiment theory, which is a stretch, but potentially plausible.</p><h4><strong>Data on Funding Rates</strong></h4><p>On average, perp funding rates have been positive: longs pay shorts. Most perp exchanges set their default funding rate at 0.01% per 8-hour period, which annualized out to 10.95%. Figure 2 below compares the bitcoin per rates on BitMex and Binance with the futures-implied funding rate on the CME. On average, the funding rate on Binance has been 10% higher than that BitMex or the CME. I used the second to front month premium times 12 to get the CME’s annualized funding rate, and this might be a bad number because the second month is so illiquid there may be a bias due to infrequent trading. </p><p><strong>Figure 2</strong></p><p>Average Annualized BTC Funding Rates</p><p>9/2019-6/2022</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9934f738-9343-437f-be66-2a2c75b240ba_262x86.png","fullscreen":null,"imageSize":null,"height":86,"width":262,"resizeWidth":null,"bytes":1909,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="86" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9934f738-9343-437f-be66-2a2c75b240ba_262x86.png 1456w" width="262" /></picture><div></div></div></a></figure></div><p></p><p>The higher funding rate on Binance reflects the more general funding rate and is driven by episodes where the funding rate spikes to 50% to 100% (annualized) over certain months. There is a clear correlation between funding rate spikes and bull markets, which is why most commenters consider the perp funding rate an indicator of market sentiment. Over time we can see that Binance, like many perp exchanges, charges insanely high funding rates during big bull markets and rarely offers the symmetric negative funding rate (BitMex is exceptional in this aspect). </p><p><strong>Figure 3</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/30c40a13-9be9-4853-856f-b115b5500179_706x452.png","fullscreen":null,"imageSize":null,"height":452,"width":706,"resizeWidth":526,"bytes":50021,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="264" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F30c40a13-9be9-4853-856f-b115b5500179_706x452.png 1456w" width="413" /></picture><div></div></div></a></figure></div><p></p><p>While the perp funding rates are highly correlated across exchanges, the divergences can be substantial. These markets are clearly affected by limits to arbitrage via various regulatory restrictions, which highlights the potential plausibility of the sentiment theory.</p><p><strong>Figure 4</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b7476efb-704f-444e-a99f-fefdb67c5650_729x452.png","fullscreen":null,"imageSize":null,"height":452,"width":729,"resizeWidth":545,"bytes":47915,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="268" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7476efb-704f-444e-a99f-fefdb67c5650_729x452.png 1456w" width="432" /></picture><div></div></div></a></figure></div><p></p><h4>Contemporaneous vs. Lagged Return Effects</h4><p>Regressing the daily Binance funding rate against that day's return and the prior month's ETH or BTC return shows that both returns positively correlate with funding rate: higher returns imply higher funding rates. Yet the preceding month's price return has a significantly stronger effect than the contemporaneous daily return in explaining the daily ETH and BTC funding rates.</p><p><strong>Figure 5</strong></p><p>Regression Analysis of Daily Funding Rates</p><p>Binance, 8/2019-6/2022</p><h6>The dependent variable is the daily funding rate for ETH and BTC. Data are generated every 8 hours, so daily funding rates are the sum of these three observations. Returns were calculated using minute downsampled data from Gemini. The daily return and the prior month's return do not overlap. ETH funding rates used ETH returns, and BTC funding rates used BTC returns.</h6><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png","fullscreen":null,"imageSize":null,"height":310,"width":543,"resizeWidth":null,"bytes":4852,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="310" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fce456fed-eab4-49ee-bbe1-82be57400e06_543x310.png 1456w" width="543" /></picture><div></div></div></a></figure></div><p></p><p>In traditional financial markets, the primary stylized fact about past price changes and the basis is that price increases are associated with negative financing rates and price declines with positive financing rates. The general explanation is that a price spike is due to an inventory problem—a drought—so continuous consumption demand requires an abnormally high price today that is not expected to continue. A significant price decline, say from a lack of oil storage, is also likely to be temporary so that futures prices will be above the spot price.<a class="footnote-anchor" href="#footnote-7" id="footnote-anchor-7">7</a></p><p>It is easy to conflate 'past price jump' with 'current price jump' and think the sentiment funding rate correlation makes sense for a rational market. The fact that the past return is much stronger than the current return is contrary to that argument. The positive correlation between crypto funding rates and prior returns is an anomaly.</p><h4>Perp Premiums are Not Emergent Indicators of Bullishness</h4><p>The 'gaming insider market maker' theory is clear if we look at BitMex's ETH perp. This perp has the strange property of incorporating the ETH-BTC covariance, in that BitMex denominates the payoff in BTC, though the contract is priced in USD. This post explains more fully <a href="https://efalken.substack.com/p/bitmexs-ethusd-funding-rate-anomaly" rel="noopener noreferrer nofollow" target="_blank">here</a>, but the gist is that the return for the ETH perp is</p><p> ret(ETH) * (1 + ret(BTC)) = ret(ETH) + ret(ETH) * ret(BTC)</p><p>The term E[ret(ETH)×ret(BTC)] is also known as the covariance of ETH and BTC. Thus the return on the BitMex perp is the return on the eth plus its covariance. Few people mention this, highlighting that, like in the old bucket shop days, most customers are so eager to gamble that they do not care. When I google "<a href="https://www.google.com/search?q=BitMEX+eth+funding+rate+too+high&rlz=1C1RXQR_enUS934US934&oq=BitMEX+eth+funding+rate+too+high&aqs=chrome..69i57j69i59.537j0j4&sourceid=chrome&ie=UTF-8" rel="noopener noreferrer nofollow" target="_blank">BitMEX eth funding rate too high</a>" as per explanations, I get my blog post circa 2019; the other articles just note the rate levels. Customers are blissfully indifferent.</p><p>Nonetheless, obviously, some BitMex insiders have figured this out. Looking at the ETHUSD return data from 8/2018 through 6/2022, you see the covariance term accounted almost perfectly. The total return data on their ETH contract without funding was 149%, while the annualized ETH return over that period was 83%. The difference, 66%, matches the covariance and the funding rate (63%).</p><p><strong>Figure 6</strong></p><p><strong>Annualized Data from BitMex ETHUSD perp daily funding and return data</strong></p><p><strong>2018-2022</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png","fullscreen":null,"imageSize":null,"height":142,"width":463,"resizeWidth":null,"bytes":3544,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="142" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2ea4d360-a46d-409c-b97d-ce2bb268dd89_463x142.png 1456w" width="463" /></picture><div></div></div></a></figure></div><p>This all makes rational sense. BitMex has <a href="https://archive.ph/ONG7E" rel="noopener noreferrer nofollow" target="_blank">stated</a> that its market-making desk's goal is to break even. Given the boatloads of money they are making off fees and the strong desire by regulators to punish them, it’s a wise tactic. The data on the ETH perp suggests that their ETHUSD funding rate is genuinely neutral, in that after accounting for the covariance, it is zero. Good on them!</p><p>The fun part is that few see the direct relationship between the funding rate and the covariance. As the correlation between bitcoin and Ether is positive, it implies convexity in the long position. Like convexity everywhere, this is something you can hedge to minimize risk, but it is an unavoidable cost to the side short convexity. Arthur Hayes wrote a <a href="https://blog.bitmex.com/is-the-ethusd-swap-fairly-priced/" rel="noopener noreferrer nofollow" target="_blank">blog post</a> about whether the ETHUSD perp was fairly priced and did not mention this explicit formula.</p><p><strong>Figure 7</strong></p><p>Bloomberg Eurodollar/Swap Page</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png","fullscreen":null,"imageSize":null,"height":326,"width":975,"resizeWidth":null,"bytes":237787,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="220" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3f77b247-7ffc-440c-a1a6-cdfbea961e6c_975x326.png 1456w" width="657" /></picture><div></div></div></a></figure></div><p>In traditional markets, convexity adjustments are explicit once known. For example, figure 7 above shows a Bloomberg page showing the detailed <a href="https://www.cmegroup.com/education/courses/introduction-to-eurodollars/understanding-convexity-bias.html" rel="noopener noreferrer nofollow" target="_blank">convexity adjustment</a> needed when comparing Eurodollar futures with a Eurodollar swap. Before this relationship was understood, several large investment banks made actual arbitrage profits going long the futures and short the swaps. Around 1995, however, many prominent academic articles highlighted the arbitrage and noted the precise convexity adjustment needed. Eurodollar futures and swap traders have this convexity adjustment built into pricing models used to compare the two markets, and arbitrage equilibrates prices based on this adjustment. Traders do not implicitly adjust for convexity; they apply it precisely via models like those above. </p><p>Like many CEOs, Hayes seems unaware of various technical tactics his company uses to achieve his objectives (a flat market-making pnl). The ETHUSD market makers are using explicit adjustments, but as there is little demand for this information, it’s better to not mention it because having a better model than most gives one a useful option. </p><h4><strong>Perp Theory</strong></h4><p>The two academic articles are generally referenced when presenting perps. The first is by <a href="https://www.gwern.net/docs/economics/1988-gehr.pdf" rel="noopener noreferrer nofollow" target="_blank">Gehr (1988)</a>, which describes how gold was traded on the Chinese Gold and Silver Exchange Society of Hong Kong (CGSE). One should remember this was back when trading was not possible around the clock, and there was no internet, so a closing price had little volatility outside trading hours. The CGSE was unique in that its futures market was undated, perpetual (it’s <a href="https://industrialhistoryhk.org/the-chinese-gold-silver-exchange-society-hong-kong-established-1910-new/" rel="noopener noreferrer nofollow" target="_blank">still around</a>, and I’m not sure about its protocol today). The market effectively settled daily and then held a 30-minute auction process to determine the funding rate. Those long gold compare the cost of paying storage and interest on a long position vs. the funding rate; those short gold futures take delivery if they feel the funding rate is too low. This funding rate was added to the spot price to create a basis for the subsequent day's pnl.</p><p>The effect on prices and cash flows in the CGSE futures market was as follows. If the market price closed at 100.00, and the funding rate was determined to be 0.01% over the next day, the basis for the next day's PNL is 100.01. If the price stayed constant at 100.00, each day, the longs would lose 0.01 because the daily pnl would be 100.00 – 100.01 on a long position, where 100.00 is the spot close, and 100.01 is the prior day's futures close. The traded price would never be 100.01; it would just be used in the daily calculation of trader margin adjustment, transferring from longs to shorts.</p><p>Nobel laureate Robert <a href="https://www.nber.org/system/files/working_papers/t0131/t0131.pdf" rel="noopener noreferrer nofollow" target="_blank">Shiller (1993)</a> proposed a perpetual futures contract for things like single-family homes. Unlike a stock index or a commodity, the underlying asset is difficult to create into a futures commodity because it is difficult to define a housing unit. A hundred houses? 100k square feet of houses? Quality varies considerably, creating a <a href="https://en.wikipedia.org/wiki/The_Market_for_Lemons" rel="noopener noreferrer nofollow" target="_blank">lemons problem</a>. Shiller proposed a rental index to create a rental return proxy for a housing price index. One would apply statistical methods to estimate real estate's average rental return, net of depreciation. This rental return would then be paid by the short to the long.</p><p> s(t+1) = f(t+1) - f(t) + d(t+1) – r×f(t)</p><p>Here <em>s</em> is the daily margin change in a trader's account; <em>f</em> is the perpetual futures price, <em>r</em> is a precise fiat interest rate adjustment, and <em>d</em> is determined outside the market. While this is interesting, the difficulty in generating a robust rental index for <em>d</em> is probably why this has never been implemented. Rental income, like profits in the economy, is non-trivial to estimate via macroeconomic indicators, and people do not like to trade assets built on models with low R2s. Nonetheless, the market was supposed to merely trade at a spot price that did not contain the daily funding charge, <em>d</em>. </p><p>The perp premium is <em>like</em> the CGSE funding rate charge added to the market's spot price after trading. A direct funding rate is a periodic payment like the<em> d(t+1)</em> term in Shiller's model. However, the Shiller and Gehr perp models are substitutes, not complements; the funding rate is either added to the spot price periodically or is regularly charged. Further, Gehr's brief, never-traded perp premium is <em>determined by</em> an explicit funding rate auction, not vice versa. Thus, at 30k feet, the connection between the perp premium and the funding rate seems consistent with Gehr's model, but it is entirely backward; the perp funding rate mechanism seems consistent with Shiller's model via the explicit funding rate charge, but it is determined entirely differently (exogenous to the market).</p><h4><strong>Plank scale of asset prices</strong></h4><p>In crypto perps, the modal daily funding rate and perp premium is 0.03%, which annualizes to a hefty 11%. Considering interest rates have been near zero over the past several years, that is a significant funding rate. Yet 0.03% is below the precision of any estimate of 'true value,' or a transaction cost. The average transaction costs for the most liquid US equities, which are more efficient than any crypto market, are estimated at least 0.1% (see <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3229719" rel="noopener noreferrer nofollow" target="_blank">here</a>).<a class="footnote-anchor" href="#footnote-8" id="footnote-anchor-8">8</a> It is unlikely crypto prices have lower transaction costs, especially given explicit fees start at around 0.1%. Gemini trade data show a 0.15% standard deviation in the price from one trade to the next.<a class="footnote-anchor" href="#footnote-9" id="footnote-anchor-9">9</a> A one-way trading fee of 0.2% means the price must deviate by at least 0.2% from its ‘true’ price before an arb would transact, giving the perp market price a 0.2% zone of indeterminably. Yet, with all this uncertainty, we expect the market to determine the funding rate with precision orders of magnitude more precise than these limits. </p><h4><strong>Locking in funding rates</strong></h4><p>The crypto perp is like a standard deliverable futures basis in that the price always reflects both the basis and the spot price. However, as the perp premium is applied continuously, its magnitude is irrelevant to any trading decision. Consider the perp trader who sees the perp price at a 0.0685% premium to the spot, implying a rich 25% funding rate for the short. The problem is not only that such a premium is below the asset price Plank length, but also that the perp premium at the time of her trade does not determine the funding rate she will receive. Instead, this premium is the average over the time she holds her position. Given the next tick will move the perp price by 0.1%, a 0.06% current perp premium has little forward-looking value. Perp premiums implying insanely large funding rates are insufficient for motivating initiating a position because the information content of a current perp premium is so low (especially compared to a simple moving average of past funding rates). </p><p>Arbitrage is much simpler in deliverable futures markets. A futures trader locks in a cumulative funding rate at the time of a trade. The funding rate implied from the basis of a future is a cumulative rate over many days, generating a target return above transaction costs. Monthly or quarterly delivery implying a 11% annualized funding rate will show up as a hefty 1% or 3% premium to the spot price, not a 0.03% premium. Given identical daily funding rates, true arbitrage, profits without uncertainty, is possible in futures markets, but not perp markets.</p><h4><strong>TradFi swap funding rates</strong></h4><p>Many hedge funds use swap accounts for their international equity positions. There are several regulatory reasons for this, but the net result is that an investment bank acts as the custodian for the equities bought or sold short, holds the hedge fund's equities, charges a funding rate, and applies margin treatment on a portfolio basis. Notably, the hedge fund directs their trades like they would manage transactions they hold on their books. The funding rate is determined independently of the trade.</p><p>In the US, shorting stocks requires one first gets a locate, in that naked shorting is no longer allowed. For a stock with a lot of short demand, the short seller is presented with the number of shares they can short <em>and</em> the idiosyncratic short rebate. Once this is known, the trader then sells this short in the market just like any other short trade. Like the CGSE, the traded spot price and funding rate are determined in separate markets, not simultaneously as with futures.</p><h4><strong>Trust them</strong></h4><p>Regulated markets are subject to presenting an audited tape of their market trades and orders. For example, <a href="https://www.sec.gov/marketstructure/midas-system" rel="noopener noreferrer nofollow" target="_blank">MIDAS </a>collects about 1 billion records daily from all national equity exchanges time-stamped to the microsecond. They are looking for front-running or not giving clients the best trade given the consolidated set of bids and offers at a particular time. Crypto exchanges are not subject to such auditing, giving them considerable discretion at magnitudes that matter.</p><p>Perp exchanges post funding rates at various frequencies based on a weighted average of the perp premium. The spot prices they use to benchmark against parochial indexes they construct themselves must be seen in real-time, not the downsampled historical data, so their ‘index’ price cannot be known with great precision. A perp price can be calculated in various ways, such as using the previous ending price or the 'impact price,' which looks at the limit order book at the time of the trade to see the average mid-price to bids and asks that sum to $10k in notional value. Linking the perp and spot price (aka the ‘mark’ price and the ‘index’ price) to get a premium will depend on several unmentioned rules. Given each trade tick bounces around by 0.15%, any perp premium they generate given these degrees of freedom will have a standard error of at least 0.05%, giving them the freedom to post any funding rate within a 36% band (0.05% —> 18% annualized, -0.05% —> -18% annualized).</p><h4><strong>Insiders</strong></h4><p>Market makers dominate the price setting in all exchanges. They can decide to target 0.03% or 0.13% above the current spot index. As market makers, this will dictate a general pattern that will generate the desired funding rate when aggregated using the various discretionary parameters mentioned above. These professionals either post bid-ask spreads in centralized limit order books (CLOBs) or act as arbitrageurs for Automated Market Makers.</p><p>Often they are working explicitly for the exchange, as with BitMex's fair ETHUSD market makers, or doing so in a less explicit partnership.<a class="footnote-anchor" href="#footnote-10" id="footnote-anchor-10">10</a> Exchanges need liquidity, and often they get this by giving certain groups privileged access to their order book or high-speed access unavailable to retail traders. In general, we should expect crypto perp market makers to be net flat but short perps because it is much easier to be long outside your perp market than to be short. For example, if Binance's market markets were net long perps, they would have to trust another exchange like FTX for their short positions, and regulators would then have a choke point along the route such a position is maintained. In contrast, if Binance market makers were short perps, they could just own crypto on the blockchain and be hedged. The net result would be that in addition to standard market maker profitability from the spread and fees, they get an additional 10% funding rate from their natural short perp position within their riskless crypto position. It’s ridiculous that customers accept this as the status quo default funding rate.</p><p>A <a href="https://insights.deribit.com/market-research/the-quest-for-perp-amms/" rel="noopener noreferrer nofollow" target="_blank">conspicuous example</a> of this was provided by perp.fi’s ‘virtual’ AMM, where insiders provided liquidity for traders (shut down this spring). As the price of ETH went up, the traders were net long via the logic of the constant product AMM. Yet the funding rate was negative, meaning the longs were getting paid the funding rate. This was contrary to every other perp exchange in 2021. It happened because the longs, unaffiliated with the perp.fi insiders, decided to be the market makers on the perp.fi’s exchange, and perp.fi had to ability or plan to stop them. Clearly, the market makers set the perp premium and thus, the funding rate. That is what market makers do. The perp/spot price ratio does not reflect ‘long demand,’ but the market makers funding preference.<a class="footnote-anchor" href="#footnote-11" id="footnote-anchor-11">11</a> </p><h4><strong>Conclusion</strong></h4><p>This bizarre situation arose from a need to provide people with a way to trade crypto with leverage, long and short. The perp premium model cannot work and does not work the way it is advertised, and more importantly, it cannot work. It encourages sloppy thinking that pervades DeFi and gives rise to unsustainable business models built on Ponzi economics. For example, <a href="https://phemex.com/user-guides/funding-rate" rel="noopener noreferrer nofollow" target="_blank">one website</a> explains why the perp prices are higher than the spot price as follows: "logically, this means that there are more traders with long positions." No one should put money into dapps run by people with such logic because it invariably extends to their tokenomics.</p><p>The theory that explains the positive return/funding-rate correlation is a typical non-equilibrium story that sounds good but makes no sense. Like the explanation that there are "more buyers than sellers," the idea that long demand shows up in futures price premiums sounds plausible but is logically incoherent. Standard arbitrage, and the law of iterated expectations, imply current sentiment is reflected in spot prices, not forward rates. This is why funding rates are generally independent of asset prices and why a big demand for auto purchases does not materially affect the auto financing rate. Further, the return over the prior month, not the contemporaneous return, best predicts funding rates.</p><p>Past returns correlate with the basis during supply shocks where inventories are near zero or maxed out. Yet, outside of crypto, we see high prices correspond to negative funding rates and low prices to positive funding rates. This is the exact opposite of what we see in crypto.</p><p>The perp funding mechanism is supposedly an emergent market process, undirected, but hides the fact that perp exchanges control market makers who then manipulate funding rates when feasible. When prices are mooning, customers do not mind 100% annualized funding rates, which amounts to a mere 0.1% daily charge. It's like how big winners in Vegas often give the dealer a big tip: people do not respect <a href="https://www8.gsb.columbia.edu/sites/decisionsciences/files/files/thaler_and_johnson.pdf" rel="noopener noreferrer nofollow" target="_blank">house money.</a> The extra 50%+ increase in funding rates on perps relative to the CME back in February 2021 reflects insiders taking what they can.</p><p>Perp customers and crypto enthusiasts like believing that crypto projects are decentralized like a market economy: efficient, emergent, and uncensorable. The more plausible story is that perp market makers are generally short and charge a hefty 11% funding rate, which all goes into the market maker's pnl. Given the regulatory issues, it is easy for insiders at BitMex or FTX to target a net flat position by having a net short position on the perp contract and a long position on the blockchain. If they were net long on their perp contract, they would have to be short somewhere else, which would be problematic.</p><p>The solution is to get rid of perps and return to futures with a settlement. When BitMex first proposed perps, there were no stablecoins or wrapped BTC, etc., but now there are. With a settlement, you do not need an explicit funding rate, as the basis serves nicely for accommodating storage costs and fiat interest rates.</p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>A Schelling point is applied to cooperative coordination, as when market makers try to target the same price. Robert Aumann’s correlated equilibrium is applied to noncooperative games where an outside signal, such as the price on Coinbase, incents competing agents to target the same price.</p></div></div><div class="footnote" id="footnote-2"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-2">2</a><div class="footnote-content"><p>While perp exchanges have different perp premium calculations, they all apply the premium to a 24-hour period, so a 0.03% daily funding rate implies a 0.03% perp premium that day, regardless of whether it is calculated continuously or every 8 hours. There are caps, floors, and other adjustments, but these secondary issues.</p></div></div><div class="footnote" id="footnote-3"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-3">3</a><div class="footnote-content"><p>Further, by restricting institutional money from trading crypto, they have enhanced bubbles, as sober and well-capitalized investors are prevented from shorting overvalued coins.</p></div></div><div class="footnote" id="footnote-4"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-4">4</a><div class="footnote-content"><p>See <a href="https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.206.2813&rep=rep1&type=pdf" rel="noopener noreferrer nofollow" target="_blank">Routledge, Seppi, and Spatt (2000)</a></p></div></div><div class="footnote" id="footnote-5"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-5">5</a><div class="footnote-content"><p>As the basis in futures is a direct analog of the funding rate in swap markets, arguments applied to the futures basis are assumed to apply to funding rates.</p></div></div><div class="footnote" id="footnote-6"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-6">6</a><div class="footnote-content"><p>The perp at any time has the same amount of longs and shorts when taken over all participants. One could apply the net position to where you are looking at just the trading accounts instead of liquidity providers or market makers. In that case, however, the relevant metric would be the net trader position, not the perp/spot ratio. </p></div></div><div class="footnote" id="footnote-7"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-7">7</a><div class="footnote-content"><p>See <a href="https://www.nber.org/system/files/working_papers/w21243/w21243.pdf" rel="noopener noreferrer nofollow" target="_blank">Bhadwaj, Gorton and Rouwenhorst (2015),</a> <a href="https://www.nber.org/system/files/working_papers/w11222/w11222.pdf" rel="noopener noreferrer nofollow" target="_blank">Erb and Harvey (2005)</a></p></div></div><div class="footnote" id="footnote-8"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-8">8</a><div class="footnote-content"><p> There is no way an asset with 80% annualized volatility will have an all-in trading cost of less than 0.1%. You cannot look at the “top of the book” to determine the effective spread or price impact. As the dynamic trading strategies employed by the market makers are significant, one needs a large dataset of market orders when one knows the direction of the trades, and so the best institutional trading costs estimates come from looking at years of internal data, not a tape where one does not know who is initiating the trade. Explicit perp fees generally start at 0.1%.</p></div></div><div class="footnote" id="footnote-9"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-9">9</a><div class="footnote-content"><p>I used the Q1 2020 data downloadable from www.cryptodatadownload.com/data/gemini/</p></div></div><div class="footnote" id="footnote-10"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-10">10</a><div class="footnote-content"><p>That’s the good side of BitMex. Offering 100-1 leverage is their dark side. It is like selling liquor to teenagers because while it is what many traders want, it is definitely not good for them.</p></div></div><div class="footnote" id="footnote-11"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-11">11</a><div class="footnote-content"><p>Earlier this year perp.fi shut down that version, <a href="https://gov.perp.fi/t/sunsetting-perp-v1/698" rel="noopener noreferrer nofollow" target="_blank">defaulting on their obligations</a>, and blamed hedge funds for their situation. They have deleted many of their earlier posts on their earlier mechanism, which is probably a foretaste of what will eventually happen to all of the current outlines of the perp funding mechanism.</p><p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-82784374399133515342022-11-01T11:37:00.005-05:002022-11-01T11:37:48.783-05:00BitMex's ETHUSD Funding Rate Anomaly<p> The average funding rate paid by long ETH swap holders has been 63% annualized since it started trading in August 2018, considerably higher than BitMex’s BTC swap rate of 6%. You can go long ETH, short the BitMEX ETH perpetual swap, and make 63% annualized on a flat book. You might need 20% down on your perp, so 63% divided by 1.2, but that’s still a nice risk-free return.</p><p data-pm-slice="0 0 []"><br />Actually, that doesn’t work for anyone interested in their USD return. This funding rate anomaly is just the result of the parochial pricing algorithm, which generates a convoluted payout. </p><p>BitMex’s large ETH swap funding rate results from the fact that payments are denominated in BTC, which is highly correlated with ETH. Adjusting the funding rate for the positive BTC~ETH covariance adds convexity to the long ETHUSD swap return. The swap funding rate for ETH adjusts for this, leaving a net funding rate near zero. BitMEX makes enough money via standard trading and liquidations, so they <a href="https://archive.ph/ONG7E" rel="noopener noreferrer nofollow" target="_blank">explicitly direct</a> their market makers to break even over time.</p><div class="subscription-widget-wrap" data-attrs="{"url":"%%checkout_url%%","text":"Subscribe"}"><div class="subscription-widget show-subscribe"><form class="subscription-widget-subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The ETHUSD funding rate is like the <a href="https://www.cmegroup.com/education/courses/introduction-to-eurodollars/understanding-convexity-bias.html" rel="noopener noreferrer nofollow" target="_blank">convexity adjustment</a> in Eurodollar futures needed to compare them with Eurodollar interest rate swap rates. In the case of futures vs. swaps, the subtle difference comes from the fact that the futures pay out their pnl each quarter while the swaps accrue it, and the payout is correlated with interest rates that accrue on that pnl. Similarly, when the long ETH position pays off bitcoin, the value of that bitcoin will tend to be higher. The Eurodollar futures-swap convexity adjustment became well-publicized in the mid-90s, but for a good five years, several large players made millions on this arbitrage (you could not make money off it without institutional access to cross margin). As Eurodollars are one of the largest markets in the world, it is understandable that a large market like the ETHUSD could also miss this adjustment. </p><p><strong>BTC Swap Payoff</strong></p><p>Let us first look at the profit generated by the asset price for a perp without this adjustment, the BTC perp. The long USD profit is generated in BTC as follows for an entry price at time t, and exit at t+1:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":229,"resizeWidth":null,"bytes":1714,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="69.86899563318777" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcce4b0f-e30a-4b6c-96db-c190bd5ad42c_229x50.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>[BitMex uses the XBT for BTC. Whatevs]. As you are getting paid in BTC, and the above payoff is in USD, you need to make the final adjustment of this into BTC, so you add this final price to the payoff function to put it into the return people care about:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":282,"resizeWidth":null,"bytes":2021,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="56.73758865248227" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7253031d-1e80-494d-a9f1-3a89d7c21571_282x50.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>which implies the <a href="https://www.bitmex.com/app/inversePerpetualsGuide" rel="noopener noreferrer nofollow" target="_blank">inverted perp payoff</a>:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":260,"resizeWidth":null,"bytes":1797,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="61.53846153846154" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6734a396-afc2-4ca4-841d-53723803bd01_260x50.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>Note the backward ordering of the prices, contrary to the standard case. This is because the BTC notional amount is in USD, and we have to ultimately translate that back into BTC. It looks funny but is quite straightforward in its effect. Actually, admirably clever. </p><p><strong>ETH Swap Payoff</strong></p><p>The BitMEX ETH swap payoff is a notional amount times the change in the USD ETH price:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":341,"resizeWidth":null,"bytes":1815,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb89c6cd-8bcc-49b8-88c9-fe97af9b4dbc_341x26.gif 1456w" width="341" /></picture><div></div></div></a></figure></div><p>This generates a BTC-denominated payoff, however, and most people care about USD. To translate into USD, we must first take USD notional and turn it into bitcoin at time t, then turn the payoff back into USD at time t+1. The round trip starts and, ends in USD</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif","fullscreen":null,"imageSize":null,"height":45,"width":392,"resizeWidth":null,"bytes":2329,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="45" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6f0eb28-10ad-4d5f-97d8-f8c5b0b1f5e1_392x45.gif 1456w" width="392" /></picture><div></div></div></a></figure></div><p>Rearranging we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/11f34512-1911-4a2f-a163-110c05af2097_366x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":366,"resizeWidth":null,"bytes":2471,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="50" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F11f34512-1911-4a2f-a163-110c05af2097_366x50.gif 1456w" width="366" /></picture><div></div></div></a></figure></div><p>Or using net returns:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":348,"resizeWidth":null,"bytes":1908,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F390ae80d-332a-4e74-8628-b8018c204fd5_348x26.gif 1456w" width="348" /></picture><div></div></div></a></figure></div><p>This is the return that investors care about, not the bitcoin return. If we put this into simple net USD returns we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":273,"resizeWidth":315,"bytes":1737,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="30" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F57d6f340-5c71-4a9d-9706-5add13ecd7ad_273x26.gif 1456w" width="315" /></picture><div></div></div></a></figure></div><p>As the expected value of E(x*y) = covariance of x and y, we can restate this as</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":321,"resizeWidth":377,"bytes":1915,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="30.53582554517134" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4eb21e8e-f8b8-428a-82ec-89a1e7825ba3_321x26.gif 1456w" width="377" /></picture><div></div></div></a></figure></div><p>If we substitute the covariance using correlation and volatility metrics for ETH and XBT, we get:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif","fullscreen":null,"imageSize":null,"height":46,"width":261,"resizeWidth":305,"bytes":2020,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="53.75478927203065" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6e706caf-8c15-41ae-90ca-b407225093b2_261x46.gif 1456w" width="305" /></picture><div></div></div></a></figure></div><p>Since August 2018, the annualized volatility for BTC and ETH has been 78% and 103%, respectively, with a correlation of 83%, generating a covariance adjustment that annualizes out to be about 63%. The annualized return premium of the BitMex ETH swap compared to the ETH USD return over that period: 83% vs. 149%, a difference of 66%.</p><p><strong>BitMex returns</strong></p><p>8/2018-6/2022</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png","fullscreen":null,"imageSize":null,"height":142,"width":463,"resizeWidth":null,"bytes":3544,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="142" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F43e9fe74-644c-4904-b70b-8620ecb25a35_463x142.png 1456w" width="463" /></picture><div></div></div></a></figure></div><p></p><p>Interestingly, the average funding rate over this period was around 63%. This implies an average ETH perp premium of negative 3%, basically zero. A short ETHUSD position hedged against a long ETH position would have lost 66% in USD terms due to the convexity generated by the ETH~BTC covariance. The high funding rate for this product is an equilibrium rate that offsets this convexity adjustment, generating no arbitrage opportunity. </p><div class="subscription-widget-wrap" data-attrs="{"url":"%%checkout_url%%","text":"Subscribe"}"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><br /></p></div><form class="subscription-widget-subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-76481779904751962492022-11-01T11:36:00.007-05:002022-11-01T11:36:45.862-05:00AMMs are Broken<p> Yield farming protocols are primarily based on fees generated by providing liquidity on automated Market Makers (AMM) like Uniswap. Typically, a pair like ETH/USDC is siloed into a 'pool,' and the liquidity provider (LP) is exposed only to that pool. The additional yield comes from staking, which involves getting tokens for locking funds in a dapp or blockchain. These are the primary sources for the absurd Annual Percent Yields (APYs) promoted by everyone from <a href="https://www.gemini.com/cryptopedia/what-is-yield-farming-crypto-defi-liquidity-mining#section-staking-crypto-vs-yield-farming" rel="noopener noreferrer nofollow" target="_blank">Gemini </a>to your typical crypto influencer.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png","fullscreen":null,"imageSize":null,"height":141,"width":758,"resizeWidth":641,"bytes":16612,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="119.23614775725594" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F502027dc-0692-4b28-a327-1b5fd8b5976b_758x141.png 1456w" width="641" /></picture><div></div></div></a><figcaption class="image-caption">Common Delusional Crypto Article Heading</figcaption></figure></div><p>Anyone with some grey hair will immediately see this as impossible, like someone telling you how they created a perpetual motion machine. If someone truly found a 100%+ return strategy, they would not be telling everyone because that would dilute the rare opportunity. For example, in the early 2000s, a <a href="https://www.cbsnews.com/news/jerry-and-marge-selbee-how-a-retired-couple-won-millions-using-a-lottery-loophole-60-minutes-2019-06-09/" rel="noopener noreferrer nofollow" target="_blank">retired Michigan couple </a>figured out how to make 80% returns off a new, poorly conceived lottery. He netted about $8 million over almost a decade and invited close friends and family. They did not advertise for investors on Facebook.</p><p>I will not discuss the staking returns other than to note that the <a href="https://www.stakingrewards.com/staking/" rel="noopener noreferrer nofollow" target="_blank">best-case scenario</a> here is to earn 10%. Like all good scams, there is a valid case for the strategy (staking on Ethereum offers 4% APY, and performs a real service). However, most staking schemes have no purpose other than the classic Ponzi game. The promoter gets early investors to stake in their PonziToken. Their over-the-top online game, which often explicitly uses the word ‘pump,’ motivates more noobs to buy the PonziToken for staking, allowing the scammer to pay off initial stakers by minting new tokens that have increased in value. It's such a stupid strategy I have no interest discussing it in more detail.</p><p>Examining the LP strategy, I will focus on Uniswap because it is the least scammy and has the most value locked in AMM pools. I will also focus on the ETH/USDC pair to make the application less abstract (it's hard to keep track of tokenA and tokenB). An LP provides an option to traders: you can buy ETH for $1100 or sell it for $1100.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a> Options have value, so traders pay for this value via a fee of 0.05% or 0.3% of the value traded. LP profit equals revenue minus expense. </p><p>The main problem in AMMs is that LPs are either wholly ignorant or do not appreciate the value of the option they are writing. Note the allusion to 'impermanent loss' as if it is not real. To see the flaw in this thinking, consider the strategy of writing (selling) calls while long a stock. Such a strategy adds yield to the writer when the options are sold. If the price of the stock goes up, this covered-call position makes money, just less than if he didn't write the call; if the stock price stays constant, the writer makes a positive amount due to the call premium; if the stock price falls, the writer loses less than he would have without selling the worthless call. A smooth-talking salesman could sell this investment as costless because, as framed, in no scenario does the covered call writer lose money (<a href="https://app.ribbon.finance/" rel="noopener noreferrer nofollow" target="_blank">this site</a> by Ribbon finance is bold enough to post its crypto option premiums as APY).</p><p>The key to seeing the flaw in this accounting is evaluating the portfolio's constituents. Arbitrage pricing theory, and common sense, tell us that the pieces of a portfolio add up to the entire portfolio's value. If that were not true, one could buy a portfolio, sell its components, or vice versa, and make a profit. In the case of the covered call, you can evaluate the stock and call position separately and note that the value of the call, absent mispricing, is equal to its expected value. The same is true for an LP position: it generates fees but pays via the expected value of the impermanent loss. Considering the LPs are generally unaware of this option, and LP promoters do not try to estimate this expense, it’s easy to see why LPs are massively undervaluing the option they are writing. </p><p>The neglect of this cost is everywhere. For example, here is a list of top yield farming opportunities, and they promote Uniswap as generating a nice 40% APY.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png","fullscreen":null,"imageSize":null,"height":353,"width":628,"resizeWidth":324,"bytes":28990,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="182.12101910828025" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76cbceb1-82a0-496d-93d4-54bb35871b90_628x353.png 1456w" width="324" /></picture><div></div></div></a><figcaption class="image-caption">ORLY?</figcaption></figure></div><p>How do they get 20-40%? By annualizing the fees generated divided by the Total Value Invested in the pool. If you look at the prominent Uniswap ETH/USDC pools in that way, they generate APYs of that magnitude. This is generally willful ignorance. </p><p>Uniswap LPs generally lose a lot of money when the costs of the options they write are calculated. It is an unavoidable cost [I wrote about this <a href="https://efalken.substack.com/p/how-and-why-to-measure-liquidity" rel="noopener noreferrer nofollow" target="_blank">here</a>]. If you do not understand that you should not be providing liquidity pools because you are being taken advantage of; if you do understand that you should not be providing liquidity to AMM pools because you know you are losing money.</p><h3>Arbitrage Trading LP Revenue Is Insufficient</h3><p>Arbitrage trading will not solve the AMM problem, regardless of the fee. For most active markets, the Uniswap pools are pretty efficient in closely following the prices on centralized exchanges such as Binance, Gemini, and FTX. For the past few years, centralized exchange prices have been within a 0.1% of each other at all times, so we can use one as a reflection of the 'true' price. Consider the PDF below showing the distribution of the pricing difference between the Uniswap pools and the Gemini price, using downsampled minute data from the past couple of months.</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png","fullscreen":null,"imageSize":null,"height":575,"width":951,"resizeWidth":433,"bytes":54007,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="245" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F76e5aef3-7367-469f-ae0f-a17757f46314_951x575.png 1456w" width="405" /></picture><div></div></div></a></figure></div><p>If AMMs have prices closely linked to the 'true' price one sees on major exchanges, it is tempting to download centralized price data to see what this implies for a new AMM.</p><p>For constant Function Market Makers (CFMMs), The AMM math implies the following relation between a pool's liquidity and the price movements. The tricky thing to note here is that the change in the square root of prices directly relates to the USD traded.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif","fullscreen":null,"imageSize":null,"height":40,"width":270,"resizeWidth":268,"bytes":1619,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="39.7037037037037" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f72aadd-e048-4610-be37-c55f2aac8e18_270x40.gif 1456w" width="268" /></picture><div></div></div></a></figure></div><p>To estimate revenue for LPs, one multiplies by a simple fixed percent fee (e.g., 0.05%, 0.3%) [we will ignore the fact that the fee is applied to both tokens and just focus on the USD revenue. As an approximation, it is sufficient]</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":246,"resizeWidth":240,"bytes":1274,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="25.365853658536587" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F370d4132-dfcc-4a33-99f6-f4655d9d161f_246x26.gif 1456w" width="240" /></picture><div></div></div></a></figure></div><p>Given this formula, it can appear we can estimate an LP's revenue by looking at the change in prices taken from Binance or Gemini. Note liquidity is a proportional term, so we can look at the total liquidity of the pool or apply this to a potential investment and it works the same. There is no distinction between a marginal LP and an initial LP. In either case, we multiply by the fee to get the LP revenue.<a class="footnote-anchor" href="#footnote-2" id="footnote-anchor-2">2</a> </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif","fullscreen":null,"imageSize":null,"height":40,"width":423,"resizeWidth":417,"bytes":2262,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="36" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa77d61c3-f6a2-4ffb-863a-b69da7524b26_423x40.gif 1456w" width="410" /></picture><div></div></div></a></figure></div><p>If we apply Gemini's price data by minute using this method, such an approach will dramatically overestimate AMM pool arbitrage volume. If the current price on an AMM pool is 0.5% away from the price on Binance, and the fee was 1.0%, this would not be attractive to an arbitrageur interested in making profits. No profit-maximizing arbitrageur would pay 1.0% to earn 0.5%. We see this in the Gemini-Uniswap pricing difference graph above, where the 0.3%-pool has a fatter distribution than the 0.05% fee pool. </p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg","fullscreen":null,"imageSize":null,"height":285,"width":474,"resizeWidth":404,"bytes":13625,"alt":null,"title":null,"type":"image/jpeg","href":null,"belowTheFold":true,"internalRedirect":null}" height="210" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7d9db54f-602b-4650-a96f-febafb594b80_474x285.jpeg 1456w" width="350" /></picture><div></div></div></a><figcaption class="image-caption">The Coastline is Shorter the Coarser It Is</figcaption></figure></div><p>The fee impacts the total sqrt(p) movement straightforwardly. Consider the mathematical curiosity of the infinite coastline shown above. If we assume coastlines are fractals, then the coastline looks the same in every dimension. With infinite precision, we should say that the coastline of California is as extensive as that of the city of San Francisco. While this is an absurd limit constrained by the Plank length in the real world, it highlights a profound point: the sum of square-root-of-price changes is a function of the precision of any squiggly path we are looking at. Below is a chart of intraday prices, down sampled to the minute, on a particular day this month. Here is the Gemini, Uniswap's ETH/USDC 0.3% fee pool, and their 0.05% fee pool, down sampled to the minute.</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png","fullscreen":null,"imageSize":null,"height":622,"width":962,"resizeWidth":483,"bytes":61615,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="244" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F64b64d6d-7bd9-411b-adb5-dc51bd50daed_962x622.png 1456w" width="377" /></picture><div></div></div></a></figure></div><p>The lines are basically on top of each other. However, looking more closely, we can see how the larger fees reduce the sum of all those price changes. Below is a picture of a 2-hour window; we can see clearly that the 0.3% pool shows much more price stasis. </p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png","fullscreen":null,"imageSize":null,"height":622,"width":957,"resizeWidth":431,"bytes":56346,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="247" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7ba9ca17-31b0-4391-b7bd-e62d8962e931_957x622.png 1456w" width="380" /></picture><div></div></div></a></figure></div><p>While it is not obvious, the 0.05% pool also fluctuated less than the Gemini price. While this day looks rather unusual, it represents the past 12 months' worth of data. The chart below shows that the 0.05% fee pool had about 75% of the square-root-price changes, while for the 0.3% pool, it was only 25% of the Gemini price changes. If you create a simulation where you change prices only when they move more than 0.05%, or 0.3%, from an initial price, you will see a similar pattern. There is no getting around it.</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 1456w" type="image/webp"></source><span> </span><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png","fullscreen":null,"imageSize":null,"height":452,"width":752,"resizeWidth":471,"bytes":20043,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="231" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5fbe1589-000d-47ea-8c18-4b3641c31e24_752x452.png 1456w" width="384" /></picture><div></div></div></a></figure></div><p>Currently, Uniswap LPs in both of these pools lose money when we apply the standard option cost. To figure this out, instead of looking at each LP and seeing whether they made money unhedged, I assume they hedged their books perfectly as good capital stewards do. This involves multiplying the gamma, which is unambiguous, and the price volatility that day. Since gamma is a function of the liquidity and price, and these two pools refer to the same asset, they have the same price. So let us look at the pnl/liquidity in the two pools. [I explain this in more detail <a href="https://efalken.substack.com/p/uniswap-lps-are-losing-money" rel="noopener noreferrer nofollow" target="_blank">here</a>].</p><p><strong>Uniswap Pool Data</strong></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png","fullscreen":null,"imageSize":null,"height":408,"width":975,"resizeWidth":null,"bytes":74131,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="253" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f6390a-10b0-4f47-a28a-5560ca887bb1_975x408.png 1456w" width="605" /></picture><div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png","fullscreen":null,"imageSize":null,"height":408,"width":975,"resizeWidth":null,"bytes":74755,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="254" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6bd71260-e7d5-4bda-830a-08c44e51dc44_975x408.png 1456w" width="607" /></picture><div></div></div></a></figure></div><p></p><p>Here we see the 0.05% pool loses about twice as much as the 0.3% pool when LP positions are normalized by units of liquidity.<a class="footnote-anchor" href="#footnote-3" id="footnote-anchor-3">3</a> Currently, the 0.3% pool is the lesser of two evils, the winner of the least ugly pig contest.</p><p>However, the 0.3% pool actual revenue is only 20% of that implied by Gemini minute-down sampled prices. If you anticipated the revenue from arbitrage trading via Gemini minute data, you would have been off by a factor of 5. This is explainable given arbitrageurs need the pool prices to deviate by 0.3% from the Gemini price before becoming profitable; arbitrageurs ignore all moves within this range.</p><p>In contrast, the 0.05% pool generates slightly more revenue than if it matched the Gemini minute price data. If we consider that the Gemini pricing data will overstate the arbitrage price changes due to the 0.05% fee, this implies the appearance of liquidity traders, who appear absent on the Uniswap 0.3% pool.<a class="footnote-anchor" href="#footnote-4" id="footnote-anchor-4">4</a> Casual traders prefer the more liquid and cheaper ETH/USDC pool. Indeed, it would be absurd for it to be any different. </p><p>While the 0.3% pool may be less unattractive than the 0.05% pool currently, at least the 0.05% pool has a chance. The net profit for an LP providing liquidity only to arbitrageurs is at best zero. This is obvious when you consider that the arbitrageur is taking the other side, and they have the option to initiate action. Their net pnl includes not just the fee on the AMM but the transaction costs paid to hedge on centralized exchanges or pay gas. </p><p>The good news is that there are signs of life in the 0.05% pool, the appearance of some liquidity traders. The bad news is few are focusing on the essential issues. Many in this space do not realize 1) AMM pools are broken and 2) the solution involves creating a way for LPs to make money without going to pseudo-decentralized, censorship/confiscation-tolerant, low-latency blockchains (e.g., Solana, whatever dydx is planning). </p><h3>The Needed Solution</h3><p>A standard central limit order book has three types of traders: uninformed, informed, and market makers. The informed traders invest in data, models, and hardware to identify temporary mispricings. The uninformed are ignorant for rational and irrational reasons: they want to buy a car (liquidity traders) or are delusional and trading on irrelevant information (noise traders). As informed and uninformed traders do not show up simultaneously, market makers arise to provide liquidity continually by posting resting limit orders to buy and sell.</p><p>In equilibrium, all groups generate benefits equal to their costs. The informed trader's costs are balanced by revenue from adversely selecting stale market maker limit orders. The uninformed pay the market maker by crossing the spread, benefiting from convenient, quick trading. Market makers post knowing they will trade with both types of traders, setting limit orders such that the revenue from uninformed balances that they lose to the informed. Given the changes in information and technology, the equilibrium solution is different and has changed rapidly over the past 40 years.</p><p>Historically, market makers dealt with this problem via a state-imposed monopoly. For example, for decades, one could only trade certain stocks on the New York Stock Exchange, and a specialist would process the orders. While competition arose in the 1970s, as late as 2000, most specialists would lose money 'trading' only a handful of days a year.<a class="footnote-anchor" href="#footnote-5" id="footnote-anchor-5">5</a> This is still a dominant solution, in that the 2008 financial crisis created new power for US regulators to shut down over-the-counter markets using the standard rationale of ensuring the safety of our economic system. This helped venues like the CBOT and CME in Chicago tighten their control on futures and derivatives.</p><p>As the internet developed, electronic market makers like Archapalego and Island changed the equity trading game. Like Uber, they became too big before US regulators could figure out how to attack them, and forever changed asset trading. Yet these new electronic market makers had to create some way of generating an advantage, a barrier to entry. </p><p>They compete mainly by developing economies of scale in hedging and raw computer hardware, in combination with some alpha, to give them a bleeding-edge advantage. The key is to be five milliseconds faster than the next guy because if you see a 'true' price change coming, you want to lift your limit order and let someone else get run over; if you know the price is going up, you want to post your bid at the new higher level the top of the queue. Given the price-time nature of limit order books, the value of being n-th fastest declines rapidly.</p><p>The latency game is all about avoiding adverse selection. Market makers will not be those who create price movements; that's a different set of skills and focus. They just need to be quicker at sensing such price movements. High-frequency trading shops get a bad rap, but the net effect has been a dramatic reduction in equity trading costs since 2000. It's strange to see leftists pining for the good old days when monopolists would post bid-ask spreads of 1/4 in Microsoft, one of the most popular stocks; today, highly liquid stocks are often only a penny spread. Competition is messy, and the winners are not vetted by a Star Chamber. The pleasant demeanor of your average crony-capitalist hides inefficiency, promotes stasis, and worse, encourages people to lie (they want their privileges, but always present it as mitigating systemic risk).</p><p>Another active focus for high-frequency market makers is identifying the liquidity traders from the informed traders. Retail flow from places like RobinHood or ETrade is known to be uninformed.<a class="footnote-anchor" href="#footnote-6" id="footnote-anchor-6">6</a> There are many mechanisms to identify this flow, and they are often pursued via a complementary service, or sold to the highest bidder (the savings are passed on via competition).</p><p>The AMM is a great innovation but has not yet solved the problem of generating a sustainable automated exchange. It's on borrowed time because the initial excitement created by the success of SushiSwap tokens and then Uniswap's airdrop masked the overall poor performance for LPs. Lately, dydx and perp.fi generated large trade volume primarily by users gaming their reward system.<a class="footnote-anchor" href="#footnote-7" id="footnote-anchor-7">7</a></p><p>Almost all of AMM volume is a mirage, arbitrageurs making money off of LPs too stupid to understand the cost of the option they are writing.<a class="footnote-anchor" href="#footnote-8" id="footnote-anchor-8">8</a> These LPs see the fees but neglect to quantify the 'impermanent loss.' Such losses can be ignored in a big bull market like 2021. </p><p>What DeFi needs are solutions that allow LPs to distinguish between themselves. If all suppliers have the exact same cost and quality, as idealized by many, it would not be a utopia; it would be unsustainable. The profit on such a product or service would be driven to zero, and the market would collapse: suppliers need to make a profit in a sustainable market, and buyers need to collect consumer surplus. LPs need a mechanism for building barriers to entry while still obeying Satoshi’s principles: permissionless access, censorship resistance, immutability, and transparency. </p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>There is market impact, but that's a distraction here</p></div></div><div class="footnote" id="footnote-2"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-2">2</a><div class="footnote-content"><p>Restricted ranges, Uniswap v3, don’t change anything about the profitability of these pools. It merely changes the capital efficiency relative to a v2 if you manage it correctly. Many LPs do not monitor their ranges, however, so net net, has had an ambiguous effect on the average LP. For example, if you have had an inactive range on Uniswap for the past month, that is worse than supplying liquidity for an absurdly large price range. More importantly, the gamma generated by v3’s liquidity, and volume on those pools, is sufficient to assess their profitability. One does not need to isolate all of the ranges and evaluate them. To the extent a range is inactive, it will not be reflected in the liquidity numbers; it will not partake in revenue, or experience the losses intrinsic to providing liquidity (ie, gamma). A v3 position has a delta, but that is not a cost because it is avoidable, in that it can be hedged away without cost.</p></div></div><div class="footnote" id="footnote-3"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-3">3</a><div class="footnote-content"><p>It’s better to use gamma when comparing option values, but here the gamma is simply a function of the same ETH price for both, so comparing liquidity generates the same result as comparing gamma. As most readers do not intuit gamma easily, it is better to avoid it when possible. </p></div></div><div class="footnote" id="footnote-4"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-4">4</a><div class="footnote-content"><p>Applied to 1-minute data, the 0.05% bound would reduce the square root of price change sums by 10%.</p></div></div><div class="footnote" id="footnote-5"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-5">5</a><div class="footnote-content"><p>Invariably, market makers with privileged access to flow would present themselves as if they were speculators. Their consistent profitability showed this was not remotely true. </p></div></div><div class="footnote" id="footnote-6"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-6">6</a><div class="footnote-content"><p>When high-frequency traders pay for this flow many see this as a malicious conspiracy, but it is part of a process that has reduced spreads by a factor of 10. Not only is grandma’’s spread tighter, but the HFTs also are not going to flinch when she makes a fat-finger trading error and buys 10x more than intended: a big order from the uninformed will have a lower trade impact. </p></div></div><div class="footnote" id="footnote-7"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-7">7</a><div class="footnote-content"><p>The dydx CEO Antonio Juliano went on <a href="https://www.youtube.com/watch?v=basEZ47am6Q" rel="noopener noreferrer nofollow" target="_blank">Bankless</a> while this absurdity was happening, and the interviewers were clueless as to what was going on, and just asked the CEO how it feels to create such a popular exchange; these guys had no idea what all that volume represented. It was fake volume generated to get rewards, which were valuable because people looked at the raw volume numbers and mistakenly thought that represented ‘real’ volume. A complete clusterpuck, so typical to DeFi. See <a href="https://twitter.com/crypto_noodles/status/1521508785164066817" rel="noopener noreferrer nofollow" target="_blank">this </a>twitter thread.</p></div></div><div class="footnote" id="footnote-8"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-8">8</a><div class="footnote-content"><p>I have heard several people, such as <a href="https://www.paradigm.xyz/2022/05/the-dominance-of-uniswap-v3-liquidity" rel="noopener noreferrer nofollow" target="_blank">Dan Robinson of Paradigm</a>, say that given the depth of the AMMs on Uniswap, who is to say that the ‘true’ price is on Binance as opposed to Uniswap? This rarely gets any pushback but is wrong for several reasons, and I’ll mention two. </p><p>First, on centralized exchanges, latency is in milliseconds, while for trustless blockchains, it is at least several seconds. If you know where ETH price is going, you are not going to first leak it to a blockchain that will sit on that info for 10 seconds; you will go to the low latency venues first. Uniswap is still reacting, not setting prices. </p><p>Secondly, an AMM uses a math formula that is static for 10 seconds at least, while a centralized limit order book contains several well-capitalized high-frequency traders employing algorithms that respond to trades within 20 milliseconds. The static level-2 quotes—depth of book—generates an apples-and-oranges comparison. Not only are there often limit orders explicitly hidden on many exchanges, but there are also many more limit orders implicit in dynamic strategies coded into servers colocated with the exchange. </p><p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-24932197730100540322022-11-01T11:34:00.003-05:002022-11-01T11:34:19.594-05:00Cumulative vs. Simultaneous Mutations<p> Intelligent design is fascinating because when biologists debate probabilities they often disagree by orders of magnitude. For example, <a href="https://bio-complexity.org/ojs/index.php/main/article/view/BIO-C.2010.1/BIO-C.2010.1" rel="noopener noreferrer nofollow" target="_blank">Doug Axe</a> looked at a Beta-Lactamase enzyme and estimated that the ratio of amino acid permutations that would fold correctly and break down ampicillin is one in 10^77. In contrast, evolutionists point to research that generates much larger likelihoods. Telomere discoverer and Nobelist <a href="https://www.nature.com/articles/35070613" rel="noopener noreferrer nofollow" target="_blank">Jack Szostak and Anthony Keefe </a>estimated that the likelihood an 80-amino long protein can bind to inactivated ATP to be on the order of one in 10^12. Most estimates are around 1 in 10^50, but some are as low as <a href="https://academic.oup.com/peds/article/15/7/619/1488462?login=false" rel="noopener noreferrer nofollow" target="_blank">one in a thousand</a>.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a></p><p>There are not many debates where scientists disagree by 77 orders of magnitude. While these researchers were looking at different proteins doing different things,<a class="footnote-anchor" href="#footnote-2" id="footnote-anchor-2">2</a> they all thought their research was relevant to an essential question in evolutionary models: how smooth is the fitness landscape? To create new genes that created the original topoisomerase, or one of the 700 unique genes in both chimps and humans, it had to go from something—randomness, an existing or copied gene—to something new that aids fitness. Richard Dawkins portrays this as walking up a smooth hill behind what looks like an impenetrable cliff (<em>Climbing Mount Improbable</em>). This could be true, but not all peaks have smooth trails. For example, assume an organism is at the blue dot in the graph above, where the x-axis represents a one-dimensional fitness landscape while the y-axis represents fitness (the fitness landscape was popularized by Sewall Wright in the 1930s). </p><p></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png","fullscreen":null,"imageSize":null,"height":452,"width":752,"resizeWidth":null,"bytes":37245,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="452" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec69b2d0-eefe-48ea-9018-6107d59b3b6a_752x452.png 1456w" width="752" /></picture><div></div></div></a></figure></div><p>A century ago, a shift of allele frequencies in local populations was an adequate model for all evolutionary processes, as various allele combinations generate different phenotypes. However, with the discovery of DNA genes are more like computer code than a mixture of baking ingredients, and proteins have specific folds, alpha and beta sheets, and binding sites with distinctive 3-d shapes and polarity. In this context, moving up a fitness landscape could involve leaps across chasms where multiple specific amino acids are needed in particular locations to be viable or better. In this case, a hill-climbing algorithm could get stuck forever at a local maximum, like the 500-million-year-old nautilus with its <a href="https://archives.evergreen.edu/webpages/curricular/2011-2012/m2o1112/web/cephalopods.html" rel="noopener noreferrer nofollow" target="_blank">pinhole-lens eye</a> (its cephalopod cousin, the octopus, has a complex lens like a human).</p><p>My interest here pertains to a specific argument in Michael Behe's <a href="https://www.amazon.com/The-Edge-of-Evolution-audiobook/dp/B000U88Z5Y" rel="noopener noreferrer nofollow" target="_blank"><em>The Edge of Evolution</em></a>, about the probability of generating multiple mutations that increase fitness. Behe noted the empirical likelihood of malaria developing chloroquine resistance is estimated at around 10^20, which was not disputed. The mutation rate of the malaria parasite <em>P. falciparum</em> is roughly 1 in 10^8 mutations per base pair per parasite. As there are 10^12 parasites in the human body on average, there are probably a thousand copies of every possible mutation to exist somewhere in each infected person. The resistance rate for atovaquone is 1 in 3 people, within an order of magnitude of what is expected. The probability of 10^20 suggests that malaria needs two mutations almost simultaneously, in that one alone is not common in the gene pool.</p><p>Evolutionists universally emphasized disagreement on this point (see <a href="https://pondside.uchicago.edu//ecol-evol/faculty/Coyne/pdf/Behe,%20New%20Republic.pdf" rel="noopener noreferrer nofollow" target="_blank">Coyne</a>, <a href="https://www.nature.com/articles/4471055a" rel="noopener noreferrer nofollow" target="_blank">Miller</a>, <a href="https://sandwalk.blogspot.com/2014/07/michael-behe-and-edge-of-evolution.html" rel="noopener noreferrer nofollow" target="_blank">Moran</a>). They argued that cumulative selection makes comparisons to monkeys typing Shakespeare, tornados assembling 747s in a junkyard, or two simultaneous mutations, all irrelevant. This assumption allows the belief that macroevolution is just microevolution over extended time frames. Notably, none of these critics proposed a model consistent with the 10^20 datapoint, whether the probability of n mutations scales at say, p/n vs. p^n.<a class="footnote-anchor" href="#footnote-3" id="footnote-anchor-3">3</a> A couple of years after Behe's book was published, <a href="https://www.pnas.org/doi/abs/10.1073/pnas.1322965111" rel="noopener noreferrer nofollow" target="_blank">researchers documented</a> that two mutations to the malarial PfCRT protein were necessary for chloroquine resistance. One mutation alone seemed deleterious as there were not many malaria with one of the needed mutations, ready to reach a new fitness level via the second one.</p><p>I found an excellent way to model this is using lattices. Lattices are helpful in option pricing, such as the binomial options model of Cox-Ross-Rubinstein. A barrier option model is analogous to the situation where a proto-protein needs n specific amino acids to gain some new functionality. This approach shows how if you need n specific mutations to get some higher fitness level, the cumulative probability of getting these will be observationally equivalent to the likelihood of getting these mutations sequentially.</p><h3>The Model</h3><p>The probability of reaching a lattice node is the sum of the probability of all the paths to that node (Pascal's triangle). An organism moves rightward through the lattice with each mutation in its germ line. While this ignores heterozygosity, the point is to clarify the relative magnitudes of the cumulative vs. 'simultaneous' mutation; the refinement can be added later without loss of generalization.</p><p>The top row of nodes represents states where a descendant has a complete sequence of the targeted functional protein. We terminate the lattice at this point because the organism's germ line generates the functionality of interest. In the case of malaria, at this point, it can withstand the chloroquine and grow exponentially within the host, and break free to enter another host.</p><p></p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png","fullscreen":null,"imageSize":null,"height":275,"width":599,"resizeWidth":null,"bytes":8300,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="275" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f579d26-2f50-4f78-836d-69bbc751fbdd_599x275.png 1456w" width="599" /></picture><div></div></div></a></figure></div><p>In the above example, the initial state is at the far left node. Here we model the case with 14 amino acids, and each level beneath the top row represents an increase in the number of amino acids needed to reach the target. It does not matter which amino acids are incorrect. For example, the initial state may need two specific mutations, but later on, the organism could be at a state where it requires two different mutations. These scenarios would have the same probability of reaching the target in this model.</p><p>The probability of moving up is the same for all nodes on the same row in the lattice. The probability of getting 1 of 2 specific acids is the same regardless of which amino acids do not match and what the pathway was to get there. The probability of moving up, p(u), goes down as one moves upward because the number of possible good mutations relative to the number of possible bad mutations goes down. For example, if initially, we need two specific changes, and with 424 aminos that means there are 8056 (422 times 19 amino acids) ways to move away from the target, and two ways to move towards the target, creating a 0.025% probability (2/(422·19+2)) of moving towards the target. You can play with parameters in the excel sheet linked below.</p><p></p><div class="file-embed-wrapper"><div class="file-embed-container-reader"><div class="file-embed-container-top"><img class="file-embed-thumbnail-default" src="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Fattachment_icon.svg" /><div class="file-embed-details"><div class="file-embed-details-h1">Latticeexample</div><div class="file-embed-details-h2">61.6KB ∙ XLSX File</div></div><a class="file-embed-button wide" href="https://efalken.substack.com/api/v1/file/54037325-8519-4290-b61f-4d058b34b672.xlsx"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://efalken.substack.com/api/v1/file/54037325-8519-4290-b61f-4d058b34b672.xlsx"><span class="file-embed-button-text">Download</span></a></div></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/290bea84-b73a-452c-a844-1422fe4b672d_608x202.png","fullscreen":null,"imageSize":null,"height":202,"width":608,"resizeWidth":null,"bytes":8419,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="202" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F290bea84-b73a-452c-a844-1422fe4b672d_608x202.png 1456w" width="608" /></picture><div></div></div></a></figure></div><p>It may be that many of the amino acids do not affect the functionality of the target protein. For example, one could argue that two specific mutations are needed, but only 212 of the other amino acids are necessary for functionality. In this case, we just change the number of total amino acids from the actual 424 to a 'functional' 212, as the others are irrelevant.</p><p>The mathematical intuition for this result is the following. The number of paths to the top row increases by a factor of 4 as one moves through time. In the chloroquine example, the top nodes represent all the combinations with two more up movements than down movements: up-up, up-down-up-up, etc. The probability of these successful paths declines by a factor of 0.001 because each path requires the extra p(u); a downward move implies an additional implausible upward move to get back to its earlier closeness to the target. The net probability--the number of paths times the probability, 4 × 0.001—therefore decreases by orders of magnitude at each step. Adding numbers that decline by an order of magnitude or more leaves the first digit unaffected, as when you add the numbers 0.01+0.0001+0.000001; the first term, 0.01, approximates the sum. In this way, the probability of a direct path number approximates the cumulative probability.</p><p>If we consider that mutations are like Poisson probabilities, happening randomly through time, the likelihood of two sequential specific mutations is equivalent to the probability of two simultaneous specific mutations. The direct sequence of mutations is precisely like the probability of a simultaneous mutation.</p><p>In the infinite limit, the odds of reaching the target are 1.0 regardless of how close one is to a target. The standard way of modeling probabilities ignores the pathways and looks at limits, obscuring this result.</p><p>While many paths lead to the target, as a practical matter, they are irrelevant. One can imagine all sorts of intermediate configurations of amino acids that are useful for something else, but that is not science unless one has a reasonable model or an empirical estimate of the ratio of these viable configurations to those possible. We all know that to turn a bicycle into a motorcycle you need several parts to work together. One can imagine each part being added without customers noticing, but one can also imagine a point where the thing does not work at all. To change an ion channel from one that lets only sodium across a membrane to one that allows only potassium, it too needs many specific mutations before it would work at either task. It could be there are many intermediate configurations that do something entirely different, but without any actual data, it takes a lot of faith to imagine these unseen functional intermediates are all buried in our past.</p><p>This process helps understand why looking at evolution in real-time on fruit flies, and <em>E. coli</em> shows nothing that would extrapolate to novel functionality. Instead, the more common involves loss of function. For example, losing melanin is advantageous for humans in northern latitudes because it allows humans to get more vitamin D. At the same time, the risk of skin cancer is lower with less sunlight, so the benefit of melanin is less. The sort of evolution we see all over within families like cats, dogs, and bears, however, does not explain how we got cats, dogs, and bears from a common ancestor.</p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>Reidhaar-Olson and Sauer 1990 mutated the lambda-repressor in E. coli and found that only one in 10^63 sequences yield a functional repressor fold. Yockey 1977 calculated that the likelihood of generating a functional cytochrome c sequence is one in 10^65.</p></div></div><div class="footnote" id="footnote-2"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-2">2</a><div class="footnote-content"><p>Axe checked how many amino sequences would have stable functional folds and maintain beta-lactamase enzyme activity. Szostak looked for proteins that bind to ATP, the largest family of all proteins. Most ligands bind to a single protein fold (83%), while the ATP binding binds to 35 different protein folds</p></div></div><div class="footnote" id="footnote-3"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-3">3</a><div class="footnote-content"><p>The ignorance and indifference to probabilities among evolutionists are astounding. For a long time, many would just mention hundreds of millions of years and assume anything could happen. Most famously, in the Huxley-Wilberforce <a href="https://darwinday.org/educate/oxforddebate/" rel="noopener noreferrer nofollow" target="_blank">debate</a> a mere year after Darwin published Origin of Species, Huxley suggested that a bunch of monkeys could produce the 23rd Psalm given enough time. The implication is that virtually anything is possible given enough time. The probability of typing Hamlet alone is around 10^184000, excluding punctuation. 500 million years would not give us the 23rd Psalm even if every bacteria were a monkey typing every second since the beginning of the universe.</p><p>This ignorance was highlighted when a researcher suggested that completely random mutations created a new protein in bacteria that degrades nylon. This assertion came from a misunderstanding popularized by professor of biology William Thwaites in 1985, who claimed that the enzymatic activity arose from a frameshift mutation within the bacteria that created an entirely novel sequence of amino acids. Such a mutation would shift every codon over one, creating an entirely new set of amino acids, like how changing one character affects a SHA-256 hash output.</p><p>It turned out the bacteria could already digest nylon, but the substitution of just two amino acids gave it a 153-fold increase in activity by widening a linkage cleft. While neat, that’s nothing like creating, say, topoisomerase or a ribosome. What’s interesting to me is that biologists could imagine that a random sequence of 392 amino acids would be functional. Clearly, professional biologists have a very different intuition on the probability of creating a new functional protein.</p><p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-44717067450350121142022-11-01T11:33:00.004-05:002022-11-01T11:33:43.111-05:00Squeeths: a really bad idea<p> I stumbled across a <a href="https://app.livestorm.co/the-block/automated-market-makers-past-present-and-future-brought-to-you-by-bullish?type=detailed" rel="noopener noreferrer nofollow" target="_blank">webinar </a>on Automated Market Makers (AMMs) and was surprised to hear Gordan Grant from Genesis mention <a href="https://www.opyn.co/" rel="noopener noreferrer nofollow" target="_blank">squeeths </a>as a way to hedge their AMM liquidity provider (LP) positions.<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a> Genesis is a standard, KYC/AML, TradFi company and so has easy access to liquid option markets on Deribit. The only reason to buy or sell squeeths would be if you want option exposure but are constrained to the blockchain.<a class="footnote-anchor" href="#footnote-2" id="footnote-anchor-2">2</a> The reason priced-squared contracts are not traded over-the-counter on Wall Street is the same as why there is no peanut butter flavored toothpaste: no one wants it.</p><p>Squeeths are derivatives based on the price of the underlying squared. The best way to see how this product works is via <a href="https://medium.com/opyn/hedging-uniswap-v3-with-squeeth-bcaf1750ea11" rel="noopener noreferrer nofollow" target="_blank">this December 2021 post</a> by Joseph Clarke. The application here is hedging a Uniswap LP position. Below is a chart of the best-case scenario for the squeeth. Here we see the LP’s impermanent loss (IL) as a sad frowning red curve, always below zero. The squeeth is the happy yellow curve that nets the LP’s profit to the flat green line. </p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png","fullscreen":null,"imageSize":null,"height":742,"width":1200,"resizeWidth":551,"bytes":63785,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="340.70166666666665" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3429e1e-b17c-4f5e-9828-5834fa9d8dee_1200x742.png 1456w" width="551" /></picture><div></div></div></a></figure></div><p>This is also presented in the table below. I have attached a spreadsheet so you can see how these are calculated, and you can compare these formulas to the text, as Clark does a good job of explaining how to derive these values.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png","fullscreen":null,"imageSize":null,"height":348,"width":976,"resizeWidth":589,"bytes":24881,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="210.0122950819672" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F31c86bca-0289-4184-af55-2854dd2be3a9_976x348.png 1456w" width="589" /></picture><div></div></div></a></figure></div><p>Note the squeeth’s value-add to the Uniswap LP is showcased in the right column, which shows a complete immunization of the pnl variability of the naked Uniswap IL in the second column from the left (‘Uniswap pnl’). </p><p>The first problem with this application of squeeths is fundamental. If you are making markets (<em>aka </em>providing liquidity) in an option-like product, you should not hedge your book by buying or selling options. Hedging an option with an option is the tactic of a derivatives wholesaler; an options market maker delta-hedges their book. </p><p>There are profitable niches for financial product wholesalers, but they generally involve cases where customers are ignorant of market protocols and need costly education. For example, when I worked at KeyBank, a regional bank in Cleveland, we would often take FX or interest rate swap orders from local companies and immediately offload them onto a big investment bank in New York. We would charge a spread for the business, and these are the types of ‘traders’ who brag about making money every day as if they were market wizards. Goldman Sachs does not have the resources to establish relationships with these little companies, so this makes sense. </p><p>While it is a valuable job, most of these middlemen don’t even admit to themselves what they do, and who can blame them, given the common sales pitch centered around “eliminating the middleman.” While it might seem obvious to fire these expensive brokers and outsource their services to an Indian customer service team, the customers needing $10MM of Euros in two months would then realize their transaction is much simpler than it appears and shop around. The small bank would either lose the business or have to charge a lower fee. Thus, overpaid regional bank trader/brokers are an equilibrium. </p><p>Outside of that general rule, if you bought a squeeth to hedge your LP position, it would not make sense because it implies more delta hedging than if you didn’t buy a squeeth. If you are short gamma, as Uniswap LPs are, your expected cost is the same whether you hedge or not (see my earlier post on that <a href="https://efalken.substack.com/p/how-and-why-to-measure-liquidity?s=w" rel="noopener noreferrer nofollow" target="_blank">here</a>). However, you <em>should</em> hedge because it will reduce your risk, which will lower your capital requirement. Hedging your delta is a straightforward problem; once you have coded it up, it won’t cut into your time watching the latest cat videos on Tik-Tok.</p><p>The squeeth delta at inception is 10.59 in this example, while the LP’s delta is only 1.45. Thus, the amount of delta trading needed to initiate the squeeth will probably be greater than the amount of delta trading needed throughout the life of your LP position. Further, it does not reduce your required dynamic delta hedging, in that as the price moves the squeeth’s delta will change just as the LP position does, in the same direction. This is a large addition to fees. </p><p>Another issue is that the additional amount of capital needed to buy the squeeth would almost triple that needed for the Uniswap LP position alone.<a class="footnote-anchor" href="#footnote-3" id="footnote-anchor-3">3</a> If you add the capital needed for the initial short delta position, you are probably using five times more capital compared to your initial Uniswap LP position. </p><p>In the chart presented above, note the LP’s pnl excludes its fee revenue and the squeeth pnl ignores its cost. The happy curves apply to a bizarro world where one is trying to minimize a loss as opposed to maximizing a return. This violates what game theorists call the <a href="https://en.wikipedia.org/wiki/Participation_constraint_(mechanism_design)" rel="noopener noreferrer nofollow" target="_blank">participation constraint</a>: a sustainable game not only has to assume players will play their best strategy within the game, the best payoff must be greater than zero or they will not play at all. As the squeeth seller requires at least twice as much capital as the squeeth buyer, and the squeeth buyer requires multiple more capital than the LP, the fees charged by the squeeth seller will be more than that of the LP in an efficient market.<a class="footnote-anchor" href="#footnote-4" id="footnote-anchor-4">4</a> A hedged position that loses money is best avoided.</p><p>The only case where a squeeth helps would be cases of ‘jump risk,’ when markets move so quickly that you are not able to delta hedge. These extreme events are costly and rare. Just remember that low probability options, whether bets in sportsbooks, options, or lottery tickets, have the worst expected returns for buyers. These are, literally, lottery tickets, and lotteries make a lot of money for the seller, which is why governments like to monopolize them. The squeeth seller, realizing this, will charge more for the same amount of vega one sees in regular option markets. </p><p>Lastly, there’s the bizarre feature where the squeeth’s theta is recalculated every day using the updated implied volatility. They call this method of imputing a time decay a normalization factor. For standard options with explicit maturities, the theta decay shows up in the square root of time term. </p><p>In a standard option or variance swap, your initial implied volatility is the cut-off where the buyer makes money if the actual volatility is higher than the implied volatility, and the seller makes money if it is lower. In contrast, the squeeth’s method of resetting the option daily to generate theta means that after the first day, the actual volatility tells you nothing about whether the buyer or seller is making money. This makes a squeeth held longer than a day a position on gamma, but neutral on volatility. Few people have an intuition for this kind of trade, and few would desire it if they understood it.<a class="footnote-anchor" href="#footnote-5" id="footnote-anchor-5">5</a> </p><p>If you are an LP thinking about hedging your risk, stick to delta hedging. It’s easy to do, and if you do it twice a day, given the law of Large Numbers, it will hedge your position as well as an explicit option over a couple of months. Squeeths generate a several-fold increase in capital and delta hedging, not to mention the costs implicit in the bid-ask spread of illiquid options, as well as the credit and operational risk lurking in these protocols. It’s a train wreck of a product.</p><div class="footnote" id="footnote-1"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-1">1</a><div class="footnote-content"><p>Gordan Grant was humorless but still amusing, calling Centralized Exchanges ‘sexes’ (for CEX) and Centralized Limit Order Books ‘klobs’ (for CLOB). To be consistent he should have called them sexes and slobs, or kexes and klobs. </p></div></div><div class="footnote" id="footnote-2"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-2">2</a><div class="footnote-content"><p>Opyn sometimes emphasizes their product as SQUEETH, but writing that over and over makes it seem like shouting, so I’m using lower case. </p></div></div><div class="footnote" id="footnote-3"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-3">3</a><div class="footnote-content"><p>In my spreadsheet, I calculate the squeeth value (price times position) as $23,092. </p></div></div><div class="footnote" id="footnote-4"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-4">4</a><div class="footnote-content"><p>Given your average LP loses money (see <a href="https://efalken.substack.com/p/uniswap-lps-are-losing-money?s=w" rel="noopener noreferrer nofollow" target="_blank">here</a>), perhaps squeeth sellers are under similar delusions, or perhaps doubly so. I have not looked closely at their data, but a market predicated on irrationality is rarely sustainable.</p></div></div><div class="footnote" id="footnote-5"><a class="footnote-number" contenteditable="false" href="#footnote-anchor-5">5</a><div class="footnote-content"><p>The most common vega-neutral gamma-positive option position is a calendar spread: long the short-dated option and short the long-dated option.</p><p></p></div></div>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-75851257235743127092022-11-01T11:32:00.006-05:002022-11-01T11:32:58.506-05:00Uniswap LPs are Losing Money<p> It is easy to ignore the option value when providing liquidity (LP for <strong>liquidity provider</strong>) because this is second-order relative to the risk from the price of one’s assets changing. Consider an unrestricted range where one provides $500k in ETH and USD at an initial price of $2500. The initial position is represented by the black line, the pool position by the red, and the <strong>impermanent loss</strong> (IL) is the difference between the two.</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png","fullscreen":null,"imageSize":null,"height":462,"width":685,"resizeWidth":383,"bytes":31868,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="258.3153284671533" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7207197c-1484-4dd0-a2de-46357f1cf9c5_685x462.png 1456w" width="383" /></picture><div></div></div></a></figure></div><p>Another way to see this second-order distinction is by comparing that difference, the IL, with the pnl of the initial position. The orange line seems almost irrelevant. Almost.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png","fullscreen":null,"imageSize":null,"height":452,"width":727,"resizeWidth":369,"bytes":24885,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="229.41953232462174" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6f7cadd8-9a42-46cb-9453-c9bb829e3fd8_727x452.png 1456w" width="369" /></picture><div></div></div></a></figure></div><p>It turns out that the IL will cost you around 12.5% annually for a token with a 100% annualized volatility (ETH’s vol is about 90%). Many people are being fleeced because they only look at the fee income in these pools.</p><p>The current <strong>automated market maker</strong> (AMM) LP situation is reminiscent of <em>convertible bonds</em>, where the seller of the bond includes an option for the buyer. If the stock price goes up, the bondholder can exchange his bond for a share of stock. As the value of this option is positive to the buyer, this lowers the bond issuer’s yield, seemingly saving the company money via a lower interest expense. Many ignorant Treasurers reasoned, “if the price goes up a lot, my shareholders will be happy, so they won’t be mad at me for some opportunity cost via dilution. If the price goes down, the shareholders will be happy because I saved the company money by selling a worthless option. Win-win!”</p><p>For decades convertible bonds were underpriced because their option value was undervalued, driven by the ignorant reasoning above. Savvy investors like financial wizard <a href="https://en.wikipedia.org/wiki/Edward_O._Thorp" rel="noopener noreferrer nofollow" target="_blank">Ed Thorpe</a> bought these bonds, and when hedged within a hedge fund, this strategy generated consistent Sharpe ratios near 2.0 without any beta through 2004. Eventually, investment banks became good at separating the options from these convertible bonds via derivatives, which made the value of the options within these bonds more transparent. Competition via arbitrage strategies pushed convertible bond prices up to accurately reflect the value of this option, and the days of easy alpha in convertible bonds were over.</p><p>An LP offers a pair of tokens for people to buy or sell at a current price. If you provide ETH and USDC to a pool, you implicitly offer a fixed price for buy or sale at every instant. In a limit order book, it would be analogous to offering to buy or sell Tesla at $750 when the current price is $750. If you leave that offer out there for a week, clearly, you will have bought only if the price went down and sold only if the price went up. This is called ‘adverse selection,’ because your offer selects the trade that is adverse to you. </p><p>Uniswap’s AMM isn’t exactly the same because the quantities offered do not have a fixed price, but the general idea is the same. It is like selling a put and a call at a fixed price, also known as a short straddle.</p><p>A short straddle payout looks like this:</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png","fullscreen":null,"imageSize":null,"height":450,"width":616,"resizeWidth":392,"bytes":28296,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="286.3636363636364" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb190bec9-edd1-4ce4-aca1-7a5584f8a6d5_616x450.png 1456w" width="392" /></picture><div></div></div></a></figure></div><p>The payout for a short straddle is strictly negative, but the option is sold for a positive amount. In equilibrium, the price should be slightly above the average payoff to compensate the seller for taking on risk, as potentially the seller could lose a lot of money. In contrast, the option buyer can only lose precisely as much as he paid. This risky nature of the option seller’s position is reflected in its convexity. The seller is exposed to negative convexity (second derivative negative) while the buy gets positive convexity. Positive convexity is like a lottery ticket; negative convexity is like asking The Godfather to do you a favor.</p><p>The cost of selling a straddle, or any payoff with convexity, can be calculated in two ways (see my earlier post <a href="https://efalken.substack.com/p/how-and-why-to-measure-liquidity?s=w" rel="noopener noreferrer nofollow" target="_blank">here</a>). One is by looking at the expected payoff of the option and discounting it with the risk-free rate. In the above graph, you would weight the points on the straight lines (intrinsic value) using a probability distribution given the time until expiration, current price, and expected volatility. This is the intuition behind the binomial options model. Another way is by calculating the convexity of the position, called ‘gamma,’ and multiplying it by the underlying price variance. This is the Black-Scholes method. One method assumes the seller does not dynamically hedge and one assumes the seller does, but that does not affect the value of the option sold, just the risk preferences or stupidity of the seller.</p><p>In application to providing liquidity in Uniswap, a good way to see the value of the options sold is by calibrating a straddle to replicate the pool position. In the attached spreadsheet, I present an ETH-USDC pool with an initial ETH price of $2500. The position was initially valued at $1MM and using the terminology of Uniswap, it has a <em>liquidity</em>=$10k (see my <a href="https://efalken.substack.com/p/a-simpler-formula-for-impermanent?s=w" rel="noopener noreferrer nofollow" target="_blank">earlier post</a> on how the term <em>liquidity </em>is used by Uniswap).</p><p>The IL for this position looks very much like a short straddle, so it seems fruitful to find the pool’s option analog. This is called the ‘replicating portfolio’ method of valuation. If you can replicate the payoffs of asset A with portfolio B, then they should have equal value via arbitrage. Here, the LP position value is</p><p>LP position = marketValue(<em>liquidity</em>=10k, p0=$2500)+IL</p><p>We know how to replicate and value the first term; it is just a $500k position in ETH and $500k in USD. So we need to find an option position that replicates the IL.</p><p>For the LP position, first, we start with the delta. The LP’s delta will change via a linear change in the reciprocal of the square root of the price:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":325,"resizeWidth":null,"bytes":2169,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="50" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa027f153-8158-4b3b-95f1-202b90705b2f_325x50.gif 1456w" width="325" /></picture><div></div></div></a></figure></div><p>The derivative of this with respect to price is the Gamma</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7196e020-670e-41dc-bb29-7027005eec20_277x45.gif","fullscreen":null,"imageSize":null,"height":45,"width":277,"resizeWidth":null,"bytes":1888,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="51.985559566787" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7196e020-670e-41dc-bb29-7027005eec20_277x45.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>So, the gamma for a pool position is pretty straightforward.</p><p>The gamma for an option can be calculated a couple of ways, identical for a call and a put. As we are replicating a straddle, we need to multiply this by 2.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png","fullscreen":null,"imageSize":null,"height":53,"width":229,"resizeWidth":null,"bytes":3230,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="53" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8fecd2da-7cdf-4933-8f2f-79882248f30e_229x53.png 1456w" width="229" /></picture><div></div></div></a></figure></div><p>[See <a href="https://en.wikipedia.org/wiki/Greeks_(finance)#Gamma" rel="noopener noreferrer nofollow" target="_blank">here </a>for a definition of these terms. Fun fact: Jimmy Wales’s first Wikipedia post was on the Black-Scholes model. This formula applies to one option, so the notional is the price. To generate the gamma for an arbitrary notional, we multiply this result by <em>N</em>/p, the number of options needed to generate a notional amount of <em>N</em>].</p><p>Option values, and their ‘greeks’ like gamma, are determined by the current price, volatility, time to expiration, notional, and strike. Only the current price is fixed, so this gives us an infinite combination of parameters to work with, but it’s helpful to assume the volatility is the asset’s historical volatility simply. Let us use 100% for ETH to make it simple (it’s probably about 85%, but close enough). Let us also use 1-month for the expiration, in that this is the most popular option maturity. This leaves us only with the notional and the strike. We can solve for these parameters a variety of hill-climbing methods, including the solver in excel.</p><div class="file-embed-wrapper"><br /></div><p>Doing so generates the following comparison.</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png","fullscreen":null,"imageSize":null,"height":452,"width":727,"resizeWidth":397,"bytes":29431,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="246.828060522696" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc95b2ae7-e13c-478d-9c50-2cdaa4ab4db5_727x452.png 1456w" width="397" /></picture><div></div></div></a></figure></div><p>Even though I just targeted the gamma, the fit is almost perfect over the distribution of prices that span a day’s potential price movement. In this case, the straddle value is $21k, and the theta, or daily time decay, is $<strong>342</strong>.</p><p>For the option, the theta is calculated via</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/eed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif","fullscreen":null,"imageSize":null,"height":44,"width":312,"resizeWidth":null,"bytes":1991,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="45.128205128205124" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed6acb3-3e1a-44fc-bab8-24b8439e4e8a_312x44.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>An option position’s theta must equal the cost of the IL via arbitrage, as proven by Black-Scholes</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/84215328-01db-4b20-8899-bb93abed390a_309x41.gif","fullscreen":null,"imageSize":null,"height":41,"width":309,"resizeWidth":313,"bytes":1808,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="41.530744336569576" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F84215328-01db-4b20-8899-bb93abed390a_309x41.gif 1456w" width="313" /></picture><div></div></div></a></figure></div><p>So, in this case, the LP’s gamma at p=2500, and <em>liquidity</em>=10,000, is -0.04. The one-day variance is 2500^2*(100%^2)/365=$17,123, so the theta derived from the LP position is $<strong>342</strong>.</p><p>Alternatively, one can apply probabilities to the pool IL losses over a day, generating $<strong>345</strong> (off slightly due to approximation errors).</p><p>The bottom line is that this $1MM pool position bleeds $<strong>342 </strong>a day, which can be calculated in several ways. This adds up to a 12.5% loss over a year.</p><p>We can apply this to two of the most popular Uniswap pools, the ETH-USDC 0.05% pool, and the higher fee instantiation, the 0.3% pool. The <strong>revenue </strong>for LPs is just daily USD traded times the fee amount (0.05% and 0.3%). The <strong>cost </strong>is derived via the gamma (a function of <em>liquidity</em>, price, and volatility). We can pull the <em>liquidity </em>and price, and for the volatility, I pulled the 15-minute returns throughout the day (24 times 4 or 96 observations) to get the daily variance. Average daily liquidity encountered by trades, and the daily volume traded for these pools, can be pulled from places like Dune.</p><p>Uniswap data on USDC-ETH pools.</p><div class="file-embed-wrapper"><br /></div><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png","fullscreen":null,"imageSize":null,"height":287,"width":449,"resizeWidth":null,"bytes":12328,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="287" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F376ec361-9994-43a7-9aff-0e20e03bbf08_449x287.png 1456w" width="449" /></picture><div></div></div></a></figure></div><p>This table shows a persistent LP loss, with revenues around 80% of costs. This estimate is consistent with the results by <a href="https://arxiv.org/ftp/arxiv/papers/2111/2111.09192.pdf" rel="noopener noreferrer nofollow" target="_blank">TopazeBlue/Bancor</a> earlier this year (see p.25), though that paper emphasized that ‘half of the LP providers’ lost money. This assumes LPs did not hedge their positions. More importantly, this should not be a primary takeaway, as it implies that all one has to be is above average to make money as an LP. As everyone thinks they are above average, this is a reckless implication.</p><p>There is no way for an LP to make money off these pools, no trick to make negative gamma disappear. Either the fees need to increase, or the volume needs to grow. The effect of a fee increase is obvious, but for the volume, the issue is these pools need more noise traders. Noise traders are just looking for convenience as opposed to arbitrage. They offset each other because when people act randomly, some buy and some sell, not affecting the price much at any time. If these pools can get more noise traders, LPs could make profits while fees and volatility are the same.</p><p>Currently, a lot of naive LPs are giving away money to arbitrageurs.</p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-62046869146288893122022-11-01T11:31:00.003-05:002022-11-01T11:31:38.120-05:00A Simpler Formula for Impermanent Loss<p data-pm-slice="0 0 []">There are many articles on impermanent loss, and most present an explanation where a formula is alluded to in many words but never presented (see <a href="https://blog.liquid.com/impermanent-loss" rel="noopener noreferrer nofollow" target="_blank">here</a>, <a href="https://academy.binance.com/en/articles/impermanent-loss-explained" rel="noopener noreferrer nofollow" target="_blank">here</a>, <a href="https://www.finder.com/impermanent-loss" rel="noopener noreferrer nofollow" target="_blank">here</a>, and <a href="https://www.blockchain-council.org/defi/impermanent-loss/" rel="noopener noreferrer nofollow" target="_blank">here</a>). To cut to the chase, the <em>Impermanent Loss</em> for an unrestricted Uniswap liquidity pool can be calculated as</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif","fullscreen":null,"imageSize":null,"height":58,"width":161,"resizeWidth":149,"bytes":1547,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="53.67701863354037" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F17a43903-37d4-49b4-a150-159cc289ece5_161x58.gif 1456w" width="149" /></picture><div></div></div></a></figure></div><p>This is a unitless measure in that it represents the Impermanent Loss as a percent of the initial investment value, in that the graph below is identical regardless of whether your initial price is 1.0 or 100, or whether you put in $7 or $777. If you put in $100 of tokens, the formula above tells you that you would lose $2.34 if the price fell 39%, as shown in the chart below. </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png","fullscreen":null,"imageSize":null,"height":440,"width":633,"resizeWidth":331,"bytes":29878,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="230.07898894154818" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa29d12e8-e05c-4710-8d44-f8f80ddafd8f_633x440.png 1456w" width="331" /></picture><div></div></div></a></figure></div><p>I found two articles online with formulas, but they require the user to read a bunch of words to figure out how to apply them. For example, Peteris Erins <a href="https://medium.com/auditless/how-to-calculate-impermanent-loss-full-derivation-803e8b2497b7" rel="noopener noreferrer nofollow" target="_blank">presents the formula</a>:</p><p><strong>eq2</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif","fullscreen":null,"imageSize":null,"height":53,"width":109,"resizeWidth":123,"bytes":1124,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="59.80733944954128" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b85fc36-b7c4-4865-a9e8-ea0047b77e9a_109x53.gif 1456w" width="123" /></picture><div></div></div></a></figure></div><p>I find this formulation annoying because in the <a href="https://uniswap.org/whitepaper-v3.pdf" rel="noopener noreferrer nofollow" target="_blank">Uniswap v3 white paper</a> <em>k</em> is liquidity^2, while here it is the gross return, <em>pt</em>/<em>p0</em>. Further, you are assumed to know this should be multiplied by the initial token quantities at the <em>current </em>price. </p><p>Another common online formula can be found in the oft-referenced study of LP impermanent loss by <a href="https://arxiv.org/ftp/arxiv/papers/2111/2111.09192.pdf" rel="noopener noreferrer nofollow" target="_blank">TopazeBlue</a>, which presents the IL as</p><p><strong>eq3</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/87968c29-8984-45f9-976c-5a023f094f23_146x41.gif","fullscreen":null,"imageSize":null,"height":41,"width":146,"resizeWidth":152,"bytes":1193,"alt":"","title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="42.68493150684932" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F87968c29-8984-45f9-976c-5a023f094f23_146x41.gif 1456w" title="" width="152" /></picture><div></div></div></a></figure></div><p>They make it unnecessarily complicated by defining <em>xt</em> as the ‘exchange ratio normalized so that <em>x0</em>=1,’ as opposed to defining it as the gross return (i.e., <em>pt</em>/<em>p0</em>). Their number applies to the initial pool investment as mine does.</p><p>I like my formula because it makes the pnl distribution more intuitive: it’s proportional to the square of the difference in starting and ending square root of price. Further, it is obvious how the LP’s loss is symmetric and negative, analogous to a short straddle position. Plus, I don’t add new letters like <em>x</em> or <em>k</em>!<a class="footnote-anchor" href="#footnote-1" id="footnote-anchor-1">1</a></p><p>All three give identical results, however, so, use whatever works for you.</p><p></p><p>For anyone interested, it can be derived in two ways:</p><h3>Derivation 1</h3><p>Everything comes out of a couple of equations. First, the price is represented by the ratio of the tokens in the pool. For example, with 2500 USD stable coins and 1 ETH, the price would be 2500, which is just common sense.</p><p><strong>eq4</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6a067115-ccee-4311-affb-87368ba30442_110x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":110,"resizeWidth":106,"bytes":1233,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="47.21818181818182" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6a067115-ccee-4311-affb-87368ba30442_110x49.gif 1456w" width="106" /></picture><div></div></div></a></figure></div><p>Secondly, for an existing pool, a trade with ETH going in and USD going out is subject to the following rule: the product of both tokens must be maintained at its existing level, a constant we will call <em>k</em>.</p><p><strong>eq5</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif","fullscreen":null,"imageSize":null,"height":25,"width":138,"resizeWidth":146,"bytes":1074,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26.44927536231884" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9ad551c-a46d-4c58-bd64-c76a35c35cec_138x25.gif 1456w" width="146" /></picture><div></div></div></a></figure></div><p>The two above equations are the basis for calculating changes in price or tokens as a function of other variables. Any change in USD or ETH must satisfy the following equation so that the product of the two tokens remains constant: </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif","fullscreen":null,"imageSize":null,"height":29,"width":352,"resizeWidth":350,"bytes":2112,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="28.835227272727273" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf096f71-fc58-4c82-8b20-4b1a89a7f67f_352x29.gif 1456w" width="350" /></picture><div></div></div></a></figure></div><p><em>k</em> will vary for a given price as liquidity is added and removed. For example, with {USD, ETH} equal to {2500, 1}, <em>k</em>=2500, while if it were {5000, 2}, <em>k</em>=10000. We define <em>liquidity</em> as the square root of <em>k</em>, the geometric mean of the tokens in the pool. This metric is more meaningful (see below), so we will replace <em>k</em> using the definition</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif","fullscreen":null,"imageSize":null,"height":25,"width":94,"resizeWidth":110,"bytes":874,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="29.25531914893617" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F282fe8c9-7369-4c82-933b-18e7e8fb5cdd_94x25.gif 1456w" width="110" /></picture><div></div></div></a></figure></div><p>Given liquidity and price, we can derive the amount of USD in the pool. We do this by combining eq4 and eq5 to get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":245,"resizeWidth":239,"bytes":2173,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="47.8" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60b6881a-4844-453c-a9df-4e38a9607202_245x49.gif 1456w" width="239" /></picture><div></div></div></a></figure></div><p>Which simplifies to</p><p><strong>eq6</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif","fullscreen":null,"imageSize":null,"height":28,"width":178,"resizeWidth":174,"bytes":1263,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="27.370786516853933" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed6777-431f-48b5-b7d7-38c7ee442b61_178x28.gif 1456w" width="174" /></picture><div></div></div></a></figure></div><p>Similar math applied to ETH gives the equation for ETH as a function of liquidity and price:</p><p><strong>eq7</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif","fullscreen":null,"imageSize":null,"height":46,"width":129,"resizeWidth":123,"bytes":1310,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="43.86046511627907" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9cc4b285-4eca-4da7-ba05-aa6e5830c04d_129x46.gif 1456w" width="123" /></picture><div></div></div></a></figure></div><p><strong>Change in price and change in tokens</strong></p><p>Given eq6 and eq7, a change in tokens is simply the difference in the quantities computed at an initial price (<em>p0</em>) and an ending price (<em>pt</em>): </p><p><strong>eq8</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif","fullscreen":null,"imageSize":null,"height":32,"width":216,"resizeWidth":214,"bytes":1462,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="31.703703703703702" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F16f675e3-017d-4060-b0ea-702700ef0467_216x32.gif 1456w" width="214" /></picture><div></div></div></a></figure></div><p><strong>eq9</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":257,"resizeWidth":253,"bytes":1812,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="49.221789883268485" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F46fcc8f2-75e5-4fdc-a3d2-757b77b0f182_257x50.gif 1456w" width="253" /></picture><div></div></div></a></figure></div><p>Here we see that <em>liquidity</em> represents the number of dollars exchanged for every integer change in the square root of price. This is why <em>liquidity</em> is more intuitively meaningful than <em>k</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif","fullscreen":null,"imageSize":null,"height":49,"width":134,"resizeWidth":126,"bytes":1397,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="46.07462686567164" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff3d6afe5-24fb-47e2-a3b7-a6d340e9ef23_134x49.gif 1456w" width="126" /></picture><div></div></div></a></figure></div><h4>Fill price as geometric mean</h4><p>Unlike centralized limit order books, a nontrivial order will not take out a singular price listed by a limit order, but traverse a continuum of prices based on the above axioms. This makes the fill price a little trickier. The fill price (<em>pFill</em>) is defined as the ratio of the USD and tokens exchanged in the trade. </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif","fullscreen":null,"imageSize":null,"height":41,"width":102,"resizeWidth":98,"bytes":1076,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="39.3921568627451" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F948c6fa3-f2f2-4c9f-bbce-7370030f4de6_102x41.gif 1456w" width="98" /></picture><div></div></div></a></figure></div><p>Substituting with eq8 and eq9 we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif","fullscreen":null,"imageSize":null,"height":82,"width":237,"resizeWidth":229,"bytes":2549,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="79.23206751054852" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4108a75f-7c72-4581-bb1f-992667769f85_237x82.gif 1456w" width="229" /></picture><div></div></div></a></figure></div><p>This simplifies via standard algebra to the geometric mean of <em>p1 </em>and <em>p0</em>. This fill price formula allows us to get better intuition as to token amounts in ranges.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif","fullscreen":null,"imageSize":null,"height":28,"width":97,"resizeWidth":89,"bytes":931,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="25.690721649484537" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F77df6ecf-844a-4d3f-9c85-533443d1444d_97x28.gif 1456w" width="89" /></picture><div></div></div></a></figure></div><p>While the above does not work if <em>p1</em>=<em>p0 </em>(division by zero), in that case, the fill price is trivially <em>p1 </em>or <em>p0</em>.</p><p>The LP’s profit as a function of the starting and ending price of a transaction is the number of tokens bought/sold times the difference in the current (or ending) price and the fill price. </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":205,"resizeWidth":201,"bytes":1290,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="25.492682926829268" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2af9cdf5-4569-4989-a0d3-b5f083648881_205x26.gif 1456w" width="201" /></picture><div></div></div></a></figure></div><p>substituting we get</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ed380914-0ec5-4386-9269-4266c42ed776_316x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":316,"resizeWidth":312,"bytes":2183,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="49.36708860759494" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fed380914-0ec5-4386-9269-4266c42ed776_316x50.gif 1456w" width="312" /></picture><div></div></div></a></figure></div><p>simplifying we get</p><p><strong>eq11</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif","fullscreen":null,"imageSize":null,"height":61,"width":205,"resizeWidth":213,"bytes":1730,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="63.38048780487805" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbd40c15-81ff-438f-ae1b-0920483a08b5_205x61.gif 1456w" width="213" /></picture><div></div></div></a></figure></div><p>Now, here I’m using <em>p1 </em>instead of <em>pt</em>, but this applies to the cumulative change from <em>p0 </em>to <em>pt </em>as well. It’s more intuitive to think about as a single transaction, but whether one gets to <em>pt</em> via one transaction, or 27 transactions with buys and sells, the result is the same. </p><p>Note also I’m calling it the LP’s pnl, as opposed to the LP’s IL. This is because the LP is taking the other side of a trade that is pushing the price, and necessarily loses money the further the final price is pushed from the initial price. If the LP borrowed ETH to initiate his pool position, this would be his USD pnl; if he had the ETH initially, it would be an opportunity cost. In either case, it represents what is generally known as the IL.</p><p>If the price were USD/ETH, this would be denominated in USD. To turn it into a percent of the initial investment, we need to divide it by the initial investment. The USD value of the initial investment is just 2 times the value of the USD initial investment since the ETH initial investment value equals the USD initial investment. By substitution of eq6, our initial market value sent to the pool is then a function of liquidity and the initial price: </p><p><strong>eq12</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif","fullscreen":null,"imageSize":null,"height":28,"width":281,"resizeWidth":285,"bytes":1636,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="28.398576512455517" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab64096a-24f5-4286-87ab-16a4fb8081f1_281x28.gif 1456w" width="285" /></picture><div></div></div></a></figure></div><p>Dividing eq11 by eq12, we get the loss in percentage terms for the LP given a starting and ending price.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/02e58285-f954-49bc-98ff-d7457461559e_150x58.gif","fullscreen":null,"imageSize":null,"height":58,"width":150,"resizeWidth":148,"bytes":1485,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="57.22666666666667" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F02e58285-f954-49bc-98ff-d7457461559e_150x58.gif 1456w" width="148" /></picture><div></div></div></a></figure></div><h3>Derivation 2</h3><p>The IL in USD for an ETH-USD pool is the value of the current pool position compared to the initial quantities at the current price.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":318,"resizeWidth":null,"bytes":1809,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="26.163522012578618" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F825aaea5-0236-46b8-9ee5-1619793376ac_318x26.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>rearranging we get this in the change in tokens</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif","fullscreen":null,"imageSize":null,"height":26,"width":296,"resizeWidth":null,"bytes":1709,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="28.10810810810811" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccf2630-513e-456f-960e-b1588ea94325_296x26.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><p>We can substitute for the change in USDC and ETH tokens using functions of liquidity, and starting and ending price. Note we always use the square root of price, which is why this is a state variable in Uniswap pools. Using eq8 and eq9, and substituting we get:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":396,"resizeWidth":null,"bytes":2522,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="50" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F88573045-1906-4588-b2a6-8cef2ab89f8b_396x50.gif 1456w" width="396" /></picture><div></div></div></a></figure></div><p>rearranging we get </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif","fullscreen":null,"imageSize":null,"height":50,"width":249,"resizeWidth":239,"bytes":1824,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="47.99196787148595" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4336a509-1a6f-4111-903d-ddc260386e13_249x50.gif 1456w" width="239" /></picture><div></div></div></a></figure></div><p>which simplifies to</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif","fullscreen":null,"imageSize":null,"height":61,"width":188,"resizeWidth":186,"bytes":1664,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="60.351063829787236" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd469a41-22ec-4e63-be8e-c87174ee78f2_188x61.gif 1456w" width="186" /></picture><div></div></div></a></figure></div><p>This is identical to eq11 above, and so it similarly transforms into the unitless measure of IL(%).</p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0tag:blogger.com,1999:blog-7905515.post-52977639063252020462022-11-01T11:18:00.002-05:002022-11-20T13:03:35.669-06:00Convexity Implies Loss for AMMs Regardless of Hedging<p>When investors are exposed to options, the hope is that somehow the exposure can be hedged without cost. This delusion is especially pernicious because it promotes the mistaken belief that somehow, a protocol can eliminate these costs via 'volatility arbitrage' or hedging. More importantly, understanding the hedging costs allows one to evaluate better the profitability of providing liquidity to automated market-maker (AMM) pools.</p><p>The essence of an option is convexity, a payoff that is a nonlinear function of some underlying price. Convexity can be hedged, but this just shifts the payoffs around; it doesn't reduce the expected cost of this option. This cost is independent of any transaction costs involved in hedging via the bid-ask, fees, or price impact. However, hedging is popular because it decreases indirect costs. A hedged position requires less capital, and capital has an interest expense (unless you are a G-7 country selling your bonds to your central bank). Further, people do not like risk per se, and almost everyone would take the certain expense of -2 over the crappy lottery where one gets either -12 or +10.</p><p>The nice thing about option theory is that you can prove things in many different ways. This is true for most mathematically derived results, such as how there are 17 ways to prove the Pythagorean theorem. The benefit of additional proofs is that, given our minds are different, one proof might appear more intuitive than the others for quirky reasons.</p><p>My point is the following: The expected loss of an unhedged short option position is equal to that of a hedged short option position. Further, as the cost of a hedge can be estimated much more precisely using volatility than a specific return over a long time period, one should use gamma and volatility to assess liquidity provider profitability as opposed to looking at how much a liquidity provider made over the past.</p><p>It is important to clarify a semantic point on <em>expected returns</em>. Expected returns for an individual are a constant; actual returns are a constant because they refer to the past and are unchanging; expected returns are a weighted average of potential actual returns. When I say the expected loss is the same, that means their number is the same, though they can be different in their distribution. For example, equal expected returns could be from a 100% weighting on one state, of the weighted average of two very different states.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif","fullscreen":null,"imageSize":null,"height":69,"width":174,"resizeWidth":164,"bytes":1670,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":false,"internalRedirect":null}" height="65.03448275862068" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60a45343-e51e-4e77-a734-e2135ef378fb_174x69.gif 1456w" width="164" /></picture><div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><p>Consider the binomial option pricing model (<a href="https://www.semanticscholar.org/paper/Option-pricing%3A-A-simplified-approach%E2%98%86-Cox-Ross/779b32ce32d6d1c1dd8616bb721c3b1dc7cdbd10" rel="noopener noreferrer nofollow" target="_blank">Cox, Ross, Rubinstein 1979</a>). The basic idea is to create a riskless portfolio using a combination of a stock, bond, and option to a simple tree of states. This allows you to derive Black-Scholes with simple algebra, so it is the best way to teach someone about option pricing if they know nothing about it. I will not derive this model, just apply it.</p><p>Assume a call with a strike of 100 and an initial stock price of 100; it will go up or down by 10%., and the riskless rate is zero. This implies the following future state space: </p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png","fullscreen":null,"imageSize":null,"height":62,"width":354,"resizeWidth":null,"bytes":2182,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"internalRedirect":null}" height="62" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8ecd5d4b-1fe0-4618-8d67-0cb87d0460f5_354x62.png 1456w" width="354" /></picture><div></div></div></a></figure></div><p>The above parameters for calculating the probability of an up and down move ensure the expected return equals the risk-free rate, which is what we want. In practice you need to get the up and down state values correct, and use many periods, but the gist of this approach falls out of a simple one-step model.</p><p>The portfolio is riskless if you hedge this with a stock position equal to the call's delta. In the binomial model, you can calculate a call option’s hedge exactly with the simple formula</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/da433864-e54f-42f3-a5bc-9640100f1204_306x44.gif","fullscreen":null,"imageSize":null,"height":44,"width":306,"resizeWidth":null,"bytes":2477,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="46.01307189542484" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fda433864-e54f-42f3-a5bc-9640100f1204_306x44.gif 1456w" width="320" /></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/eb91506b-572e-4b35-8b61-3121db0df030_220x41.gif","fullscreen":null,"imageSize":null,"height":41,"width":220,"resizeWidth":214,"bytes":1361,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="39.88181818181818" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feb91506b-572e-4b35-8b61-3121db0df030_220x41.gif 1456w" width="214" /></picture><div></div></div></a></figure></div><p>Given a delta of 0.524, this implies the call writer hedges by shorting precisely this amount of stock. The result is to generate the same payoff, whatever happens, -4.76.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png","fullscreen":null,"imageSize":null,"height":225,"width":613,"resizeWidth":587,"bytes":15766,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="213" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F366851a4-f204-4483-a166-690bcb0d8e5e_613x225.png 1456w" width="580" /></picture><div></div></div></a></figure></div><p>Note that the expected value of the call option is just the probabilities times the final value</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif","fullscreen":null,"imageSize":null,"height":42,"width":416,"resizeWidth":438,"bytes":2971,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="44.22115384615385" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8aa80ba-b5e4-408f-81d3-ba57971d5487_416x42.gif 1456w" width="438" /></picture><div></div></div></a></figure></div><p>While the call value is the same using either the binomial model or just present valuing the call liability, note that in the latter case, the seller would experience an expected loss of 10 in one state and 0 in another. In the hedged case, it would be the probabilistic average for certain. Hedging does not change the expected loss for someone selling options; it just makes the expected loss less variable.</p><p></p><p>Another way to see why there is an unavoidable cost of convexity, consider the case of a straddle, which is the combination of a put and a call with the same strike. In this example, your initial delta is approximately zero, with the positive call delta offset by the negative put delta. However, once this straddle moves, the deltas change, implying a hedge.</p><p>Consider a straddle with a strike of 100, and it can move up 1.1 or down by 1/1.1. The price tree over two periods and the corresponding straddle intrinsic value would look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png","fullscreen":null,"imageSize":null,"height":283,"width":410,"resizeWidth":342,"bytes":9086,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="236.06341463414634" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F99709dfb-4243-4ab9-8d03-f211d1a09720_410x283.png 1456w" width="342" /></picture><div></div></div></a></figure></div><p>The above prices imply the following straddle payoffs:</p><div class="captioned-image-container"><figure><a class="image-link is-viewable-img image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png","fullscreen":null,"imageSize":null,"height":315,"width":410,"resizeWidth":338,"bytes":10393,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="259.6829268292683" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F80170621-cbb3-4f05-9d6b-d8b03027bfb3_410x315.png 1456w" width="338" /></picture><div></div></div></a></figure></div><p></p><p>Given the tree parameters, we see that the delta becomes either +1 or -1 at step time=1 so that a hedge can be applied at time 1. This would then hedge the final period payoff. Note if we add this hedge pnl to the final pnl from the straddle, we get a much more precise loss, as opposed to the more bimodal one in the unhedged case.</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png","fullscreen":null,"imageSize":null,"height":201,"width":371,"resizeWidth":null,"bytes":3435,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="201" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F645d7829-c042-4918-a748-7fc4f6a6e229_371x201.png 1456w" width="371" /></picture><div></div></div></a></figure></div><p>Here it is clear that the cost of the hedge comes from the fact that the initial delta is off once the first state is revealed, and you cannot do anything about that. This is a dynamic hedge, unlike the static hedge in the earlier example, but the result is the same in that the expected loss (-9.52) is exactly the same.</p><p>Another way to see this is by using a simple derivative. Consider the case where one hedges a derivative valued at p^2. This derivative would be a very inefficient mechanism for generating convexity, which is why active options markets use strike prices instead of 'square' prices, but it makes for a simple example.</p><p>The delta of this derivative is 2*p, so a seller of this option would hedge it by going short 2*p units. If p=10, the initial value of the squared derivative would be 100, and the seller would hedge by shorting 20 units. The net payoff space would then be as follows:</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png","fullscreen":null,"imageSize":null,"height":127,"width":602,"resizeWidth":null,"bytes":8196,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"internalRedirect":null}" height="127" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F968e42e3-c5e6-4fcf-80a9-9427f902d241_602x127.png 1456w" width="602" /></picture><div></div></div></a></figure></div><p>Note the expected loss of this squared derivative is -1, the average of +19 and -21. The hedged portfolio can make this expected loss certain, but it does not change this value.</p><p></p><p>A final way to see that hedging costs are inherent in options is via continuous-time mathematics. The Black-Scholes option formula was derived via a dynamic hedging argument. The hedge replicated the valuation of the call option, creating a riskless portfolio. In the Black-Scholes PDE below, V is the option value, S the stock price, r the risk-free interest rate, and s (sigma) the volatility.</p><p>The equation shows the option's time decay (theta) plus its convexity return (gamma) equals the riskless return from a long position in the derivative and a short position and a hedged amount (<em>dV/dS</em> shares) of the underlying.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/caa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif","fullscreen":null,"imageSize":null,"height":66,"width":364,"resizeWidth":398,"bytes":3199,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="72.16483516483517" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7f48f-9235-4ce1-9f63-76d634f46df0_364x66.gif 1456w" width="398" /></picture><div></div></div></a></figure></div><p>The solution to the partial differential equation when you add the boundary conditions (e.g., V=max(S-K,0)) is the familiar Black-Scholes model. More importantly, given we know this equals the binomial model, with its clunky steps, this proves that hedging more frequently does not change the direct hedging costs (i.e., expected loss). This dynamic replication approach assumes zero transaction costs and hedges incrementally at the slightest step imaginable. Even if you could trade your hedge at the mid-price every second, you would still generate the same expected loss as you would with a discrete set of 2 periods, or in the case where you did not hedge.</p><p>More interestingly, the cost of convexity here is put into a rate, which is called theta. If we assume the right-hand side of the above equation (the financing) is zero (because the riskless rate r is zero), we can see the relationship between theta and gamma. Theta is the expected time decay of the option price, but one can think of it as a funding rate or a fee rate.</p><div class="captioned-image-container"><figure><a class="image-link image2" href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif" target="_blank"><div class="image2-inset"><picture><source sizes="100vw" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 1456w" type="image/webp"></source><img alt="" class="sizing-normal" data-attrs="{"src":"https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif","fullscreen":null,"imageSize":null,"height":85,"width":130,"resizeWidth":126,"bytes":1942,"alt":null,"title":null,"type":"image/gif","href":null,"belowTheFold":true,"internalRedirect":null}" height="82.38461538461539" loading="lazy" sizes="100vw" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif" srcset="https://substackcdn.com/image/fetch/w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 424w, https://substackcdn.com/image/fetch/w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 848w, https://substackcdn.com/image/fetch/w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 1272w, https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3ce09263-a04f-45eb-913c-22cb165c9fb6_130x85.gif 1456w" width="126" /></picture><div></div></div></a></figure></div><p>If you know the gamma, you will know how much a fair amount of revenue would be. In the Black-Scholes model, one assumes the value of the option must be such that the hedging cost, -½*gamma, must equal the theta for an equilibrium. If theta were too high, no one would buy the option, and no one would sell it if they were too low. The nice thing here is that estimating gamma is pretty straightforward, as you just need the price and volatility.</p><p>In Uniswap liquidity pools, many liquidity providers look at the fee income as pure revenue, ignoring the value of the option they have written. This is easy to do because the option is not exactly like your standard option, but instead is this strange basket of coins. That mental block is a bigger subject than I can address here, but the bottom line is that this cost is present whether you calculate it or not, similar to how your car depreciation is costing you even if you don't think about it.</p><p>More importantly, the cost of providing liquidity is poorly measured by taking the price path over the past year and seeing if certain option sellers made or lost money. One should assume the sellers were hedging, whether they were or not. If you merely look at the price path, then a move from 100 to 200 to 100 will show LPs making a lot of money, while a price path of 100 to 200 to 300 would show LPs losing a lot of money. This method is like taking the annual return as an estimate of the stock market's volatility over that year. If you are analyzing whether or not to become an LP, this is a horrible way to do it.</p><p>People should use volatilities to estimate the hedging or gamma costs of providing liquidity in AMM pools.</p><p><br /></p><div class="file-embed-wrapper"></div><p></p>Eric Falkensteinhttp://www.blogger.com/profile/07243687157322033496noreply@blogger.com0