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

HHK - liquidationFee changes could affect liquidators #373

Closed
sherlock-admin2 opened this issue Aug 24, 2024 · 0 comments
Closed

HHK - liquidationFee changes could affect liquidators #373

sherlock-admin2 opened this issue Aug 24, 2024 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Aug 24, 2024

HHK

Medium

liquidationFee changes could affect liquidators

Summary

The liquidationFee will be initially set to 0 but might be changed to 20-30% in the future. The way the fee is applied could result in unprofitable liquidations.

Root Cause

In the function _transferAssetsToLiquidator() the liquidationFee is applied directly on the asset amount to be liquidated.

This is an issue as currently the liquidationDiscount is 10%, if the liquidationFee was increased to 20% then the liquidators would end up receiving less value than they reimbursed and so be unprofitable.

Additionally if that change happened while a liquidation transaction was in the mempool the liquidator would receive less tokens than expected as he has no way to enforce the minimum to receive after fees.

Internal pre-conditions

  • Change of the liquidationFee to 20% or 30% as can be seen on the contest doc.
  • Liquidation transaction in the mempool during the change that was sent before the change.

External pre-conditions

No response

Attack Path

No response

Impact

  • The fee that will be set in the future will make liquidation unprofitable.
  • The fee update may frontrun a liquidation transaction and lead to a few unexpected unprofitable liquidations at the expense of the liquidators.

PoC

No response

Mitigation

Consider not allowing the liquidationFee to be bigger than the liquidationDiscountor applying the fee on the liquidationDiscount.

Duplicate of #91

@github-actions github-actions bot closed this as completed Sep 5, 2024
@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. labels Sep 5, 2024
@sherlock-admin4 sherlock-admin4 changed the title Lucky Cornflower Porcupine - liquidationFee changes could affect liquidators HHK - liquidationFee changes could affect liquidators Sep 15, 2024
@sherlock-admin4 sherlock-admin4 added the Reward A payout will be made for this issue label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

2 participants