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

fix(#patch); aave-v3-forks; fix liquidation protocol fee calculation #2516

Merged

Conversation

dhruv-chauhan
Copy link
Collaborator

// Earlier, 

liquidationProtocolFee = liquidationPenalty * liquidationProtocolFeePercentage * liquidatedCollateralAmount / (1 + liquidationPenalty - liquidationPenalty*liquidationProtocolFeePercentage)

// Changed,
// From the BalanceTransfer events sent on LiquidationCall https://github.com/aave/aave-v3-core/blob/724a9ef43adf139437ba87dcbab63462394d4601/contracts/protocol/tokenization/AToken.sol#L117

liquidationProtocolFee = balanceTransfer.value * (balanceTransfer.param_index / 10^27)

Test deployments,

Copy link
Contributor

@melotik melotik left a comment

Choose a reason for hiding this comment

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

lgtm, we will also have to apply this to aave v2 as well. I am cutting you a ticket for that, and you can do it in a new PR

@melotik melotik merged commit 654ad48 into messari:master Mar 27, 2024
4 checks passed
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.

2 participants