# The renewal grace period gives users insurance for no premium

Carapace renewal restarts coverage at block.timestamp instead of prior expiry, letting users renew at grace-period end and get free insurance duration.

- Payout: Contest reward
- Severity: high
- Program: Carapace
- Credited: monrel
- Disclosed: 2023-02-01
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-02-carapace-judging/issues/308
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-02-carapace%3AH-1
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** ProtectionPool renewal logic (Solidity smart contract)
**Root cause:** Renewal validates expiry is within grace period but sets new coverage start to block.timestamp rather than the previous protection's expiration, so the grace-period gap is never charged premium.
**Steps:**
1. Open a protection position with a defined duration and premium.
2. Let the position expire; note the grace period window in ProtectionPoolHelper.sol#L390-L397.
3. Wait until near the end of the grace period.
4. Call renewProtection; ProtectionPool.sol#L181-L194 starts coverage at block.timestamp, not prior expiry.
5. Repeat each cycle to accumulate free coverage duration without paying premium for the gap.
**How found:** Code reading of the renewal path: noticed the grace-period check compares expiry to current time, then the renewal start timestamp uses block.timestamp instead of the expired protection's end, revealing the uncharged interval.
**Exploitation:** User renews at the tail of the grace period so the uncharged gap is maximized; sellers' yield is directly reduced since no premium is collected for that interval while coverage effectively continues.
**Insight:** When a contract allows late renewal within a grace window, check whether the new period's start timestamp is anchored to the old expiry or to now; any gap anchored to now is uncharged coverage that can be farmed by renewing at the window's edge.
