Hunt prep
Before you test Peapods
What 41 disclosed reports say about Peapods: 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 | 29 | 0 | – | – | $0 |
| DoS lesson | 4 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| Misconfiguration 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.
-
Reward tokens could be locked in `VotingPool` contract
A mechanism for handling reward tokens held by the contract should be introduced.
Disclosed
-
`addInterest` will not update the interest acurately which would enable users to claim rewards for time that they weren't staked inside `LendingAssetVault`
The interest update should rely on `previewAddInterest` to use current numbers and perform the actual interest calculation.
Disclosed
-
`_protocolFees` can be applied multiple times in `AutoCompoundingPodLp` contract
The protocol fee should be paid only if the swap to PodLp is successful, or the contract should track the amount of PAIRED_LP_TOKEN remaining after a failed swap.
Disclosed
-
hardcoded V3_POS_MGR address won't be the same on every chain
V3_POS_MGR should be made updateable, for example by adding an external function that lets it be changed.
Disclosed
-
Incorrect reserve mapping leads to fault swap
The code should sort the token addresses and reorder the reserves accordingly before using them in the swap calculation.
Disclosed
-
Open fee is overcharged in `_addLeveragePostCallback` function
The open fee should be calculated based on the amount of pairedLPToken actually used in lpAndStakeInPod, not the desired amount.
Disclosed
-
MEV bots will steal from users due to an incorrectly manipulated value
The contract should not manipulate the user-provided minimum output amount.
Disclosed
-
The amount of shares needed for redemption of borrow tokens is underquoted during the removal of leverage process leading to reverting
Round up the shares needed to be redeemed for the borrow tokens, as any surplus will be refunded to the user.
Disclosed
-
AutoCompoundingPodLp `_pairedLpTokenToPodLp()` does not correctly handle leftover pTKNs
The contract should calculate the amount of pairedLpTKN needed to pair with existing pTKN before swapping, to clear leftover pTKN and avoid imbalance.
Disclosed
-
self-lending does not work with paired tokens that have a transfer tax because addLiquidityV2 does not account for fee-on-transfer on the PAIRED_LP_TOKEN
The code should measure the amount actually received after the transfer and add liquidity based on that amount rather than the intended amount.
Disclosed
-
Transferring of _userProvidedDebtAmtMax does not work in _acquireBorrowTokenForRepayment because _props.sender is never set, which leads to a transferFrom call from address(0), causing the transaction to revert
The code should set `_props.sender` to the user's address (e.g., `msg.sender`) before calling `_acquireBorrowTokenForRepayment`.
Disclosed
-
LeverageManager remove leverage will lead to stuck tokens if slippage `_podSwapAmtOutMin` is set
The contract should also transfer any remaining borrowed tokens to the user after repaying the flash loan.
Disclosed
-
`PodUnwrapLocker` can be drained due to an arbitrary input
The function should reject pod addresses that are not legitimate registered pods.
Disclosed
-
Vault inflation attack in `AutoCompoundingPodLp` is possible due to incorrectly minting dead shares
The factory should mint the initial shares to a dead address (e.g., address(0xdead)) instead of the deployer.
Disclosed
-
Malicious Lenders can Increase the Interest owed by Borrowers Due to Wrong `UtilizationRate` Calculation
The utilization rate should be calculated as the ratio of total borrowed tokens to the total of borrowed plus unborrowed tokens, as confirmed by the protocol team.
Disclosed