Hunt prep
Before you test INIT Capital Invitational
What 15 disclosed reports say about INIT Capital 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 | 12 | 0 | – | – | $0 |
| Access control lesson | 1 | 0 | – | – | $0 |
| DoS 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.
-
When the returnNative parameter is set to true in the _params provided to MoneyMarketHook.execute , it is not handled properly and could disrupt user expectations
The withdraw handler should check if returnNative is true and the token is WNATIVE, and if so set the token receiver to the hook contract's address.
Disclosed
-
repay(), liquidate() and liquidateWLp() receive shares as argument, which may revert if from approval to tx settled blocks have passed
The project acknowledged the issue and said it should be mitigated by introducing hooks where the amount-to-share conversion logic can be implemented.
Disclosed
-
If wLP is blacklisted, then user will not be able to withdraw it
The withdrawal function should allow users to withdraw blacklisted wLP tokens, relying on the health check to ensure the position remains sufficiently collateralised.
Disclosed
-
API3 oracle timestamp can be set to future timestamp and block API3 Oracle usage to make code revert in underflow
The staleness check should only subtract when block.timestamp is greater than the oracle timestamp, treating a future timestamp as not stale.
Disclosed
-
collateralizeWLp can be bypassed even when collateralization is paused
Implement internal accounting for wLP inside the PosManager so that only explicitly added collateral is counted.
Disclosed
-
Lack of way to handle not fully repaid bad debt after liquidation after the lending pool share or WLP are fully seized
Add a way to handle not fully repaid bad debt after liquidation, such as a donation function or a function to socialise the bad debt as an explicit loss.
Disclosed
-
setPosMode function doesn’t check if wLp is whitelisted
The team said they will add a whitelist check to prevent moving blacklisted collateral to the new mode.
Disclosed
-
wLp tokens could be stolen
Add a check that the position holds the specified tokenId in the removeCollateralWLpTo function.
Disclosed
-
Admin configuration isAllowedForCollateral(mode, pool) can be bypassed by donating asset to the pool directly and then trigger sync cash via flashloan
Use an internal balance to track cash instead of the token balance, and prevent indirect access to syncCash via flash loans.
Disclosed
-
Malicious user can steal native tokens of MoneyMarketHook caller
A reentrancy check should be added to the execute function.
Disclosed
-
_handleRepay of MoneyMarketHook does not consider the actual debt shares of the posId inside the position manager and could lead to a user’s tokens getting stuck inside the hook
The hook should check the provided shares against the actual debt shares in InitCore/PosManager before transferring tokens.
Disclosed
-
setPosMode should not allow changing the mode when the new mode’s canRepay status is disabled
The setPosMode function should also require that the new mode's canRepay status is true, and the canRepay and canBorrow checks should be moved outside the debt loop.
Disclosed
-
Liquidations can be prevented by frontrunning and liquidating 1 debt (or more) due to wrong assumption in POS_MANAGER
The total interest should be updated on repayment, and only when the current debt amount is greater than the last recorded debt amount.
Disclosed
-
TRST-M-8 from previous audit still present
The protocol should implement logic to pause interest accrual when repaying is paused, though the reporter is unsure if this is needed.
Disclosed
-
Decimals of LendingPool don’t take into account the offset introduced by VIRTUAL_SHARES
The decimals() function should add the virtual shares offset to the underlying token's decimals.
Disclosed