Hunt prep
Before you test Carapace
What 21 disclosed reports say about Carapace: 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 | 18 | 0 | – | – | $0 |
| DoS lesson | 2 | 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.
-
Freezing of the protocol when totalSTokenUnderlying is zero but totalSupply is non-zero
The protocol team decided no code change is required for v1; they will make the pool non-operational and deploy a new one if this occurs, with a liquidation process planned for a future version.
Disclosed
-
Some protection buyers might not be able to renew their protections due to delayed expiration processing
The function verifyAndAccruePremium() was revised to check expiration before the early return, and the fix was confirmed by the team.
Disclosed
-
Sandwich attack to accruePremiumAndExpireProtections()
The fix was to stream the accrued premium into the pool over time via a separate contract, and to cap deposits and withdrawals per cycle, reducing the incentive for a quick sandwich.
Disclosed
-
The renewal grace period gives users insurance for no premium
When renewing protection, the protection should renew from the end of the expired protection rather than block.timestamp.
Disclosed
-
function lockCapital() doesn't filter the expired protections first and code may lock more funds than required and expired defaulted protections may funded
The fix was to call _accruePremiumAndExpireProtections for the defaulted pool to filter out expired protections before locking capital.
Disclosed
-
Malicious seller forced break lockCapital()
The issue was fixed by wrapping the ownerOf() call in a try/catch so that a revert is treated as the lender not being the owner.
Disclosed
-
Existing buyer who has been regularly renewing protection will be denied renewal even when she is well within the renewal grace period
The project planned to fix it by using a separate verification for renewals that allows renewal when the pool is LateWithinGracePeriod or Late, and a pull request was made and reviewed as looking good.
Disclosed
-
Protection sellers can bypass withdrawal delay mechanism and avoid losing funds when loans are defaulted by creating withdrawal request in each cycle
The code should track the user's balance that is not in withdrawal delay and the balance requested for withdrawal, and consider penalties such as not rewarding the waiting withdrawal balance.
Disclosed
-
Protection buyer may buy multiple protections for same goldfinch NFT
The fix was to track the total protection subscribed for a given loan and limit the total protection value to the remaining capital.
Disclosed
-
If a `lendingPool` is added to the network while in `late` state, can be defaulted instantly
The fix was to handle the initial setting of the state separately, as indicated by the linked pull request and confirmation that the fix looks good.
Disclosed
-
Protection can be bought in late pools, allowing buyers to pay minimal premium and increase the chance of a compensation
The protocol should update the pool status by calling the state assessment function before verifying eligibility in the protection purchase flow.
Disclosed
-
secondary markets are problematic with how `lockCapital` works
The `assessState` function should be restricted to a trusted caller, so that an attacker cannot control when the snapshot is taken.
Disclosed
-
Protection too expensive when some capital is locked
The fix was to exclude active protections that have contributed to locking capital from the leverage ratio calculation.
Disclosed
-
Missing validation of snapshotId makes it possible for the investor to claim unlocked capitals from the same snapshot multiple times
The fix was to only update the last claimed snapshot ID if it is greater than zero.
Disclosed
-
Sybil on withdrawal requests can allow leverage factor manipulation with flashloans
The fix was to freeze STokens for a depositor once they requested a withdrawal.
Disclosed