Skip to content

Commit 27be4f9

Browse files
committed
fixed README
1 parent 8915d57 commit 27be4f9

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

research/zkLend_liquidation_research.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ To verify if a position was liquidated in zkLend, the following steps were taken
3636
### zkLend: Market Contract Activity
3737
1. **Identify Relevant Events Using Starkscan**: The event logs in "Events" tab of the zkLend: Market contract were examined on Starkscan to identify any liquidation events. Identified `Liquidation` event.
3838
2. **Analyze Event Data**: Clicked on `Liquidation` event to view its details, and found the following data including liquidator, user, debt_token, debt_raw_amount, debt_face_amount, collateral_token, collateral_amount.
39-
It was that the liquidator is not
4039
3. **zkLend: Market Contract Read Functions**: Found and explored the following view functions to check if our deployed spotnet contract's position in zkLend has been closed; `is_user_undercollateralized(user, apply_borrow_factor)`, `user_has_debt(user)` and `is_collateral_enabled(user, token)` [with STRK address as token] all returned 1, indicating `true`. Thus, our contract's position is still open.
4140

4241
### Portfolio Check
@@ -67,7 +66,9 @@ From in-depth [review into zkLend market contract codebase](https://9oelm.github
6766
1. The zToken of the corresponding collateral (which is zSTRK in our case) repayed by a liquidator would be seized from our collateral balance, and sent to the liquidator.
6867
2. A `Liquidation` event.
6968

70-
The liquidators can be anyone (or their bot), and is neither a zklend or zklend related contract. Potential liquidators are monitoring the market closely and frequently, and try to call `liquidate()` earlier than their competitors with suitable amount of gas fee that might get their transaction get through earlier than others. From analysis of [all Starknet Liquidations](https://dune.com/caravanserai/starknet-liquidations); the below are among some of the liqudators for zkLend:
69+
The liquidators can be anyone (or their bot), and is neither a zklend or zklend related contract. Potential liquidators are monitoring the market closely and frequently, and try to call `liquidate()` earlier than their competitors with suitable amount of gas fee that might get their transaction get through earlier than others.
70+
71+
From analysis of [all Starknet Liquidations](https://dune.com/caravanserai/starknet-liquidations); the below are among some of the liqudators for zkLend:
7172
- 0x0783e6b26807e9906b084b07cc2fcbb74ab1aec1621b3c7bd7b985c201ff32e5
7273
- 0x04746c68f5f6d6bff7a16fdad6f543750bd6e46a7c00a9e5bb6820c86347fda0
7374
- 0x027c8f8a9b51985b629293453d4dfcad356b959d90d00f0253a1f95edbb1ada3
@@ -77,13 +78,18 @@ The liquidators can be anyone (or their bot), and is neither a zklend or zklend
7778
## Conclusion
7879

7980
The zkLend liquidation process is unique compared to other lending protocols, such as Aave. Unlike these protocols, zkLend does not allow liquidators to fully liquidate a position, regardless of how low the health factor is. Instead, the current design permits liquidators to partially liquidate undercollateralized positions, ensuring that the user remains undercollateralized after the liquidation.
80-
The deployed Spotnet contract is yet to be liquidized by zkLend. And whenever it gets liquidated, the `zkLend_liquidation_position.py` script will give proof that zkLend liquidated our position.
81+
82+
The deployed Spotnet contract is yet to be liquidized by zkLend as evident by:
83+
1. lack of `Liquidation` event from zkLend Events.
84+
2. collateral balance remains the same.
85+
86+
And whenever it gets liquidated, the `zkLend_liquidation_position.py` script will give proof that zkLend liquidated our position.
8187

8288

8389
## References
8490

85-
https://github.com/zkLend/zklend-v1-core/blob/master/src/market/internal.cairo
86-
https://dune.com/caravanserai/starknet-liquidations
87-
https://medium.com/zklend/zklend-x-zkpad-ama-recap-19-04-2022-b2c925c4d816
88-
https://9oelm.github.io/2023-10-26-technical-intro-to-defi-lending-protocols-with-zklend-codebase-as-an-example/
89-
https://medium.com/@kristianaristi/liquidation-bot-on-zklend-starknet-part-1-introduction-who-is-borrowing-4d2631971a3a
91+
- https://github.com/zkLend/zklend-v1-core/blob/master/src/market/internal.cairo
92+
- https://dune.com/caravanserai/starknet-liquidations
93+
- https://medium.com/zklend/zklend-x-zkpad-ama-recap-19-04-2022-b2c925c4d816
94+
- https://9oelm.github.io/2023-10-26-technical-intro-to-defi-lending-protocols-with-zklend-codebase-as-an-example/
95+
- https://medium.com/@kristianaristi/liquidation-bot-on-zklend-starknet-part-1-introduction-who-is-borrowing-4d2631971a3a

0 commit comments

Comments
 (0)