Hunt prep
Before you test Predy
What 12 disclosed reports say about Predy: 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 | 5 | 0 | – | – | $0 |
| DoS lesson | 2 | 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.
-
Liquidity manipulation is possible when trading
The Trade contract should use the TWAP price instead of the spot price to prevent manipulation.
Disclosed
-
Liquidators can bypass remaining negative margin check and leave the loss to the protocol
The negative margin check should be moved outside the `if (!hasPosition)` block so that it applies whenever the remaining margin is negative, regardless of whether a position remains open.
Disclosed
-
Incorrect price for negative ticks due to lack of rounding down
The code should round down the tick when the tick cumulative difference is negative and not evenly divisible by the time elapsed, as done in Uniswap's OracleLibrary.
Disclosed
-
Reallocation incorrectly sends the exceed quoteTokens to Market contract instead of reallocator
Send the excess tokens to the reallocator instead of msg.sender.
Disclosed
-
One pair can steal another pair’s Uniswap liquidity during reallocate() call if both pairs operate on the same Uniswap pool and both have the same upper and lower tick during reallocation
The protocol should track liquidity per pair internally and only allow reallocation of that pair's own liquidity, and collect fees proportionally.
Disclosed
-
Reallocation depends on the slot0 price, which can be manipulated
The text suggests using a TWAP price instead of slot0, but the judge notes a redesign may be needed, such as a privileged role or signature authorisation for reallocations.
Disclosed
-
Vaults can become immune from liquidation by setting vault.recipient to a blacklisted quote token address
The recipient should be checked against the quote token's blacklist before being set, and the vault's position should be required to be healthy before the recipient can be changed, to prevent frontrunning.
Disclosed
-
PriceFeed does not return to the correct price for quote pairs
The fix should allow a signed decimal difference and apply multiplication when the difference is negative, as shown in the recommended mitigation.
Disclosed
-
Liquidation incorrectly tries to transfer token from Market instead of liquidator if remainingMargin is negative
The code should transfer the bad debt amount from the liquidator's address instead of the Market contract.
Disclosed
-
updateIRMParams does not call applyInterestForToken before updating irmParams which leads to incorrect calculation of interest rate for subsequent trades.
The applyInterestForToken function should be called before updating the interest rate model parameters, and the same should be done for the updateFeeRatio function.
Disclosed
-
Chainlink’s latestRoundData might return stale or incorrect results
Add checks for stale data by verifying that the answered-in round is at least the round ID, the timestamp is non-zero, and the price is not older than a valid time period.
Disclosed