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:
The BidView interface defines the structure for displaying bid information in the UI:
Key features of the Epoch Stake Auction system include:
Bid Types
Partial fill bids that can be filled in portions
Full fill bids that must be filled entirely or not at all
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
Bid Management
Place new bids with specified amounts and APY
Cancel existing bids
Track bid status and history
Market Interface
Real-time order book display
Market and limit order types
Currency selection (ADA or OADA)
Bid adjustment capabilities
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.
Last updated