sherlock-audit / 2023-07-perennial-judging

2 stars 1 forks source link

[Perennial Self Report] MultiInvoker doesn't handle collateral magic value #181

Open arjun-io opened 1 year ago

arjun-io commented 1 year ago

If the collateral magic value is used

if (collateral.eq(Fixed6Lib.MIN)) collateral = context.local.collateral.mul(Fixed6Lib.NEG_ONE);

the multiinvoker will revert due to it using in the passed collateral value directly: if (collateral.sign() == -1) _withdraw(msg.sender, collateral.abs(), wrap);

hrishibhat commented 12 months ago

This issue is not included in the contest pool rewards

arjun-io commented 11 months ago

Fixed: https://github.com/equilibria-xyz/perennial-v2/pull/84

MLON33 commented 11 months ago

From WatchPug,

Fixed.