Skip to content

Latest commit

 

History

History
43 lines (24 loc) · 893 Bytes

060.md

File metadata and controls

43 lines (24 loc) · 893 Bytes

Small Shamrock Rook

Medium

Invariant violation leading to DoS'd borrows

Summary

See 'Root Cause'

Root Cause

The contest README states the following invariant:

Protocol cannot lend when CF_liquid < 20%, where CF_liquid = rETH_vault / synthetic_rETHdebt.

However, the code uses 200% mistakenly:

    uint public cf_liquid_warning = 2000; // 200%

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

In getMaxBorrow(), the synthValueWithCF will be calculated to be much higher than what it should be. This causes getMaxBorrow() to return 0, causing a DoS for borrowing.

PoC

No response

Mitigation

No response