3.Farming & Rewards
Earn protocol rewards. Bootstrap liquidity. Power the ecosystem.
The OPPAD Farming Module enables DeFi projects to launch sustainable yield farms where users stake LP tokens in return for token incentives. With fully on-chain emission logic, off-chain scheduling, and live analytics, this module delivers gas-efficient, secure farming without compromising flexibility.
π§± 1. Introduction
Yield farming is essential to early liquidity generation. OPPAD makes it simple. Projects can deploy farms via a no-code dashboard or API, reward LP providers, and monitor real-time dataβall in one system.
βοΈ 2. Key Features
Custom Farm Deployment: Launch new farms for any LP pair and reward token
Automated Reward Scheduler: Cron-based reward emission
Flexible Emission: Configure per-block or per-second reward rates
Multi-Farm Support: Run multiple farms concurrently
Live Metrics Dashboard: Track TVL, APR, and earnings
Emergency Controls: Pause, migrate, or stop farms via multisig
π§ 3. Architecture Overview
π 4. Farm Deployment & Configuration
4.1 Deployment Flow
Select LP Pair (e.g., OPPAD/ETH, USDT/USDC)
Set Reward Token (e.g., $OPPAD)
Emission Rate (per block or per second)
Start & End Blocks
Deposit Reward Tokens
Deploy via initializeFarm()
4.2 Configuration Parameters
Parameter
Description
LP Token Address
Contract of the LP pair
Reward Token Addr
Token to distribute
Reward Rate
Emission per block/second
Start/End Block
Active duration for the farm
Deposit Amount
Tokens allocated for emission
Harvest Interval
Minimum wait between reward claims
π§βπΎ 5. User Participation
5.1 Staking LP Tokens
Connect via MetaMask/WalletConnect
Approve LP contract
Call
deposit(amount)
Monitor staking & rewards via dashboard
5.2 Claiming Rewards
Wait for harvest interval
Call
harvest()
Optionally re-stake in a new farm
5.3 Unstaking
Use
withdraw(amount)
for standard exitUse
emergencyWithdraw()
to exit instantly (forfeiting pending rewards)
β±οΈ 6. Reward Scheduler
Off-Chain Triggers: Uses cron or AWS EventBridge
On-Chain Distribution: Calls
updatePool()
anddistribute()
Emits Events:
RewardPaid
,PoolUpdated
used for analytics
π 7. Analytics & Monitoring
Metric
Description
TVL
Total value of staked LPs (USD equivalent)
APR
Annualized yield based on current TVL and emissions
Live Charts
Real-time updates via frontend and API
Admin Alerts
Notify if TVL drops or rewards deplete
π 8. Security & Audit
β Contracts scanned via OPPAD Shield AI
β Manual audit review for public pools
β
nonReentrant
guards on staking/harvestingβ Immutable core params (rate, duration)
β Multisig admin control for pause/migrate
π 9. Integration & API
REST Endpoints
GET /farms
: List all active farmsGET /farms/{id}/metrics
: Pull TVL/APR/reward statsPOST /farms
: Admin-only farm deploymentPOST /farms/{id}/deposit
: Stake LPPOST /farms/{id}/withdraw
: Unstake or harvest
WebSocket Feeds
Subscribe to
Stake
,Withdraw
, andRewardPaid
events in real-time
Farming complements OPPAD staking and NFTs β enabling liquidity providers to earn yield, boost governance access, and support early-stage projects all at once.
Last updated