Hunt prep
Before you test Size
What 26 disclosed reports say about Size: 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 | 21 | 0 | – | – | $0 |
| DoS lesson | 2 | 0 | – | – | $0 |
| Race condition 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.
-
Users may incur an unexpected fragmentation fee in the compensate() call
The compensate() function should be modified to accept a minimum amount parameter, allowing the user to specify the minimum compensation amount and revert if a fee would be charged.
Disclosed
-
executeBuyCreditMarket returns the wrong amount of cash and overestimates the amount that needs to be checked in the variable pool
The function should return cashAmountIn minus fees so that the liquidity check uses the correct net amount.
Disclosed
-
withdraw() users may can’t withdraw underlyingBorrowToken properly
The check should only be applied when withdrawing collateral tokens, not borrowed tokens.
Disclosed
-
When sellCreditMarket() is called to sell credit for a specific cash amount, the protocol might receive a lower swapping fee than expected
The swap fee calculation was corrected to use the proper formula, and the fix was implemented in a pull request.
Disclosed
-
Risk of overpayment due to race condition between repay and liquidateWithReplacement transactions
The repay function should require the caller to specify both the borrower address and the debt position ID, and validate that the borrower matches the current debt position owner.
Disclosed
-
The collateral remainder cap is incorrectly calculated during liquidation
The collateral remainder cap should be calculated as debtInCollateralToken * (crLiquidation - PERCENT) / PERCENT instead of using the full crLiquidation.
Disclosed
-
Users won’t liquidate positions because the logic used to calculate the liquidator’s profit is incorrect
The reward should be calculated from the debt value converted into collateral-token decimals rather than from the raw future value; the project states it was fixed in a pull request.
Disclosed
-
Multicall does not work as intended
The multicall function was fixed to use borrowAToken.totalSupply() instead of balanceOf(address(this)) when measuring supply before and after.
Disclosed
-
Size uses wrong source to query available liquidity on Aave, resulting in borrow and lend operations being bricked upon mainnet deployment
The check should query the aToken's balance of the underlying token instead of the pool's balance; the report says it was fixed in a pull request.
Disclosed
-
Users can not to buy/sell minimum credit allowed due to exactAmountIn condition
The validation should account for exactAmountIn by converting the minimum credit to cash when needed; the report says it was fixed in a pull request.
Disclosed
-
Neither sellCreditMarket() nor compensate() checks whether the credit position to be sold is allowed for sale
The protocol was fixed by resetting the forSale flag consistently upon sale, as confirmed by the team.
Disclosed
-
Credit can be sold forcibly as forSale setting can be ignored via Compensate
The fix was to pass the forSale flag from the existing credit position when creating a new one in Compensate, so it won't be changed.
Disclosed
-
LiquidateWithReplacement does not charge swap fees on the borrower
The swap fee should also be charged during executeLiquidateWithReplacement, though the team has not committed to fixing it.
Disclosed
-
Sandwich attack on loan fulfillment will temporarily prevent users from accessing their borrowed funds
The recommended mitigation is to remove the liquidity from the pool when the loan is created while still letting the user pull their funds in a separate transaction.
Disclosed
-
Fragmentation fee is not taken if user compensates with newly created position
The code was fixed by calculating the initial credit from the original credit position when the reserved ID is used, so the remaining credit is correct and the fee is charged.
Disclosed