LyditOpen the gauge

No wrongnumber goes live

A Binance futures liquidation gauge that counts your other cross positions. An update goes live only if it reproduces Binance's own worked examples.

Same account, two answers

Binance's Example 2 is one cross wallet holding an ETH long and a BTC long. The BTC position's loss and margin eat into the shared balance, so the ETH long liquidates sooner. A tool that reads one position at a time misses it. Both numbers below are computed live by this build; the rate and maintenance amount stay at Example 2's values.

28,000.0036,000.00

Read alone, the ETH long shows 38.48 USDT more room than the account has. Open it in the gauge

1,153.26
ETH long, as Binance computes it
1,114.78
ETH long, read alone

How an update goes live

  1. First, someone proposes a change to the math.

    The change: work out each position on its own. It gets a preview, a private copy of the site with the change in it.

    The preview shows

    1,114.78USDT

    TestSprite check: failed

  2. Then TestSprite, an automated tester, tries Binance's example on the preview.

    Open Binance's ETH example. Check that the liquidation price matches the number Binance publishes.

    One number disagrees, so the check fails and the update is held back. The report names the example that failed and suggests a fix. The AI assistant writing the code never gets to see the answers.

  3. Then the fix passes, and only then does the update go live.

    The fix: count the other positions again.

    The fixed preview shows

    1,153.26USDT

    TestSprite check: passed

    The same number Binance publishes for this account. Once live, every page shows which version you are using and whether it passed.

Kept out of the code’s reach:

Example 1’s margin, ETHUSDT’s liquidation price and margin and BTCUSDT’s liquidation price and margin.

Check it yourself

WhatWhereWhat you will seeLink
Binance’s FAQbinance.comExample 2’s numbersOpen
The ETH scenariothis gaugethe same inputsOpen
The caught mistakeGitHubred, then greenOpen
The golden suiteTestSpritethe expected valuesOpen
The sourceGitHubno expected pricesOpen
This build’s checkLyditthe commit’s resultOpen

Why Lydit

Lydit works out Binance's one-way liquidation formula with exact decimal math, never rounded floating point, so every figure is right to the cent before it is shown. It counts your other cross positions: their unrealized PnL and maintenance margin feed into the formula the way Binance's own engine uses them. Every input travels in the link, so a shared link reopens the exact scenario, and every result shows its working step by step.

The answers it is checked against are Binance's own worked examples, and they are kept out of the code entirely, in an outside test suite. An update can change the formula but never the answers, so a wrong number fails the check instead of quietly passing. Every page then shows which version is serving you and whether it passed. A number that does not match never goes live.