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
  • Understanding Order Status Transitions
  • Key Parameters
  • Order Status and Order Types
  • Orderbook Scenario
  • Examples
  • Market Orders
  • Overlapping Limit Orders
  • Non-Overlapping Limit Orders
  • Common Questions
  • What happens to my order if it's partially filled?
  • Why would my market order get blocked?
  • Can I modify an order that's already in the orderbook?
  • What's the difference between an order being killed versus blocked?
  • What happens to my orders when a market matures?
  • Related Resources

Was this helpful?

Edit on GitHub
Export as PDF
  1. Fixed-Rate Lending
  2. Core Mechanics
  3. Order Book System
  4. Order Life Cycle

Case Study: Order Status & Transition

Understanding order statuses and transitions through practical examples in the Fixed-Rate Lending Protocol

PreviousOrder Life CycleNextStandardization

Last updated 1 month ago

Was this helpful?

Overview

This case study explores the entire spectrum of order statuses through detailed examples, incorporating our platform's price range limit mechanism, , for practical understanding.

How It Works

For an in-depth understanding of the loan lifecycle, please visit the '' section.

The chart below illustrates how different order types (Market, Overlapping Limit, and Non-Overlapping Limit) interact with various order statuses throughout their lifecycle. This chart, combined with the Order Life Cycle explanation, provides a comprehensive understanding of how orders progress through the system and how exceptional cases are handled.

When using this chart:

  1. First identify your order type (column)

  2. Then follow the possible statuses (rows) that apply to your order type

  3. Note that some statuses are marked as "Not applicable" for certain order types

  4. Pay attention to "Final" statuses which represent the end of an order's lifecycle

  5. Combined states (like "Partially Filled & Blocked") indicate orders that were partially executed before reaching a terminal state

This chart works in conjunction with the Circuit Breaker mechanism, which prevents extreme price movements by limiting the range within which orders can execute.

Understanding Order Status Transitions

The chart below serves as a comprehensive guide to understanding how orders move through different states in the Fixed-Rate Lending Protocol. Each order type follows a specific path through the system:

  • Market Orders: These are intended for immediate execution and typically transition directly to "Filled" status if there's sufficient liquidity. If there's partial liquidity, they may become "Partially Filled" before reaching a terminal state like "Killed" or "Blocked".

  • Overlapping Limit Orders: These orders match with existing orders in the orderbook and can be executed immediately. They may be "Filled" completely, "Partially Filled" (with the remainder staying open), or transition to "Cancelled" or "Expired" states if the user cancels them or they reach maturity.

  • Non-Overlapping Limit Orders: These orders don't match with existing orders and remain "Open" in the orderbook. They can later transition to "Partially Filled", "Filled", "Cancelled", or "Expired" states depending on market conditions and user actions.

The exceptional cases are handled through specific status transitions:

  • Orders that would execute outside the Circuit Breaker price range become "Blocked"

  • Orders that can't be filled due to insufficient liquidity become "Killed"

  • Orders that reach maturity without being filled become "Expired"

By understanding these transitions, users can better predict how their orders will behave under different market conditions and take appropriate actions to manage their positions.

Key Parameters

Parameter
Description
Value

Order Statuses

Possible states an order can be in

Open, Partially Filled, Filled, Killed, Blocked, Cancelled, Expired

Final Statuses

Order states that cannot transition further

Filled, Killed, Blocked, Cancelled, Expired

Circuit Breaker Range

Price range within which orders can be executed

±2% from last price (in example)

Order Types

Types of orders that can be placed

Market, Limit (Overlapping and Non-Overlapping)

Order Sides

Sides of the orderbook

Buy (Lend), Sell (Borrow)

Order Status and Order Types

Status \ Order Type
Market Order
Overlapping Limit Order
Limit Order

Open

Not applicable; enters immediate execution

Rare; unless no overlapping order

Waits for the market to reach the limit price

Partially Filled

Only used as a combined state; no remaining orders (ex. Partially Filled & Blocked)

Partial execution if not enough liquidity; remains until further filled or terminated

If the market reaches the limit price but not fully executable due to liquidity, stays until more activity

Filled (Final)

Immediately fully executed at current market prices with sufficient liquidity

Fully executed once the market fully meets the limit price

Fully executed once the market fully meets the limit price

Killed (Final)

Removed if cannot be fully executed due to lack of liquidity

Not applicable; remains in the market as Partially Filled or Open

Not applicable; remains in the market as Partially Filled or Open

Blocked (Final)

Removed if cannot be fully executed due to circuit breakers

Not applicable; remains in the market as Partially Filled or Open

Not applicable; remains in the market as Partially Filled or Open

Cancelled (Final)

Not applicable as they are executed immediately

Can be canceled before execution or after being Partially Filled

Can be canceled at any point before being fully executed

Expired (Final)

Not applicable as they are executed immediately

Expires if not executed within a specific timeframe after being Partially Filled

Expires if the set timing (ex. maturity) passes without full execution

Orderbook Scenario

Our scenario unfolds within the bounds of an order book, structured around three key order types: 'Market Order', 'Overlapping Limit Order', and 'Non-Overlapping Limit Order'. Let's consider the following order book setup:

Price | Amount
-------------
  93  |  0
  92  |  0     <- Upper Circuit Breaker Limit
  91  |  10
  90  -- Last Price
  89  |  5
  88  |  0     <- Lower Circuit Breaker Limit
  87  |  10

Examples

Market Orders

Filled

  • Example: Buy 10 at market.

  • Transition: Order is Filled purchasing 10 units at 91.

Partially Filled & Killed

  • Example: Buy 20 at market.

  • Transition: Order is Partially Filled with 10 units at 91, remaining 10 units are Killed due to lack of liquidity up to the upper limit.

Partially Filled & Blocked

  • Example: Sell 10 at market.

  • Transition: Order is Partially Filled with 5 units at 89, remaining 5 units are Blocked then Killed due to no liquidity at the lower limit.

Overlapping Limit Orders

Filled

  • Example: Buy 10 at 91.

  • Transition: Order is Filled with 10 units at 91.

Partially Filled

  • Example: Buy 15 at 93.

  • Transition: Order is Partially Filled with 10 units at 93. Remaining 5 units are kept open at 93 but cannot be executed until the market moves and the circuit breaker price is adjusted to allow execution.

Canceled

  • Example: After being partially filled, cancel the remaining order.

  • Transition: Remaining order is Canceled.

Expired

  • Example: Buy 15 at 91; remaining 5 units are kept open. Then no fill and lending market matures.

  • Transition: Order Expires after the maturity time passes.

Non-Overlapping Limit Orders

Open

  • Example: Buy 10 at 89.

  • Transition: Order is Open, awaiting a match.

Partially Filled

  • Example: Buy 10 at 89 (total 15 Open on the orderbook), then another trader sells 10 at 89.

  • Transition: Order is Partially Filled with 5 units at 89, 5 units remain open.

Canceled

  • Example: After being partially filled, cancel the remaining order.

  • Transition: Remaining order is Canceled.

Expired

  • Example: Buy 10 at 89, no fill and lending market matures.

  • Transition: Order Expires after the maturity time passes.

Common Questions

What happens to my order if it's partially filled?

When an order is partially filled, the filled portion becomes a position, while the unfilled portion remains in the orderbook as an open order. You can choose to leave it open, cancel it, or wait for it to be filled. For market orders, the unfilled portion may be killed or blocked depending on market conditions and circuit breaker limits.

Why would my market order get blocked?

Market orders can be blocked when they would execute at a price outside the circuit breaker limits. This is a safety mechanism to prevent extreme price movements and protect the market from manipulation. When a market order is blocked, the unfilled portion is killed and removed from the orderbook.

Can I modify an order that's already in the orderbook?

No, you cannot modify an existing order. If you want to change the price or amount, you'll need to cancel your existing order and place a new one with the updated parameters. This ensures price-time priority is maintained fairly in the orderbook.

What's the difference between an order being killed versus blocked?

  • Killed: An order is killed when there's insufficient liquidity to fill it completely. This typically happens with market orders when there are no more matching orders in the orderbook.

  • Blocked: An order is blocked when its execution would violate the circuit breaker price limits. This is a safety mechanism to prevent extreme price volatility.

What happens to my orders when a market matures?

Any open or partially filled orders in a market that reaches maturity will automatically expire. This means they are removed from the orderbook and will not be executed. Any filled portions of orders have already become positions and will be subject to the auto-rolling mechanism.

Related Resources

🔦
🧩
🪃
💫
the Circuit Breaker
Order Life Cycle
Order Life Cycle
Order Types
Orderbook Mechanics
Circuit Breaker