<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by dfunk on Medium]]></title>
        <description><![CDATA[Stories by dfunk on Medium]]></description>
        <link>https://medium.com/@dfunk006?source=rss-7d535b9c646b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7SfkEYdT4-5WoksiU9gjnA.jpeg</url>
            <title>Stories by dfunk on Medium</title>
            <link>https://medium.com/@dfunk006?source=rss-7d535b9c646b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:01:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dfunk006/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Re-pegging USTC without enabling Market Module]]></title>
            <link>https://medium.com/@dfunk006/re-pegging-ustc-without-enabling-market-module-9f7b5bbfc8bf?source=rss-7d535b9c646b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f7b5bbfc8bf</guid>
            <category><![CDATA[terra-classic]]></category>
            <category><![CDATA[terra]]></category>
            <category><![CDATA[lunc]]></category>
            <category><![CDATA[ustc]]></category>
            <category><![CDATA[terra-luna]]></category>
            <dc:creator><![CDATA[dfunk]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 09:49:52 GMT</pubDate>
            <atom:updated>2025-01-08T09:49:52.582Z</atom:updated>
            <content:encoded><![CDATA[<p>Around a year ago I had proposed to <a href="https://common.xyz/terra-classic/discussion/14138-safely-reenable-the-market-module-and-incrementally-repeg-ustc-to-1">safely re-enable the market module and incrementally re-peg USTC to $1</a> by incrementally reducing the spread fee from 100% to 98% to 97% to 96% and so on.</p><p>While this idea caught traction, there was a lot of resistance to re-enable the market module given the adverse effects it had created in the past. Furthermore, testing the idea also had practical challenges as neither of the existing wallets (Terra Station and Galaxy Station) supported native swaps using the Market Module.</p><p>And so, I started thinking of other ways in which USTC could be re-pegged without enabling the Market Module.</p><p><strong>Enter: The Community Pool</strong></p><p>The idea of using the Community Pool was first suggested to me by Vinh back then. However my approach is completely different from his.</p><p>My approach involves using a DEX (like Terraswap or Terraport) to re-peg USTC and not touch any of the L1 code.</p><p>But before I jump into my approach, a little about how the Market Module works…</p><p><strong>The Market Module</strong></p><p>The Market Module uses a virtual liquidity pool denominated in SDR. This virtual liquidity pool is maintained by 2 parameters — the base_pool and the pool_recovery_period.</p><p>The first base_pool parameter defines the total liquidity in the virtual pool, while the second pool_recovery_period parameter defines how often the liquidity in the virtual pool is replenished.</p><p>The liquidity in this virtual pool is provided by minting LUNC, thereby diluting LUNC holders.</p><p><strong><em>The important thing to understand here is that the Market Module works exactly like a pool on a DEX, with the exception that all LUNC holders are voluntary or involuntary Liquidity Providers (LPs) of the virtual pool.</em></strong></p><p>My approach is to simply use a LUNC-USTC pool on a DEX instead of the Market Module and use the Community Pool as the LP instead of diluting LUNC holders.</p><p><strong>How would this work?</strong></p><p>To illustrate the re-peg mechanism, I am going to use the LUNC-UST pool on Terraswap (however, the LUNC-USTC pool on Terraport could also achieve the same effect).</p><p>The current <a href="https://finder.station.money/classic/address/terra1l7vy20x940je7lskm6x9s839vjsmekz9k9mv7g">LUNC-UST contract on Terraswap</a> (as of this writing), comprises the following:</p><p>LUNC: 388,852,724<br>USTC: 2,212,945</p><p>This results in 1 USTC = 176 LUNC</p><p>1 LUNC = $0.0001068 (as of this writing).</p><p>Therefore, 1 USTC = $0.019</p><p><em>Note: Values are rounded-off for convenience.</em></p><p>Now, let’s say we want to peg USTC to $0.03 — we’d need to ensure the LUNC-UST contract on Terraswap is as follows:</p><p>LUNC: 621,613,764<br>USTC: 2,212,945</p><p>This would result in 1 USTC = 281 LUNC, and therefore 1 USTC = $0.03</p><p>In order to achieve this, we’d have to transfer 621,613,764–388,852,724 = <strong>232,761,040 LUNC </strong>from the CP to the LUNC-UST contract address (<em>terra1l7vy20x940je7lskm6x9s839vjsmekz9k9mv7g</em><strong>) </strong>on Terraswap.</p><p>This would effectively peg USTC at $0.03, which can be incrementally increased to $0.04, $0.05, etc depending on the availability of funds in the CP.</p><p><strong>Will the peg hold?</strong></p><p>The peg is unlikely to hold as traders will capitalise on the arbitrage opportunity to make some profit. However, the net effect on USTC price should mostly be positive.</p><p>There is currently 296,228,687 USTC in the <a href="https://terraclassic.stakebin.io/terra/oraclepool">Oracle Pool</a> which is distributed to validators and stakers. Even a slight increase in USTC value will result in higher earnings for all validators and stakers in terms of dollar value.</p><p>Besides, the increase in on-chain trading activity will cause more LUNC burns — adding back to the Oracle Pool and Community Pool, thereby growing both.</p><p><strong>Ok, sounds great! What are next steps?</strong></p><p>The next step would be to create a Community Pool Spend proposal to transfer <strong>232,761,040 LUNC </strong>(actual amount may vary due to price fluctuations) to LUNC-UST contract on Terraswap: <strong>terra1l7vy20x940je7lskm6x9s839vjsmekz9k9mv7g </strong>in order to peg USTC to $0.03.</p><p>Feedback and suggestions are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f7b5bbfc8bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to reduce USTC debt via a Reverse Dutch Auction (RDA)]]></title>
            <link>https://medium.com/@dfunk006/how-to-reduce-ustc-debt-via-a-reverse-dutch-auction-rda-969ffd4409d5?source=rss-7d535b9c646b------2</link>
            <guid isPermaLink="false">https://medium.com/p/969ffd4409d5</guid>
            <category><![CDATA[terra]]></category>
            <category><![CDATA[terra-luna]]></category>
            <category><![CDATA[terrausd]]></category>
            <category><![CDATA[ustc]]></category>
            <category><![CDATA[terra-classic]]></category>
            <dc:creator><![CDATA[dfunk]]></dc:creator>
            <pubDate>Sun, 01 Oct 2023 12:13:45 GMT</pubDate>
            <atom:updated>2023-10-01T12:13:45.616Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By setting min spread fee to 98%</em></p><p><strong>What is a Reverse Dutch Auction?</strong></p><p>A reverse auction (also known as a dutch auction) is a type of auction in which the traditional roles of buyer and seller are reversed. Thus, there is one buyer and many potential sellers. In an ordinary auction also known as a forward auction, buyers compete to obtain goods or services by offering increasingly higher prices. In contrast, in a reverse auction, the sellers compete to obtain business from the buyer and prices will typically decrease as the sellers underbid each other.</p><p>In the case of USTC, there are more potential sellers than there are potential buyers, thereby a strong case for an RDA can be made to reduce the USTC debt.</p><p><strong>How to implement an RDA on Terra Classic?</strong></p><p>Currently, market swaps between LUNC&lt;&gt;USTC are disabled by setting the spread fee to 100%. Under normal conditions this spread fee was set at 0.5%. That means 1 USTC could be redeemed for $1 worth of LUNC. However, the user would get only $0.995 worth of LUNC, while $0.005 would go the Oracle Pool to reward validators and delegates for correctly voting on the Oracle price feed.</p><p>Given the current scenario, setting the spread fee back to 0.5% would result in minting of LUNC and flooding the market with LUNC supply.</p><p><strong>However, instead of reverting the spread fee to 0.5%, what if we kept the spread fee to 98%?</strong> This is what would happen:</p><p>When a user swaps 1 USTC for $1 worth of LUNC, the user will get only 2% or $0.02 (2 cents) worth of LUNC, thus effectively pegging USTC at 2 cents. 98% or $0.98 worth of LUNC would go the Oracle Pool to be distributed to delegators over a 2 year window (or as specified by the <em>RewardDistributionWindow</em> parameter).</p><p>Thus while LUNC will be minted, the freshly minted LUNC would not cause an oversupply in the market on an immediate basis but would rather be distributed over a 2 year window. This parameter of the distribution window (<em>RewardDistributionWindow) </em>can be easily changed by a governance vote.</p><p><strong>What are the pros and cons to this approach?</strong></p><p>The benefit of this approach is that 1 USTC is being burnt for $0.02 worth of LUNC. In theory, all 9.79B of USTC could be burnt for just $195M (<em>though highly unlikely</em>).</p><p>The disadvantage to this approach is the minting of LUNC, however, like mentioned earlier, this minted LUNC would go to the Oracle Pool instead of exchanges, thereby increasing staking APRs/APYs, and would likely cause more people to buy LUNC from exchanges and then delegate to receive the rewards. The delegation yields can also be adjusted by adjusting the Oracle rewards distribution window parameter (<em>RewardDistributionWindow) </em>via a governance vote to control the supply in the market.</p><p><strong>Alternatively, the minted LUNC in the oracle pool can be burnt altogether to reduce the LUNC supply should the community decide to do so.</strong> Given that this would potentially move the coins from exchanges to the chain, the community would have more flexibility and control and can decide what to do with the excess supply (which at this point it can’t since majority of the supply is with exchanges).</p><p>Suggestions and feedback are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=969ffd4409d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terra Classic — A Way Forward for the LUNAC/UST economy]]></title>
            <link>https://medium.com/@dfunk006/terra-classic-a-way-forward-for-the-lunac-ust-economy-7d80957377e?source=rss-7d535b9c646b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d80957377e</guid>
            <category><![CDATA[lido-finance]]></category>
            <category><![CDATA[anchor-protocol]]></category>
            <category><![CDATA[terra-luna]]></category>
            <category><![CDATA[luna]]></category>
            <category><![CDATA[terra]]></category>
            <dc:creator><![CDATA[dfunk]]></dc:creator>
            <pubDate>Wed, 25 May 2022 11:47:43 GMT</pubDate>
            <atom:updated>2022-07-03T19:31:49.968Z</atom:updated>
            <content:encoded><![CDATA[<h3>Terra Classic — A Way Forward for the LUNAC/UST economy</h3><p><em>Please note: For the purpose of this article I will solely focus on the systemic reforms and the fundamental issue that caused the LUNA/UST crash — lack of liquidity. Whether the dried up liquidity was a result of macroeconomics, a co-ordinated attack, or malicious actors, remains out of the scope of this article.</em></p><p><strong>Context:</strong></p><ol><li>UST/LUNA are not failed coins. The system worked as designed. The lack of liquidity is what caused the death spiral.</li><li>The system never guaranteed that there wouldn’t be de-pegging, but what it rather ensured was that the de-pegging would be countered if and when it were to happen.</li><li>In the event of a de-pegging in either direction, the system was supposed to create arbitrage opportunities that traders could exploit to help re-peg UST.</li><li>If the arbitrage failed, LUNA would be either minted or burnt to increase or decrease the amounts of UST in circulation, thereby re-pegging UST.</li><li>This way the system ensured that it would always be possible to redeem 1 UST for 1 USD worth of Luna.</li></ol><p><strong>When the de-pegging happened on 9th May, 2 things went wrong:</strong></p><ol><li>Due to the extremely high spread and lack of liquidity in the market, traders were unable to exploit the arbitrage opportunity that was presented.</li><li>Having failed its first line of defence, the system resorted to diluting Luna holders by minting Luna to decrease the UST in circulation.</li></ol><p>Luna’s hyperinflation and the subsequent minting of 6.9T Luna tokens, caused CEXs like Binance to halt Luna trading, as they did not want unsuspecting buyers of Luna to provide exit liquidity to UST holders.</p><p>Consequently, on-chain swaps were switched off to prevent further dilution of Luna holders. Trading on CEXs like Binance resumed as a result of this. The price of LUNA/UST somewhat stabilised after this.</p><p><strong>Two lessons to be learnt here:</strong></p><ol><li>Arbitrage will fail when the spreads are too high and the liquidity is too low. Since liquidity cannot be controlled, the system should be modified to ensure that the spreads never become too high.</li><li>Unlimited dilution of Luna to provide exit liquidity to UST holders is not an option. Luna holders need to stay solvent, otherwise the system fails.</li></ol><p><strong>How do we solve for this?</strong></p><p>Like I had mentioned earlier, the system worked as designed — the lack of liquidity is what caused the failure. The solution to this, therefore, is better management of times when liquidity dries up from the system.</p><p>We already know that turning off on-chain swaps somewhat stabilised the price of LUNA/UST.</p><p><strong>So, this is what I propose:</strong></p><ol><li>Whenever the market cap of Lunac falls below the circulating supply of UST, disable on-chain swaps.</li><li>Whenever the market cap of Lunac goes above the circulating supply of UST, re-enable on-chain swaps.</li></ol><p><strong>Why this works:</strong></p><ol><li>The disabling of on-chain swaps will ensure that the spread never gets too high and Lunac holders don’t get infinitely diluted.</li><li>In the event on-chain swaps are disabled, the system will create opportunities that traders could exploit by buying Lunac at a discounted price. This in turn will put upward pressure on Lunac price and market cap.</li><li>If traders are unable to buy Lunac at a discount, a burning program can be used as a second line of defence to decrease the supply of Lunac. This would cause a deflationary action which in turn will increase demand for Lunac, pushing its market cap higher. (We have already witnessed this dynamic play out in several coins like BNB, and even in Luna — when UST was minted, LUNA was burnt which caused Luna’s market cap to grow).</li><li>Once the market cap of Lunac goes above the circulating supply of UST, re-enabling of on-chain swaps will decrease the supply of UST in circulation, causing it to re-peg.</li></ol><p>Like I mentioned before, the system never guaranteed a UST de-peg, but rather ensured means of re-pegging it. Thus the system was never flawed. The death spiral caused due to liquidity drying up can be fixed by the solution proposed above.</p><p><strong>UST will always re-peg as long as Luna remains solvent. That’s how the system is designed.</strong></p><p>Please mention your feedback &amp; constructive criticism in the comments below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d80957377e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>