Liquidity and Staking Integration
Integrate liquidity and staking workflows with clear state transitions and operational caveats.
#Purpose
Covers liquidity and staking action flows, lifecycle transitions, and practical constraints for production integrations.
#Integration prerequisites
- Supported assets, pools, and staking products are mapped to canonical IDs.
- Client UX communicates lockups, cooldowns, and withdrawal windows.
- Reconciliation logic can track accrued rewards and principal transitions.
#Request and response patterns
- Action requests return operation ID and initial state context.
- Status endpoints expose pending, active, cooling_down, withdrawable, completed outcomes.
- Event notifications communicate milestone transitions and failures.
#Lifecycle and state model
- Submit liquidity or staking operation with validated asset/amount context.
- Track operation through pending execution into active position state.
- For exits, follow cooldown or unlock states before withdrawal completion.
- Confirm terminal completion and reconcile balances and rewards.
#Error and failure taxonomy
- Constraint violations such as minimum amounts or pool ratio limits.
- State-dependent failures when attempting early withdrawal during lockup.
- Reward accounting mismatch due to delayed state ingestion.
#Retry and idempotency guidance
Retry only after verifying the current position state to avoid duplicate supply/stake operations.
#Observability and debugging entry points
- Time to active and time to withdrawable by product type.
- Failure rate by operation and constraint class.
- Position-level reconciliation checks for principal and rewards.