Introduction
The Staking API allows users to stake their cryptocurrency holdings and earn yield over time. Crocante Financial Platform offers both flexible (variable APY) and fixed-term staking products across multiple cryptocurrencies.How Staking Works
Staking on the Crocante platform follows this lifecycle:- Browse Available Products - Query available staking types to see supported cryptocurrencies, APY rates, and terms
- Create Stake - Lock your cryptocurrency into a staking position
- Earn Yield - Your position accumulates yield over time based on the APY
- Redeem Position - Unlock your staked amount plus accumulated yield
Staking Modes
The platform supports two staking modes:Variable Staking
- Flexible duration with no fixed lock-up period
- Variable APY that may change over time
- Can be redeemed at any time (check
redeemableAtfield) - Ideal for users who want liquidity flexibility
Fixed Staking
- Fixed duration specified in days (
durationDays) - Fixed APY guaranteed for the entire duration
- Can only be redeemed after the lock-up period ends
- Higher APY rates in exchange for commitment
Key Concepts
Staking Types
Each staking product is identified by atypeId and defines:
currencyId- The cryptocurrency that can be staked (e.g., BTC, ETH, USDT)mode- EitherVARIABLEorFIXEDapy- Annual Percentage Yield as a decimal stringminAmount- Minimum amount required to stakedurationDays- Lock-up period in days (only for FIXED mode)
Staking Operations
Each stake creates anoperation record that tracks:
- Operation ID and timestamps (
openedAt,updatedAt,closedAt) - Status (
ActiveorRedeemed) - Owner and creator information
Yield Calculation
Staking positions track multiple yield metrics:yield- Current accumulated yieldestRedeemYield- Estimated yield at redemption timeinitialAPY- APY at time of stake creationapy- Current APY (may differ for variable products)
API Endpoints
The Staking API consists of five endpoints:| Endpoint | Method | Purpose |
|---|---|---|
EP_STAKING_TYPE | GET | List available staking products |
EP_STAKING | POST | Create a new stake |
EP_STAKING_ACTIVE | GET | List active staking positions |
EP_STAKING_REDEEMED | GET | List redeemed staking positions |
EP_STAKING_REDEEM | POST | Redeem an active stake |
Typical Workflow
Response Format
All staking endpoints follow a consistent response structure:Error Handling
Staking operations may fail for several reasons:- Insufficient balance for the staking amount
- Amount below
minAmountthreshold - Attempting to redeem before
redeemableAtdate - Invalid
typeIdoropId
Next Steps
Staking Types
Explore available staking products and their parameters
Operations
Learn the API endpoints for staking operations
