Emergency Global Settlement
A protocol-wide safety mechanism for extreme scenarios in the Fixed-Rate Lending Protocol
Overview
Emergency global settlement is a critical functionality designed to address unforeseen situations such as hacks or unexpected bugs that could compromise the integrity of our protocol. When this functionality is executed by an admin, all markets are immediately halted, and the protocol becomes non-operational. Subsequently, users can only redeem their positions and withdraw their tokens.
How It Works
The Emergency Global Settlement process follows a specific sequence of steps to ensure the secure resolution of all positions in the protocol:
Admin initiates an emergency global settlement.
All markets and the Token Vault are brought to a stop.
Caches of all price feeds are taken for reference.
Users execute redemptions.
The collateral token ratios in the Token Vault are calculated.
Users' total assets and positions in the Present Value (PV) are computed using the price feed caches. Based on the ratios, their assets and positions are replaced with collateral tokens.
Positions of users are reset after the replacement.
Users can then withdraw the replaced tokens after redeeming them.
It's important to note that even users who only have deposits without positions will have their deposits replaced with collateral tokens based on the ratios in the Token Vault.
Key Parameters
Settlement Trigger
Who can initiate emergency settlement
Protocol Admin only
Price Feed Cache
How price feeds are stored during settlement
Snapshot at settlement time
Redemption Window
Time users have to redeem positions
Unlimited (no expiration)
Token Replacement
How positions are converted to tokens
Based on Token Vault ratios
Market Status
State of markets after settlement
Permanently closed
Examples
Example 1: Emergency Settlement Process
Let's illustrate the emergency global settlement process with a practical example:
Token Vault Holdings:
Total USDC: $100,000
Equivalent ETH Value: $200,000
Ratio: 1 USDC to 2 USD worth of ETH
User's Positions and Deposits:
ETH and FIL Lending Positions (PV value: $10,000)
ETH Deposits (Valued at $5,000)
Total Funds: $15,000
After Emergency Global Settlement:
The user's lending positions and deposits are reset.
The user receives tokens worth $5,000 of USDC and ETH valued at $10,000 as per the replacement.
The user can withdraw $5,000 in USDC and $10,000 worth of ETH from their account.
Example 2: Multi-Asset Settlement
Consider a user with a more complex portfolio:
Token Vault Holdings:
Total USDC: $500,000
Total ETH Value: $300,000
Total BTC Value: $200,000
Ratio: 5:3:2 for USDC:ETH:BTC
User's Positions:
Various lending positions across multiple maturities (Total PV: $50,000)
Deposits in multiple currencies (Total value: $25,000)
After Emergency Global Settlement:
All positions are valued at $75,000 total
User receives approximately:
$37,500 in USDC (50% of portfolio value)
$22,500 in ETH (30% of portfolio value)
$15,000 in BTC (20% of portfolio value)
The exact distribution depends on the precise ratios in the Token Vault at settlement time
Common Questions
When would Emergency Global Settlement be triggered?
Emergency Global Settlement would be triggered in the following scenarios:
Critical Security Breach: If the protocol experiences a significant hack or security vulnerability
Severe Smart Contract Bug: If a critical bug is discovered that could compromise user funds
Systemic Risk: If there's a risk of cascading failures that could affect the entire protocol
Oracle Failure: If price feeds become compromised or unreliable for an extended period
Governance Decision: If the protocol governance votes to initiate settlement due to extraordinary circumstances
What happens to my positions during Emergency Global Settlement?
During Emergency Global Settlement:
All markets are immediately halted
Your positions are valued using the cached price feeds at the time of settlement
Your positions and deposits are converted to collateral tokens based on the ratios in the Token Vault
You can then withdraw these tokens after the redemption process
No new positions can be created until the protocol is restarted (if ever)
Can I lose money during Emergency Global Settlement?
While Emergency Global Settlement is designed to be fair to all users:
You will receive the proportional value of your positions based on the Token Vault ratios
If the Token Vault has insufficient funds (e.g., due to a hack), you may receive less than your full position value
The settlement uses cached price feeds, which might differ slightly from market prices at that moment
You won't be able to maintain your exact position structure (e.g., specific lending positions)
There may be some slippage in value compared to normal market operations
How do I claim my funds after Emergency Global Settlement?
To claim your funds after Emergency Global Settlement:
Connect your wallet to the protocol interface
Navigate to the Emergency Settlement section
Execute the redemption process to convert your positions to collateral tokens
Withdraw your collateral tokens to your wallet
This process can typically be completed in a single transaction
Can Emergency Global Settlement be reversed?
No, Emergency Global Settlement cannot be reversed:
It is a one-way process designed as a last-resort safety measure
Once triggered, all markets remain permanently closed
The protocol would need to be redeployed with new contracts if operations were to resume
This irreversibility ensures that users can safely withdraw their funds without concerns about further protocol changes
It provides certainty during uncertain circumstances
Related Resources
Last updated
Was this helpful?