Skip to content

Commit

Permalink
Update sip-390.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleb-keny committed Jun 5, 2024
1 parent 9419b06 commit edd8710
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/sips/sip-390.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ This sip proposes to incorporate into the minimum credit calculation the amount
<!--A short (~200 word) description of the proposed change, the abstract should clearly describe the proposed change. This is what *will* be done if the SIP is implemented, not *why* it should be done or *how* it will be done. If the SIP proposes deploying a new contract, write, "we propose to deploy a new contract that will do x".-->

Some concepts covering this SIP:
- Credit Capacity represents the total amount of USD that the market could withdraw if it were to immediately unwrap all its positions.
- locked credit represents the minimum amount of delegated collateral that needs to be available to allows traders to withdraw their deposited margin and profits.
- Credit capacity represents the total amount of USD that the market could withdraw if it were to immediately unwrap all its positions.
- Locked credit represents the minimum amount of delegated collateral that needs to be available to allows traders to withdraw their deposited margin and profits.

The validation done in the [core of the system](https://github.com/Synthetixio/synthetix-v3/blob/cace699d1fb070042ca09a390c95548c31a5d025/protocol/synthetix/contracts/storage/Market.sol#L277) uses these concepts whereby `creditCapacityD18` is calculated by summing up the value of the delegated collateral of LP's **but also includes traders margin**. However, `lockedCredit` does not include the latter margin, resulting in the validation not covering the edge case where LP's are able to withdraw collateral that restricts traders from withdrawing their margin.
The validation done in the [core of the system](https://github.com/Synthetixio/synthetix-v3/blob/cace699d1fb070042ca09a390c95548c31a5d025/protocol/synthetix/contracts/storage/Market.sol#L277) uses these concepts whereby `creditCapacityD18` is calculated by summing up the value of the delegated collateral of LP's **but also includes traders margin**. However, `lockedCredit` does not include the latter margin, resulting in the validation not covering the edge case where markets are not covered by enough collateral to cover traders' margin.
Currently, minimum credit is calculated by iterating on over active markets, getting the active open interest and multiplying that by a `lockedOiRatio`, this gives insight information on the expected credit that needs to be catered for by LP's.

## Motivation

<!--This is the problem statement. This is the *why* of the SIP. It should clearly explain *why* the current state of the protocol is inadequate. It is critical that you explain *why* the change is needed, if the SIP proposes changing how something is calculated, you must address *why* the current calculation is inaccurate or wrong. This is not the place to describe how the SIP will address the issue!-->

The minimum credit calculation update ensures that markets are sufficiently covered by liquidity from LP's before allowing withdrawals / undelegation from a given market. This provides confidence to traders that markets are solvent and assurances on over-collateralization of a market.
The minimum credit calculation update ensures that markets are sufficiently covered by liquidity from LP's before allowing withdrawals / undelegation from a given market. This provides confidence to traders that markets are solvent and assurances on it's collateralization.

## Rationale

Expand Down

0 comments on commit edd8710

Please sign in to comment.