Skip to content

Conversation

piobab
Copy link
Collaborator

@piobab piobab commented Aug 30, 2023

Should be:

debt_value_to_repay = debt_amount_to_repay * debt_2_price

collateral_amount_to_liquidate = debt_value_to_repay * (1 + LB) / collateral_1_price

protocol_fee_value = debt_value_to_repay * LB * PLF

protocol_fee_amount = protocol_fee_value / collateral_1_price

collateral_amount_received_by_liquidator = collateral_amount_to_liquidate - protocol_fee_amount

@piobab piobab force-pushed the fix/plf-adjustment-for-dynamic-liq branch from aff8b1f to 7b50b75 Compare August 30, 2023 09:16
@piobab piobab force-pushed the fix/plf-adjustment-for-dynamic-liq branch from 7b50b75 to e3ef0f6 Compare August 30, 2023 09:44
@piobab piobab requested review from brimigs, dancreee and thec00n August 30, 2023 10:21
@piobab piobab merged commit 8c90842 into release/mars-v2 Aug 31, 2023
@piobab piobab deleted the fix/plf-adjustment-for-dynamic-liq branch September 14, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants