Hunt prep
Before you test Perennial V2 Update #2
What 13 disclosed reports say about Perennial V2 Update #2: 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 | 11 | 0 | – | – | $0 |
| DoS lesson | 2 | 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.
-
Requested oracle versions, which have expired, must return this oracle version as invalid, but they return it as a normal version with previous version's price instead
The protocol team fixed this issue by tracking validity alongside the price map in KeeperOracle.
Disclosed
-
ChainlinkFactory will pay non-requested versions keeper fees
The protocol team fixed this issue by adjusting the fee calculation to only pay for requested versions.
Disclosed
-
Vault checkpoints slightly incorrect conversion from assets to shares leads to slow loss of funds for long-time vault depositors
The protocol team fixed this issue by reworking the assets to shares conversion to use the correct formula that subtracts both settlement fee and trade fee proportionally.
Disclosed
-
Orders on Optimism chains can not be settled due to revert of ````keep()````
The protocol team fixed this issue in a pull request.
Disclosed
-
When vault's market weight is set to 0 to remove the market from the vault, vault's leverage in this market is immediately set to max leverage risking position liquidation
The market's collateral should be calculated from the target leverage even when its weight is zero.
Disclosed
-
Vault global shares and assets change will mismatch local shares and assets change during settlement due to incorrect `_withoutSettlementFeeGlobal` formula
The protocol team fixed this issue by weighting the settlement fee proportionally to deposit and redeem orders in the global calculation.
Disclosed
-
Empty orders do not request from oracle and during settlement they use an invalid oracle version with `price=0` which messes up a lot of fees and funding accounting leading to loss of funds for the makers
The protocol team fixed this issue by keeping the price from the previous valid oracle version and using it instead of the zero price from an invalid oracle version.
Disclosed
-
Makers can lose funds from price movement even when no long and short positions are opened, due to incorrect distribution of adiabatic fees exposure between makers
The issue was fixed by changing the distribution to split the total maker exposure by individual maker's exposure rather than by their position size, as confirmed by the protocol team's PR and the lead senior Watson's sign-off.
Disclosed
-
_loadContext() uses the wrong pendingGlobal
The code was changed to read the market-wide pending order instead of the per-account one, and the protocol team fixed it in a pull request that the lead senior watson signed off on.
Disclosed
-
Vault and oracle keepers DoS in some situations due to `market.update(account,max,max,max,0,false)`
The protocol team fixed this issue by ignoring the margin requirement for empty orders and collateral change >= 0, and/or using Market.settle instead of Market.update.
Disclosed
-
Liquidator can set up referrals for other users
The protocol team fixed this issue in a pull request.
Disclosed
-
If referral or liquidator is the same address as the account, then liquidation/referral fees will be lost due to local storage being overwritten after the `claimable` amount is credited to liquidator or referral
The protocol team fixed this issue by modifying the _credit function to update the in-memory [redacted].claimable when the credited account matches the account being settled.
Disclosed
-
All transactions to claim assets from the vault will revert in some situations due to double subtraction of the claimed assets in market position allocations calculation
The protocol team fixed this issue by removing the addition of withdrawal from the `_ineligable` calculation.
Disclosed