OADA Smart Contract API
This guide provides a comprehensive overview of the core functionalities in the OADA UI project, helping developers understand the system's logic and architecture.
System Overview
OADA UI is a decentralized finance (DeFi) application built on the Cardano blockchain that enables users to:
Mint and manage OADA tokens
Stake OADA tokens to earn yields
Participate in epoch-based stake auctions
Lock tokens for enhanced rewards
Track portfolio performance and TVL
Core System Components
System Flow
Token Lifecycle
Users mint OADA tokens using ADA
OADA tokens can be staked to receive sOADA
sOADA tokens can be unstaked back to OADA
OADA tokens can be locked to receive OPTIMiz
OPTIMiz tokens can be converted to OPTIM
Staking Mechanism
Users stake OADA tokens
Receive sOADA tokens representing their stake
Earn yields based on protocol performance
Can unstake at any time (subject to cooldown)
Auction System
Runs on epoch basis (5 days)
Users submit bids with desired APY
System calculates clearing rate
Successful bidders receive rewards
Unsuccessful bids are returned
Lock System
Users lock OADA tokens for fixed periods
Receive OPTIMiz tokens as receipt
Earn enhanced rewards based on lock duration
Early withdrawal available with penalties
Key Technical Concepts
Tokens
OADA: Synthetic ADA stable token
sOADA: Staking receipt token
OPTIMiz: Lock receipt token
O: Governance token (migrated from OPTIM)
Smart Contract Architecture
Policy IDs for token minting
Staking contract for yield distribution
Auction contract for bid management
Lock contract for time-locked tokens
State Management
Redux for UI state
Blockchain state for on-chain data
Local storage for user preferences
WebSocket for real-time updates
Security Model
Wallet-based authentication
Transaction signing
Rate limiting
Input validation
Error handling
System Interactions
System Architecture
Last updated