Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: readme parameter restriction #82

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ The two main use-cases are:
1. Using normal fixed parameters when `preLIF1 = preLIF2` and `preLCF1 = preLCF2`.
2. Using health dependent liquidation when either `preLIF1 < preLIF2` or `preLCF1 < preLCF2`, similar to a Quasi Dutch Auction (as in [Euler liquidations](https://docs-v1.euler.finance/getting-started/white-paper#liquidations)).


### Pre-liquidation parameters restrictions

The PreLiquidation smart-contract enforces the following properties:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "following" as the properties are listed in the same sentence. Should you list them separately (e.g. by labeling with them names or ids out of a sentence) then using following would apply as the sentence is not self contained.

Suggested change
The PreLiquidation smart-contract enforces the following properties:
The PreLiquidation smart-contract enforces the properties:

- preLltv < LLTV;
- preLCF1 <= preLCF2;
- 1 <= preLIF1 <= preLIF2 <= 1 / LLTV.
Note: it is not mandatory that `preLCF1 <= 1` and `preLCF1 <= 1` hold.
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
Indeed without this, the pre-liquidation close factor can reach 100% before the position is liquidatable allowing additionnal pre-liquidation close factor configurations.
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively you can write.

Suggested change
Indeed without this, the pre-liquidation close factor can reach 100% before the position is liquidatable allowing additionnal pre-liquidation close factor configurations.
Indeed, in some cases the pre-liquidation close factor reaches 100% with LTV lower than LLTV.

Copy link
Collaborator Author

@peyha peyha Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used @adhusson's suggestion for this
"Note: Using preLCF2 > 1, you can select at which LTV between preLltv and LLTV the entire position will be pre-liquidated."
wdyt ?

A pre-liquidation close factor higher than 100% means that the whole position is pre-liquidatable.
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

### `onPreLiquidate` callback

By calling `preLiquidate` with a smart contract that implements the `IPreLiquidationCallback` interface, the liquidator can be called back.
Expand Down