requestWithdraw without obligation to withdraw allow underwriter to avoid payout
The withdrawal request mechanism lacks an obligation to complete the withdrawal after the lockup period, allowing an underwriter to repeatedly request withdrawal to keep their average lockup period at half the configured lockup. This could let them avoid payouts while still earning premiums.
Submitted by gzeon
To prevent withdrawal front-running, a lockup period is set between withdrawal request and withdrawal. However, there are no obligation to withdraw after the lockup period and the capital will keep earning premium during lockup. A strategy for underwriter is to keep requesting withdrawal every lockup period to keep their average lockup to lockup period/2.
Proof of Concept
Assuming
- Reporting DAO vote last for 24 hours (according to docs) plus there will be delay between the hack and vote creation
- the
lockup periodis set to 86400 (24 hours) in the supplied test cases
It is very likely an underwriter can avoid payout by such strategy since their effective lockup would be 12 hours only. They will continue to earn yield in the pool and only require some extra gas cost for the requestWithdraw every 24 hours.
Recommended Mitigation Steps
Extend the lockup period at least by a factor of 2 or force underwriter to withdraw after lockup period.
oishun1112 (Insure) acknowledged:
Yes, lock up period is going to be like a week~2week in production.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An underwriter could avoid payouts by keeping their effective lockup period at half the configured lockup, while continuing to earn yield in the pool.
What the attacker needed
Underwriter role; ability to request withdrawal repeatedly; lockup period configured
The fix
The lockup period should be extended by at least a factor of 2, or underwriters should be forced to withdraw after the lockup period.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this insurance protocol, underwriters provide capital and can request to withdraw it, but there is a waiting period (lockup) before the withdrawal is final. The report says that because there is no requirement to actually withdraw after the lockup, an underwriter can keep requesting withdrawal every lockup period, so on average their money is only locked for half the lockup time. This means they can pull out quickly if a hack occurs, avoiding payouts, while still earning premiums most of the time.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.