<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: LONG DOGE</title>
    <description>The latest articles on DEV Community by LONG DOGE (@longdoge).</description>
    <link>https://dev.to/longdoge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4166888%2Fbf89653b-4416-473e-be2e-91d0713370c4.jpeg</url>
      <title>DEV Community: LONG DOGE</title>
      <link>https://dev.to/longdoge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/longdoge"/>
    <language>en</language>
    <item>
      <title>How to estimate the liquidation price of a leveraged DOGE long (with the math I use)</title>
      <dc:creator>LONG DOGE</dc:creator>
      <pubDate>Tue, 06 Oct 2026 16:14:41 +0000</pubDate>
      <link>https://dev.to/longdoge/how-to-estimate-the-liquidation-price-of-a-leveraged-doge-long-with-the-math-i-use-2ble</link>
      <guid>https://dev.to/longdoge/how-to-estimate-the-liquidation-price-of-a-leveraged-doge-long-with-the-math-i-use-2ble</guid>
      <description>&lt;p&gt;I built a small mobile front end for Hyperliquid that only opens DOGE longs. The feature people ask about most is the liquidation estimate it shows before an order. Here is the math, so you can check it yourself and poke holes in it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The formula
&lt;/h3&gt;

&lt;p&gt;Hyperliquid's docs describe liquidation for a position in terms of its maintenance margin. For a long:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;maintenance rate m = 1 / (2 * maxLeverage)
liq price = entry * (1 - (1/L - m) / (1 - m))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;where L is the leverage you use on the position. This is an estimate for a single isolated long with no funding or fees applied. The exchange's own number is the one that counts once you hold the position.&lt;/p&gt;

&lt;p&gt;DOGE's max leverage on Hyperliquid is 10x (from the public meta endpoint), so m = 0.05.&lt;/p&gt;

&lt;h3&gt;
  
  
  In code
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function liqPrice(entry, lev, maxLev = 10) {
  const m = 1 / (2 * maxLev);
  return entry * (1 - (1 / lev - m) / (1 - m));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Worked numbers (DOGE max leverage 10x, so m = 0.05)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Entry&lt;/th&gt;
&lt;th&gt;Leverage&lt;/th&gt;
&lt;th&gt;Price drop to liquidation&lt;/th&gt;
&lt;th&gt;Estimated liq price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$0.060&lt;/td&gt;
&lt;td&gt;5x&lt;/td&gt;
&lt;td&gt;15.79%&lt;/td&gt;
&lt;td&gt;$0.0505&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$0.065&lt;/td&gt;
&lt;td&gt;4x&lt;/td&gt;
&lt;td&gt;21.05%&lt;/td&gt;
&lt;td&gt;$0.0513&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$0.075&lt;/td&gt;
&lt;td&gt;3x&lt;/td&gt;
&lt;td&gt;29.82%&lt;/td&gt;
&lt;td&gt;$0.0526&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$0.075&lt;/td&gt;
&lt;td&gt;2x&lt;/td&gt;
&lt;td&gt;47.37%&lt;/td&gt;
&lt;td&gt;$0.0395&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$0.095&lt;/td&gt;
&lt;td&gt;2x&lt;/td&gt;
&lt;td&gt;47.37%&lt;/td&gt;
&lt;td&gt;$0.0500&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note that the drop percentage depends only on leverage. That is why the same liquidation price needs lower leverage as the entry price goes up.&lt;/p&gt;
&lt;h3&gt;
  
  
  Exposure and the 1% move
&lt;/h3&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exposure = balance * leverage
effect of a 1% move = exposure * 0.01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With $20 at 5x, exposure is $100 and a 1% move is about $1, which is 5% of your balance. That is why the calculator shows it next to the liquidation price.&lt;/p&gt;

&lt;h3&gt;
  
  
  What this does not cover
&lt;/h3&gt;

&lt;p&gt;Funding payments, fees, slippage, cross margin, and the exchange's margin tiers for large sizes all change the real number. Treat the estimate as a sanity check, not a guarantee.&lt;/p&gt;

&lt;h3&gt;
  
  
  Risk
&lt;/h3&gt;

&lt;p&gt;Leveraged trading uses real money and can lose your whole margin. This is not financial advice. Whether you are allowed to trade on Hyperliquid depends on where you live.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;p&gt;The calculator is part of LONG DOGE, a front end I built (disclosure: I am the author): &lt;a href="https://getrichfaster.vercel.app" rel="noopener noreferrer"&gt;https://getrichfaster.vercel.app&lt;/a&gt;. It is not an exchange and does not hold funds. I would like feedback on whether the estimate and the wording are clear.&lt;/p&gt;

&lt;p&gt;Verification: formula and &lt;code&gt;maxLeverage: 10&lt;/code&gt; checked against the site's own code and &lt;a href="https://api.hyperliquid.xyz/info" rel="noopener noreferrer"&gt;https://api.hyperliquid.xyz/info&lt;/a&gt; (type=meta); table numbers computed, not rounded by hand.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>crypto</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
