Search public guides, tools, and curriculum pages.

Labs

Margin and liquidation simulator

Set a long or short contract, collateral and maintenance percentage. Apply mark-price changes and see exactly when equity crosses the requirement.

Fictional educational scenarios. No wallet connection, live transaction or investment recommendation.

Choose a scenario

Changing scenario starts a fresh run and clears the assessment.

Choose a scenario

A falling mark reduces equity. The mark is an entered risk input; the contract does not confer ownership of the reference asset.

Reset restores all initial balances, scenario, inputs and learning-check state. Nothing is saved or sent.

Scenario assumptions
  • One contract references one teaching unit. All values use USD; rates are percentages. Entry price, contracts and collateral are bounded user assumptions, never a trading recommendation.
  • Equity = collateral + signed contracts × (mark − entry). Maintenance = current mark notional × maintenance percentage, rounded up to a cent. Equity at or below maintenance triggers an immediate terminal liquidation.
  • No funding, liquidation fee, insurance fund, cross-margin, order book or execution slippage is modeled. A price gap can create a deficit; this experiment does not promise loss is capped at collateral.

Participants and responsibilities

Trader posts collateral; mark-price source supplies the entered mark; risk engine compares equity with maintenance; liquidation mechanism closes the scenario at the triggering mark.

Holder claim

The position is a derivative obligation, not ownership of the referenced asset. Added collateral protects only an open position and cannot revive a liquidated one.

Failure and recovery

Try the default long at USD 85, then USD 84. Compare a fresh run with an extra USD 100 before the move. Switch to short to reverse the price sensitivity.

Set the contract before opening

Initial collateral must exceed maintenance and cannot exceed entry notional. Money accepts at most two decimals; contracts are whole units. Maintenance must be above 0% and at most 50%, with at most two decimals. After opening, reset to change the contract.

Set the contract before opening

Simulation ledger

Current state:Contract ready

Reference / mark price
$100.00
Collateral
$200.00
Current mark notional
$1,000.00
Marked P&L
$0.00
Marked equity
$200.00
Maintenance required
$50.00
Gap deficit
$0.00
Entry notional / current collateral
5 ×

Latest result · Scenario update

A fresh scenario is ready. Read its assumptions, then run an action.

Run the mechanism

Actions follow the contract. You can try a blocked action to inspect why it is rejected; rejected actions preserve the ledger.

01Ready to run

Open the contract

Lock the configured contract. Only an open position can be marked, collateralized further or closed.

02Inspect rejection

Apply reference / mark price

Enter a hypothetical USD price. In the margin lab, this immediately evaluates the maintenance boundary.

03Inspect rejection

Add collateral

Add a hypothetical USD amount before liquidation. This cannot revive a terminal position.

04Inspect rejection

Close for cash

Settle the held position at the entered reference price. The simulation assumes execution and displays any resulting debt.

Check your understanding

What triggers liquidation in this stipulated model?

Choose one answer

Attempts: 0