Optim Finance
  • INTRODUCTION
    • Introduction
    • Roadmap
  • OADA
    • Overview
    • OADA 🟣 and sOADA 🟢
    • Flow of Funds
    • User Guides
      • Passive yield with sOADA
      • Epoch Stake Auction
    • AMOs
      • Splash DEX AMO
      • Stake Auction AMO
      • Staking AMO
    • UNHCR Donation Module
      • Automated Yield Donation Protocol
      • NFT Impact Certificate
      • Integration with the OADA Ecosystem
      • Humanitarian Partnership
      • Future Extensions
    • Governance
    • Resources
  • OTOKEN Framework
    • Introduction
      • Key Benefits
      • Who is it for?
      • Inspirations & Applications
    • Framework
      • Key Concepts
      • Use Cases
      • OTOKENs
    • Core Concepts
      • OTOKEN and sOTOKEN
      • Algorithmic Market Operations (AMOs)
      • Balancing Stability, Yield, and Adaptability
    • System Architecture
      • OTOKEN Policy
      • Staking AMO
      • Collateral Management AMO
    • Extensions & Other Modules
      • DEX AMO (Liquidity & Peg Stability)
      • Stake Auction AMO
      • Borrowing & Lending AMOs
      • Other AMOs & Opportunities
    • Multiple OTOKEN Deployments
      • Ecosystem Synergy
      • Not Just Synthetic Assets
    • Vision
      • Key Pillars of the OToken Framework
      • Future Directions & Opportunities
      • An Invitation to Innovate
    • Bug Bounty Program
  • LIQUIDITY BONDS
    • Overview
    • Bond App FAQ
    • Use Cases
      • ISPO Bonds
      • SPO Bonds
    • Bond Architecture
      • Validators
      • High Level Workflow
      • Scripts Technical
      • Transaction Flow
      • Pooled Loans
    • Guides for SPOs
      • Bond Creation
      • Bond Sales
      • SPO Bond Issue Summary
      • Bond Verification
    • Liquidity Bonds Audit
  • OUSD
    • OUSD Reserves
      • Reserve Criteria
        • Stability and Reputation
        • Compliance
        • Smart Contract Security
    • Ongoing Reserves Management
      • Reserve Asset Valuation Calculation
      • Dynamic Reserve Asset Adjustment Metrics
        • Dynamic Reserves Adjustment
    • Yield, Staking, and Flow of Funds
      • Yield Modules
        • OUSD DEX AMO
        • Future Modules (v2)
      • Staking AMO
      • sOUSD Redemption Mechanism
    • Peg Protection
      • Market Depth and Liquidity
    • Governance and Risk Framework
      • Risk Capital Requirements
      • First-Loss Capital Structure
      • Asset Allocation Framework
        • Static Governance Parameters
        • Dynamic Allocation System
    • Financial Engineering Audit
  • Leviathan
    • System Architecture
      • Background
      • Concurrency Limitations
      • Complexity in Transaction and Contract Management
    • Core Concepts
      • Deterministic Transaction
        • Guaranteed Transaction
      • Instant Finality
        • Liveness and Safety
        • Probabilistic Finality vs Instant Finality
      • Account Abstraction
        • Concept of Account Abstraction
        • Technical Implementation
        • Security and Operational Implications
      • Intent Based Transactions
        • The Infrastructure and Process of IBTs
        • Declarative Constraints in IBTs
      • Layer 2
        • Types of Layer 2 Solutions
      • Sequencers
        • Core Functions of Sequencers
        • Role in Layer 2 Rollups
        • Challenges
    • System Components
      • Understanding the System Components
      • Optim-Account (Intents to enable tx chain)
        • User Interaction and Intent Submission
        • Intent Structuring and Authentication
        • Smart Contract Functionalities and Operational Parameters
        • The Necessity of an Account-Based Framework
        • Account Abstraction and Its Role in Leviathan
      • Leviathan Sequencer System (tx chain building)
        • The Role of the Leviathan Sequencer System in Conjunction with The Optim Account
        • Sequencing and Ordering of Transactions
        • The Role of Time in the System
        • The Pragmatic Leviathan: Dealing with Potential Changes
      • The Role of OADA in the Leviathan System
        • Operational Simplification of Staking Mechanisms via OADA Integration
        • Facilitating Time Dilation and Composability
    • Processes
      • Entering Leviathan
      • Transaction Execution
      • Leaving Leviathan
    • High Level Overview
      • System Design
        • Account Abstraction Functionality
        • Guaranteed Transactions
        • Instant Finality
        • Unbreakable Transaction Chaining
        • Layer 2 Execution Environment
        • Future Sequencer Network
      • System Context
        • Limitations of current transactions chaining paradigm
        • Limitations of current inter dApp composability issues
        • Explanation of basic design and non-custodial asset inputs
        • Intent Based Transactions
        • Account Base vs eUTxO model app architecture
      • Theoretical Applications
  • GOVERNANCE
    • Governance Overview
      • Proposal Temp Check
      • Governance Proposal
        • On/Off Chain Mechanics
      • ODAO
    • Tokenomics
      • Categories
      • Vesting
    • Optim DAO Wallets
    • Protocol Profits
  • GUIDES
    • Transaction Chaining
      • Background
      • Overview
      • Pool Transaction Chaining
    • OPTIMiz Conversion
  • ODAO Stack
    • Introduction
    • Design Principles
    • Why Optim DAO Stack?
      • Current Limitations
      • ODAO Solutions
    • Key Features
      • Snapshot Voting
      • Treasury Management
      • Proposal Execution
    • System Architecture
      • Modular Framework
      • On-Chain Logic
      • Off-Chain Operations
      • User Interfaces
    • Core Modules
      • Snapshot Voting Module
      • Treasury Management Module
      • Proposal Execution Module
    • Future Roadmap
      • Potential Future Enhancements
      • Long Term Vision
  • OADA UI
    • Setup
      • Installation
      • Development Workflow
      • Troubleshooting
      • Development Tips
      • Open Source Contributions
      • FAQ
    • Key Functionalities
      • Wallet Integration
      • Dashboard
      • Transaction Management
        • UTxO Management
        • Transaction Creation and Conversion
        • Transaction Monitoring
      • Real-time Updates
        • Portfolio Value Tracking
        • Transaction Status Monitoring
    • OADA Smart Contract API
      • Minting OADA
      • Staking OADA
      • Unstaking sOADA
      • Epoch Stake Auction
        • Bid Calculation Functions
        • Auction Actions
        • Bid Form Component
        • Auction Dashboard
    • Tutorials
      • Environment Setup and Installation
      • Understanding the Project Structure
      • Basic Configuration and Customization
      • Working with Components
      • State Management and Data Flow
      • Wallet Integration and State Management
      • Smart Contract Integration
      • Advanced UI Customization
      • Testing and Quality Assurance
Powered by GitBook
On this page
  • Core Types and Interfaces
  • Key features of the Epoch Stake Auction system include:
  1. OADA UI
  2. OADA Smart Contract API

Epoch Stake Auction

The Epoch Stake Auction system allows users to participate in stake auctions by placing bids for staking rights. This section details the core components and their implementations.

Core Types and Interfaces

The auction system is built on several key types and interfaces that define the structure of bids and auction data.

The BidType type defines the two possible bid types:

// src/oada/actions.ts
// Defines the possible types of bids in the stake auction
// BidTypePartial: Allows partial filling of the bid
// BidTypeFull: Requires the entire bid to be filled or none at all
export type BidType = "BidTypePartial" | "BidTypeFull";

The StakeAuctionBidRequest interface defines the structure for submitting a bid:

// src/oada/actions.ts
// Interface for submitting a stake auction bid
// Contains all necessary information for placing a bid
type StakeAuctionBidRequest = {
  bidType: BidType; // Type of bid (partial or full)
  bidApy: Big; // Annual Percentage Yield in basis points
  bidValue: GYValueOut; // Value being bid (in ADA or OADA)
  stakeAddressBech32: string; // Stake address for rewards
};

The StakeAuctionBidView interface defines the structure for viewing bid information:

// src/oada/actions.ts
// Interface for viewing stake auction bid information
// Contains all relevant information about an existing bid
export type StakeAuctionBidView = {
  txOutRef: string; // Transaction reference
  assetClass: string; // Asset being bid (ADA or OADA)
  apy: number; // Annual Percentage Yield
  amount: number; // Bid amount
  ownerPkh: string; // Public key hash of bid owner
  bidType: BidType; // Type of bid
  stakeAddressBech32: string; // Stake address for rewards
};

The BidView interface defines the structure for displaying bid information in the UI:

// src/oada/view.ts
// Interface for displaying bid information in the UI
// Contains formatted values for user display
export type BidView = {
  id: string; // Unique identifier for the bid
  asset: string; // Asset type (ADA or OADA)
  apy: string; // Formatted APY with % symbol
  amount: number; // Raw bid amount
  amountFormatted: string; // Formatted bid amount with suffix
  requestedSizeFormatted: string; // Formatted requested stake size
  bidLock: string; // Formatted duration of bid lock period
};

Key features of the Epoch Stake Auction system include:

  1. Bid Types

    • Partial fill bids that can be filled in portions

    • Full fill bids that must be filled entirely or not at all

  2. Bid Calculation

    • Dynamic APY calculation based on market conditions

    • Requested stake size calculation based on bid amount and APY

    • Clearing rate determination through binary search

  3. Bid Management

    • Place new bids with specified amounts and APY

    • Cancel existing bids

    • Track bid status and history

  4. Market Interface

    • Real-time order book display

    • Market and limit order types

    • Currency selection (ADA or OADA)

    • Bid adjustment capabilities

  5. Dashboard Features

    • Current auction statistics

    • Bid distribution visualization

    • APY range display

    • Volume tracking

The system provides a comprehensive interface for users to participate in stake auctions, with support for various bid types and real-time market information.

PreviousUnstaking sOADANextBid Calculation Functions

Last updated 1 month ago