Hunt prep
Before you test Particle Leverage AMM Protocol Invitational
What 29 disclosed reports say about Particle Leverage AMM Protocol Invitational: 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 | 20 | 0 | – | – | $0 |
| DoS lesson | 6 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| Race condition 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.
-
Liquidation condition should not factor the liquidation reward into the premiums
The liquidation rewards should be subtracted from premiums after checking the liquidation condition.
Disclosed
-
Position can be opened even when the particle position manger does not hold the Uniswap V3 Position NFT
The Particle team added an ownership check in their contract to ensure the position manager holds the NFT when a position is opened.
Disclosed
-
Malicious lender can manipulate the fee to force borrower pay high premium
The premium interest payment should be capped instead of using the spot fee amount, to avoid swap fee manipulation.
Disclosed
-
AddLiquidity and decreaseLiquidity missing slippage protection
The contract should allow user-controlled slippage protection parameters instead of hardcoding them to zero.
Disclosed
-
If the borrower enters token blacklist, LP may never be able to retrieve Liquidity
The contract should be updated to use a try-catch-claim pattern, recording failed refunds as claims for the borrower to withdraw later, or adding the amount to tokenOwed.
Disclosed
-
openPosition() use stale feeGrowthInside0LastX128/feeGrowthInside1LastX128
The fix is to call prepareLeverage after collectLiquidity so that the fee growth values are up to date.
Disclosed
-
Underflow could happened when calculating Uniswap V3 position’s fee growth and can cause operations to revert
The code should be updated to use unchecked blocks for the fee growth calculations.
Disclosed
-
Dangerous use of deadline parameter
The functions that manage liquidity should accept a deadline parameter and forward it to the Uniswap position manager calls.
Disclosed
-
Modifying the loan term setting can default existing loans
The loan term should be stored per position at creation and used in the liquidation check, though the protocol was reluctant to add storage due to gas concerns.
Disclosed
-
liquidatePosition() liquidator can construct malicious data to steal the borrower’s profit
The fix is to remove the arbitrary data parameter and construct the swap internally using known token addresses and amounts.
Disclosed
-
Zero amount token transfers may cause a denial of service during liquidations
The recommendation is to check that each reward amount is greater than zero before executing the transfer.
Disclosed
-
Increase liquidity in close position may not cover original borrowed liquidity
The code should check that the effective added liquidity covers the original borrowed amount, for example by adding a require statement.
Disclosed
-
openPosition() Lack of minimum token0PremiumPortion/token1PremiumPortion limit
The contract should enforce a minimum premium portion in openPosition; the team said they will add a minimum premium in the contract.
Disclosed
-
Excess tokens that are not accounted in the token premium portion stuck in the ParticlePositionManager
Use a higher scaling for BASIS_POINT to reduce precision loss.
Disclosed
-
Impossible to open a position with a large marginTo
The fix should avoid counting marginTo towards the expected swap output, as suggested in the recommended mitigation steps.
Disclosed