2

Below is a vulnerability submitted in an audit contest. I am wondering if this is a legitimate vulnerability.

The reason I am thinking it is not is because it isn't denial of service because, even if an attacker submitted a huge number of shorts to be liquidated, someone else can still call secondaryLiquidation and their call would be processed. It isn't either/or.

Also, wouldn't the attacker bear the cost of all the storage reads? That is a big disincentive.

Link to vulnerability

2 Answers 2

1

It's not a legit vulnerability unless liquidateSecondary is called from the codebase indirectly.

The attacker can only burn his own gas if the only entry point is to call this directly.

There is a code comment

 If you want to liquidated more than uint88.max worth of erc in shorts, you must call liquidateSecondary multiple times
1
  • Correct, I thought the same. Commented Oct 17, 2023 at 13:45
-2

Yes, it is a vulnerability. The attacker can set high gas price on his transaction and pass huge array as a parameter to the liquidation function. It'll make the contract unresponsive to other users and they may not be able to process liquidations while the attack lasts. And yes, it's expensive, but benefits could outweigh the gas cost.

2
  • What are the benefits? Commented Oct 17, 2023 at 3:43
  • There is no such thing as "making contract unresponsive to other users" in EVM. I believe you have a misunderstanding how transaction gas limits work. Commented Oct 17, 2023 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.