You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/concepts/architecture/oegs.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,4 +87,4 @@ DOS does not (i) provide, operate, or make available the Service, (ii) exercise
87
87
Without limiting the generality of the foregoing, under no circumstances shall DOS be held liable or responsible to any person or entity for any claim, demand, cause of action, damages, losses, liabilities, costs, or expenses of any kind, whether direct, indirect, incidental, punitive, special, consequential, exemplary, or otherwise, arising out of or in connection with: (a) access to, reliance upon, use of, or inability to use the Service; (b) any information or content made available through the Service; or (c) any activities, transactions, or conduct undertaken via the Service.
88
88
89
89
Access to and use of the Service is undertaken solely at the risk of the user and is subject exclusively to the terms, conditions, policies, and practices established and maintained by Imperator, all of which are independent of, and not reviewed, approved, or enforced by, DOS.
Copy file name to clipboardExpand all lines: docs/pages/concepts/onboarding-faqs/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,4 +356,4 @@
356
356
357
357
- Liquidity provider rewards in v4 are not controlled by dYdX. dYdX recommends that liquidity provider rewards should cease to exist in v4. Makers could be rewarded with a maker rebate ranging from 0.5bps to 1.1bps, based on their nominal volume and volume share. The full proposed fee schedule can be found [here](/concepts/trading/rewards).
Copy file name to clipboardExpand all lines: docs/pages/concepts/trading/governance.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,4 +155,4 @@ The Community Treasury is an account controlled by governance and can be funded
155
155
156
156
## CosmosSDK Default Modules
157
157
158
-
For more information on default modules, head to the [Cosmos SDK official documentation](https://docs.cosmos.network/v0.47/modules). dYdX Chain inherits the same governance properties of any standard CosmosSDK modules that are present on dYdX Chain,
158
+
For more information on default modules, head to the [Cosmos SDK official documentation](https://docs.cosmos.network/v0.47/modules). dYdX Chain inherits the same governance properties of any standard CosmosSDK modules that are present on dYdX Chain.
For example up to 20 open stateful orders across all markets for a subaccount with a net collateral of $2,000.
52
52
53
53
Note:
54
+
54
55
- Short term orders, including limit `Immediate-or-Cancel`, `Fill-or-Kill`, and market orders on the frontend do not have this limitation.
55
-
- Only the `stateful_order_equity_tiers` field is in effect -- short term order equity limits under the `short_term_order_equity_tiers` key are no longer in effect.
56
+
- Only the `stateful_order_equity_tiers` field is in effect -- short term order equity limits under the `short_term_order_equity_tiers` key are no longer in effect.
Copy file name to clipboardExpand all lines: docs/pages/concepts/trading/limits/withdrawal-limits.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,4 +14,4 @@ These rate limit parameters can be updated by governance.
14
14
15
15
All subaccount transfers and withdrawals will be gated for 50 blocks if a negative collateralized subaccount is seen in state and/or can't be liquidated or deleveraged
16
16
17
-
All subaccount transfers and withdrawals will also be gated for 50 blocks if a 5+ minute chain outage occurs.
17
+
All subaccount transfers and withdrawals will also be gated for 50 blocks if a 5+ minute chain outage occurs.
Copy file name to clipboardExpand all lines: docs/pages/concepts/trading/liquidations.mdx
+56-49Lines changed: 56 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,63 +3,70 @@
3
3
As part of the default settings of the v4 open source software (”dYdX Chain”), accounts whose total value falls below their maintenance margin requirement may have their positions automatically closed by the liquidation engine. Positions are closed via protocol-generated liquidation matches where a protocol-generated liquidation order uses a calculated “Fillable Price” as the limit price to match against liquidity resting on the order book.
4
4
Profits or losses from liquidations are taken on by the insurance fund.
5
5
A liquidated subaccount may have its position partially or fully closed. v4 open source software includes a liquidations configuration which — as determined by the applicable Governance Community — will determine how much of the position is liquidated.
6
-
6
+
7
7
## Liquidation Penalty
8
8
9
9
As part of the default settings of the v4 open source software, when an account is liquidated, up to the entire remaining value of the account may be taken as penalty and transferred to an insurance fund.
10
-
10
+
11
11
The liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the Maximum Liquidation Penalty of 1.5%. The 1.5% fee contemplated in the default v4 software will be subject to adjustments by the applicable Governance Community.
12
-
13
-
12
+
14
13
## Isolated Liquidation Price
15
14
16
15
This is the price at which a specific position reaches the point of liquidation.
17
-
1.__Formula Explanation:__
18
-
- The liquidation price `p'` is calculated using:
19
-
```
20
-
p' = (e - s * p) / (|s| * MMF - s)
21
-
```
22
-
- Here:
23
-
-`e` is the current equity in the account.
24
-
-`s` is the size of the position.
25
-
-`p` is the original price of the position.
26
-
-`MMF` is the maintenance margin fraction, a percentage that indicates the minimum equity required to keep the position open.
27
-
28
-
2.__Example:__
29
-
- Suppose a trader deposits $1,000 (`e = 1000`).
30
-
- The trader shorts 3 ETH contracts (`s = -3`) at $3,000 per contract, with a maintenance margin fraction of 5% (`MMF = 0.05`).
31
-
- The formula becomes: `p' = (1000 - (-3 * 3000)) / (3 * 0.05 - (-3))`
32
-
- This simplifies to: `p' = (1000 + 9000) / (0.15 + 3) = 10000 / 3.15 ≈ 3174.60`
33
-
- This means if the price of ETH rises to $3,174.60, the position will reach the liquidation threshold.
34
-
- At this price, the trader's remaining equity would be 5% of the notional value of the position or $476.2 based on the calculation `(3 * 3174.6 * 0.05 ≈ 476.2)`.
35
-
16
+
17
+
1.**Formula Explanation:**
18
+
19
+
- The liquidation price `p'` is calculated using:
20
+
21
+
```
22
+
p' = (e - s * p) / (|s| * MMF - s)
23
+
```
24
+
25
+
- Here:
26
+
-`e` is the current equity in the account.
27
+
-`s` is the size of the position.
28
+
-`p` is the original price of the position.
29
+
-`MMF` is the maintenance margin fraction, a percentage that indicates the minimum equity required to keep the position open.
30
+
31
+
2.**Example:**
32
+
33
+
- Suppose a trader deposits $1,000 (`e = 1000`).
34
+
- The trader shorts 3 ETH contracts (`s = -3`) at $3,000 per contract, with a maintenance margin fraction of 5% (`MMF = 0.05`).
35
+
- The formula becomes: `p' = (1000 - (-3 * 3000)) / (3 * 0.05 - (-3))`
36
+
- This simplifies to: `p' = (1000 + 9000) / (0.15 + 3) = 10000 / 3.15 ≈ 3174.60`
37
+
- This means if the price of ETH rises to $3,174.60, the position will reach the liquidation threshold.
38
+
- At this price, the trader's remaining equity would be 5% of the notional value of the position or $476.2 based on the calculation `(3 * 3174.6 * 0.05 ≈ 476.2)`.
39
+
36
40
## Cross Liquidation Price
37
41
38
42
For cross-margining (multiple positions sharing the same margin), the calculation is adjusted to account for the margin used by other positions.
39
43
40
-
1.__Key Terms:__
41
-
-__Total Maintenance Margin Requirement (`MMR_t`):__ Calculate the maintenance margin needed for all positions at current prices: `MMR_t = |s| · p · MMF`
42
-
-__Other Positions' Margin Requirement (`MMR_o`)__: Subtract the margin requirement of the position in question from MMR_t: `MMR_o = MMR_t - |s| * p * MMF`
43
-
-__New Margin Requirement at Price `p'`__: Add `MMR_o` to the margin requirement of the position at the new price: `MMR_o + |s| * p' * MMF`
44
-
-__Liquidation Price Formula__: Substitute into the equation to find the liquidation price for the position: `p' = (e - s * p - MMR_o) / (|s| * MMF - s)`
45
-
46
-
2.__Example:__
47
-
- Suppose a trader deposits $1,000 (`e = 1000`).
48
-
- The trader shorts 1.5 ETH (`s = -1.5`) at $3,000 and buys 1,000 STRK contracts at $1.75 (`MMF = 10%` for STRK).
- This simplifies to: `p' = (1000 + 4500 - 175) / 1.575 ≈ 3380.95`.
52
-
- If the ETH price reaches $3,380.95, the equity would fall to the required margin level.
53
-
44
+
1.**Key Terms:**
45
+
46
+
-**Total Maintenance Margin Requirement (`MMR_t`):** Calculate the maintenance margin needed for all positions at current prices: `MMR_t = |s| · p · MMF`
47
+
-**Other Positions' Margin Requirement (`MMR_o`)**: Subtract the margin requirement of the position in question from MMR_t: `MMR_o = MMR_t - |s| * p * MMF`
48
+
-**New Margin Requirement at Price `p'`**: Add `MMR_o` to the margin requirement of the position at the new price: `MMR_o + |s| * p' * MMF`
49
+
-**Liquidation Price Formula**: Substitute into the equation to find the liquidation price for the position: `p' = (e - s * p - MMR_o) / (|s| * MMF - s)`
50
+
51
+
2.**Example:**
52
+
53
+
- Suppose a trader deposits $1,000 (`e = 1000`).
54
+
- The trader shorts 1.5 ETH (`s = -1.5`) at $3,000 and buys 1,000 STRK contracts at $1.75 (`MMF = 10%` for STRK).
- This simplifies to: `p' = (1000 + 4500 - 175) / 1.575 ≈ 3380.95`.
58
+
- If the ETH price reaches $3,380.95, the equity would fall to the required margin level.
59
+
54
60
## “Fillable Price” for Liquidations
55
61
56
62
As part of the default settings of dYdX Chain, the “fillable price” (or the limit price of a liquidation order) for a position being liquidated is calculated as follows. For both short and long position:
57
-
63
+
58
64
```
59
65
Fillable Price (Short or Long) = P x (1 - ((SMMR x MMF) x (BA x (1 - Q)))
@@ -68,28 +75,28 @@ Where (provided as genesis parameters):
68
75
-`A` = `Config.FillablePriceConfig.BankruptcyAdjustmentPpm`. Is ≥ 1.
69
76
-`Q = V / TMMR` where `V` is the total account value, and `TMMR` is the total maintenance margin requirement
70
77
71
-
On the other hand, the “Close Price” will be the sub-ticks of whatever maker order(s) the liquidation order matches against.
72
-
78
+
On the other hand, the “Close Price” will be the sub-ticks of whatever maker order(s) the liquidation order matches against.
79
+
73
80
For more information on Margin fractions and calculations, see [Margin](/concepts/trading/margin).
74
-
81
+
75
82
## FAQ
76
83
77
84
> What price is used to determine liquidations?
78
85
79
86
As part of the default settings, Oracle Price is used to estimate the value of an account’s positions. If the account’s value falls below the account’s maintenance margin requirement, the account is liquidatable.
80
-
87
+
81
88
> Who receives the liquidation fees?
82
89
83
90
The insurance fund would receive liquidation fees / penalty. Please note that the applicable Governance Community needs to initially fund the insurance fund from the applicable community treasury.
84
-
91
+
85
92
> How liquidation engine works?
86
93
87
94
Our liquidation engine automatically closes positions that fall below the maintenance margin.
88
-
95
+
89
96
> Does dYdX apply a penalty in the event of liquidation?
90
97
91
-
Yes. The liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the Maximum Liquidation Penalty of 1.5%. The 1.5% fee contemplated in the default v4 software will be subject to adjustments by the applicable Governance Community.
92
-
93
-
> How to avoid liquidation?
98
+
Yes. The liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the Maximum Liquidation Penalty of 1.5%. The 1.5% fee contemplated in the default v4 software will be subject to adjustments by the applicable Governance Community.
99
+
100
+
> How to avoid liquidation?
94
101
95
-
In order to avoid liquidation, you can deposit more assets to your account, as while opening a position the key point is to have enough assets to cover the maintenance margin requirements. You can also close the part of the position and the liquidation price will change.
102
+
In order to avoid liquidation, you can deposit more assets to your account, as while opening a position the key point is to have enough assets to cover the maintenance margin requirements. You can also close the part of the position and the liquidation price will change.
0 commit comments