Hunt prep
Before you test Perennial V2 Update #3
What 21 disclosed reports say about Perennial V2 Update #3: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 14 | 0 | – | – | $0 |
| Access control lesson | 3 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Smart contracts lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Maliciously specifying a very large intent.price will result in a large gain at settlement, stealing funds
The protocol team fixed this issue by implementing checks on collateral delta and limiting intent price deviation.
Disclosed
-
Market coordinator can set `staleAfter` to a huge value allowing anyone to steal all market collateral when there are no transactions for some time
The protocol team fixed this issue by adding a sanity check for the staleAfter risk parameter.
Disclosed
-
`MultiInvoker` and `Manager` orders execution can be DOS in key moments if AAVE/Compound utilization is at 100%
The protocol team fixed this issue in the following PRs/commits: https://github.com/equilibria-xyz/perennial-v2/pull/461
Disclosed
-
when ReserveBase undercollateralized , Manager.orders will not be able to execute
The fix was to use the actual amount returned by reserve.redeem when transferring USDC, rather than the requested amount.
Disclosed
-
Corrupted storage after upgrade in the `MarketFactory` contract
The `extensions` mapping should be placed after the `_referralFees` mapping so that new variables are added after all occupied slots.
Disclosed
-
_ineligible() redemptionEligible is miscalculated
The protocol team fixed this issue by adjusting the calculation to subtract only the portion of global.deposit that does not include the current deposit.
Disclosed
-
TriggerOrder.notionalValue() Using the wrong latestPositionLocal to calculate the value causes the user to overpay fees
The protocol team fixed this issue in a pull request, but a later comment noted that the opposite case (pending increase) still causes incorrect fees or reverts, and a full fix would require calculating the actual closable amount.
Disclosed
-
The `RiskParameter.liquidationFee` variable is not treated and validated as a percentage value, leading to breaking protocol invariants
The issue was fixed by enforcing the protocol-wide maxFeeAbsolute across markets and validating liquidationFee as a percentage, though a follow-up discussion noted a remaining attack vector that was not addressed in this audit.
Disclosed
-
Market coordinator can liquidate all users in the market
The protocol team fixed this issue in the following PRs/commits: https://github.com/equilibria-xyz/perennial-v2/pull/464
Disclosed
-
Market coordinator can set proportional and adiabatic fees much higher than limited by protocol due to fixed point truncation
The protocol team fixed this issue in a pull request.
Disclosed
-
Perennial account users with rebalance group may suffer a donation attack
The protocol team fixed this issue by adding a minimum rebalance value check to prevent tiny rebalances and excessive keeper fees.
Disclosed
-
The `Market.migrate()` function has no effect and does not migrate `PositionStorageGlobal` to the new storage layout, breaking the migration assumption
The protocol team fixed this issue in a pull request.
Disclosed
-
Anyone can cancel other accounts `nonces` and `groups`, leading to griefing their `Intents`
The protocol team fixed this issue by adding validation to ensure that `common.signer` is an allowed signer for `common.account`.
Disclosed
-
`MultiInvoker`, `Manager` and `Account` unexpected reverts in certain conditions due to AAVE reverting on deposits and withdrawals with 0 amount
The protocol team fixed this issue by converting the difference between target and collateral to Fixed6 and comparing it to zero before calling AAVE.
Disclosed
-
`Controller`'s core function of Rebalance will not rebalance when rebalance is needed in some cases, breaking core functionality
The protocol team fixed this issue by changing the check to return true when target collateral is non-zero, even if current collateral is zero.
Disclosed