Secured Finance Docs
HomeBlogGitHubCommunityStablecoin ↗Fixed Income ↗
  • Introduction
    • ⚜️About Secured Finance
    • 🎏Vision & Mission
    • 🌍Ecosystem Overview
    • 🏁Roadmap
      • Roadmap 2024
      • Roadmap 2023
    • 📚DeFi Starter Guide
      • 🔄DeFi vs CeFi
      • 👛Wallet Setup
      • ⛽Gas Fees
      • 🤝DApps
      • 🏦DEX
      • 📝Smart Contracts
      • 🪙Governance Tokens
      • 🏛️DAOs
  • USDFC Stablecoin
    • 📢Overview
    • 🧙Getting Started
      • ⛽Creating Your First Trove
      • 👛Minting USDFC Step-by-Step
      • 🤝Managing Collateral Effectively
      • 🏦Monitoring Your Position
      • 🏊Using the Stability Pool
      • 💸Redeeming USDFC
    • 🔦Core Mechanics
      • 🏗️System Overview
      • ✏️The Trove System
      • 💰Mint & Borrow
      • 🚰Liquidation
      • 💸Redemption
      • 🧀Protocol Fees
    • 🎓Advanced Topics
      • 🚨Recovery Mode
    • 📔Contracts and Security
    • ❓FAQs
  • Fixed-Rate Lending
    • 📢Overview
      • 📖White Paper
      • 🎓Concept Paper
    • 🧙‍♂️Getting Started
      • 💵Lending Assets
      • 🏦Borrowing Assets
      • 📈Managing Positions
      • 🎮Platform Guide
        • 💰Trading
          • 💲Supported Currencies
        • 📈Markets
        • 🐋Portfolio
        • Bridge
        • 🚀Points
        • 📣Campaign
    • 🔦Core Mechanics
      • 🧩Order Book System
        • 🆎Order Type
        • 🪃Order Life Cycle
          • 💫Case Study: Order Status & Transition
      • 📐Standardization
        • 💠Zero-Coupon Bonds
        • ⏳Fixed Maturity
      • 🏋️Collateralization
      • 🪙Tokenization
      • 🚰Liquidation
        • ⚖️Mark to Market
        • 👮‍♂️Liquidators
          • ✏️How Liquidation Works
        • 📋Liquidation Case Study
      • 🧀Protocol Fees
    • 🎓Advanced Topics
      • 📈APR vs APY
      • ➗ZC Bond Price to APR
      • 📉Discount Factor
      • 🏋️‍♀️ZC Bond Collateral
        • 🏍️ZC Collateral Case Study
      • 🧬Market Dynamics
        • ♻️Auto-Rolling
          • 💰Price Discovery for Auto-Rolling
        • 🗓️New Market Listing and Delisting
          • 🤝Itayose - Fair Price Discovery
      • 🛡️Safety Measures
        • 🚦Circuit Breaker
          • 🛑Price Range Limits
        • 🪄Base Price Adjustment
        • 🌎Emergency Global Settlement
      • ⛓️Orderbook Deep Dive
        • 🎡Orderbook Rotation
        • 🎋Red Black Tree
        • ⏯️Lazy Evaluation
        • ⏮️Genesis Value
        • 🔄Compound Factor
    • 📔Contracts and Security
    • ❓FAQs
  • Developer Portal
    • 🧑‍💻Introduction
    • 🔌API Reference
      • 📈Fixed-Rate Lending Subgraph
        • 🔍Query Examples
    • 📦SDK Reference
      • ⛽Fixed-Rate Lending SDK
      • 👛USDFC SDK
    • 🐛Bug Bounty
  • Community
    • 🤝Overview
    • 🏛️Governance
    • 🪙Tokenomics
      • 🔵Secured Finance Coin (SFC)
      • 🔶Secured Finance Points (SFP) v2
        • 🔶Secured Finance Points (SFP) v1
    • 🎗️Support & Contacts
  • Resources
    • 🖼️Media Kit
      • 🖼️Secured Finance Logo
      • 💲USDFC Logo
    • ⚖️Legal
      • 📜Terms of Use
      • 🔒Privacy Policy
      • ⚠️Risk Disclaimer
Powered by GitBook
On this page
  • Overview
  • How It Works
  • Key Parameters
  • Examples
  • Example 1: Emergency Settlement Process
  • Example 2: Multi-Asset Settlement
  • Common Questions
  • When would Emergency Global Settlement be triggered?
  • What happens to my positions during Emergency Global Settlement?
  • Can I lose money during Emergency Global Settlement?
  • How do I claim my funds after Emergency Global Settlement?
  • Can Emergency Global Settlement be reversed?
  • Related Resources

Was this helpful?

Edit on GitHub
Export as PDF
  1. Fixed-Rate Lending
  2. Advanced Topics
  3. Safety Measures

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:

  1. 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.

  2. 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.

  3. 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

Parameter
Description
Value

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

Emergency global settlement acts as a vital safeguard, protecting both user funds and the overall integrity of the protocol in unforeseen circumstances. It ensures a secure and resilient DeFi ecosystem for all participants, enhancing trust and confidence in the platform.

Common Questions

When would Emergency Global Settlement be triggered?

Emergency Global Settlement would be triggered in the following scenarios:

  1. Critical Security Breach: If the protocol experiences a significant hack or security vulnerability

  2. Severe Smart Contract Bug: If a critical bug is discovered that could compromise user funds

  3. Systemic Risk: If there's a risk of cascading failures that could affect the entire protocol

  4. Oracle Failure: If price feeds become compromised or unreliable for an extended period

  5. 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:

  1. All markets are immediately halted

  2. Your positions are valued using the cached price feeds at the time of settlement

  3. Your positions and deposits are converted to collateral tokens based on the ratios in the Token Vault

  4. You can then withdraw these tokens after the redemption process

  5. 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:

  1. You will receive the proportional value of your positions based on the Token Vault ratios

  2. If the Token Vault has insufficient funds (e.g., due to a hack), you may receive less than your full position value

  3. The settlement uses cached price feeds, which might differ slightly from market prices at that moment

  4. You won't be able to maintain your exact position structure (e.g., specific lending positions)

  5. 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:

  1. Connect your wallet to the protocol interface

  2. Navigate to the Emergency Settlement section

  3. Execute the redemption process to convert your positions to collateral tokens

  4. Withdraw your collateral tokens to your wallet

  5. This process can typically be completed in a single transaction

Can Emergency Global Settlement be reversed?

No, Emergency Global Settlement cannot be reversed:

  1. It is a one-way process designed as a last-resort safety measure

  2. Once triggered, all markets remain permanently closed

  3. The protocol would need to be redeployed with new contracts if operations were to resume

  4. This irreversibility ensures that users can safely withdraw their funds without concerns about further protocol changes

  5. It provides certainty during uncertain circumstances

Related Resources

PreviousBase Price AdjustmentNextOrderbook Deep Dive

Last updated 1 month ago

Was this helpful?

🎓
🛡️
🌎
Safety Measures
Circuit Breaker
Base Price Adjustment
Core Mechanics