Introduction
Grace is an L2-first cross-margin lending protocol that fairly distributes losses if they occur, making it resilient to oracle manipulation, volatility and exploits.
The bankrun problem
Bad debt is accrued. A lending protocol experiences some loss either due to vulnerable code, collateral price volatility or oracle manipulation.
Liquidity is consumed. The first lenders to withdraw the remaining the liquidity share none of the losses while those unlucky enough to withdraw last lose their entire deposit.
Everyone runs for the exit. This incentivizes a bank run because even a loss as small as 1% of the protocol’s TVL can cost a depositor 100% of their deposit if they're too late to withdraw.
The protocol becomes unusable. Any new lenders entering the pool would be adding exit liquidity for existing stuck lenders, allowing them to transfer their previous losses to the new lenders.
The Graceful solution
Prepare for the worst. The lending protocol must expect and be able to absorb any amount of loss. Grace achieves this by immediately distributing any loss equally among lenders.
Manage exposure. Exposure to each collateral in the pool must be limited and predictable. Grace caps total exposure to each collateral in dollar terms.
Compensate risk. Borrowers should compensate lenders for the collateral risk they're taking. Grace charges borrowers a yearly fee based on their choice of deposited collateral and uses the proceeds to compensate lenders for their risk.
Implement circuit breakers. Even in the presence of a loss distribution mechanism, the protocol should minimize potential losses. A Pessimistic Price Oracle renders most oracle manipulation attacks unprofitable against Grace. A global daily borrow limit also caps the maximum possible damage by an attack over a single day.
Last updated