Farms & Liquidity Mining
Panoptis DEX includes a fully on-chain farming infrastructure that distributes PSW token rewards to users who stake LP tokens and participate in long-term governance. The system is a substantial evolution of the MasterChef pattern, adding boost mechanics, capped emissions, and automated buyback-and-burn.
Core Concepts
Staking LP Tokens
When users provide liquidity to a Panoptis pool they receive LP tokens representing their share of that pool. These LP tokens can be staked in a farm contract to earn PSW rewards on top of trading fees. Rewards accrue continuously and can be claimed at any time.
Allocation Points
Each farming pool has an allocation point weight (allocPoint). The fraction of total global emissions that a pool receives is:
Governance controls pool allocations, directing incentives toward strategically important liquidity.
Reward Accounting — accRewardPerShare
Rewards are tracked efficiently using a global accumulator per pool:
Each user’s claimable rewards are:
rewardDebt is reset on every deposit, withdrawal, or harvest to ensure users are only paid for the period they were staked.
Boosted Farming
The PanoptisFarmV2Boosted contract extends base farming with a multiplier system powered by vePSW voting escrow balance. Users who lock PSW for extended periods receive higher reward weights.
How Boosts Work
- A user stakes LP tokens in a boosted pool.
- The farm calls
BoostController.getBoostBps(user, pid, amount). - The controller computes a boost in basis points (10,000 = 1×, 25,000 = 2.5×).
- The user’s boosted amount replaces their raw staked amount in reward calculations:
- Pool reward share is computed against
totalBoostedStakedrather than total raw stake.
This means a user with a 2.5× boost earns 2.5 times the rewards per LP token compared to an unboosted participant, subject to their vePSW balance.
Boost Controller Formula
The BoostController determines boost levels using a saturation curve:
Each pool can have its own vePerLp requirement and max boost cap. The controller returns baseBps (minimum 1×) on any failure, so stakers always receive at least base rewards.
Voting Escrow — vePSW
vePSW is a non-transferable, time-decaying voting weight obtained by locking PSW tokens. It is the core input to the boost calculation.
Lock Mechanics
- Users create a single lock position with a chosen amount and unlock time.
- Minimum lock: 7 days. Maximum lock: 4 years.
- Unlock times are normalized to weekly boundaries.
- A user can increase the amount or extend the duration of an existing lock, but cannot shorten it.
- All PSW is returned at expiry (no burning).
Voting Power Decay
Voting power decays linearly from full weight on the day of locking to zero at the unlock date. This means boost levels gradually decrease unless the lock is extended, creating sustained incentives for long-term commitment.
Emission Management
The EmissionManager contract governs the rate at which the treasury funds farm reward reservoirs, preventing sudden inflation spikes:
- Governance sets an epoch cap — the maximum PSW that can be sent to farms within one epoch window.
- Funding calls are rejected if they would exceed the epoch cap.
- At the start of each new epoch the cap resets, allowing another round of funding.
This system decouples treasury policy from farm accounting and ensures a smooth, predictable emission schedule regardless of governance decisions.
Buyback and Burn
Excess protocol revenue can be routed through the BuybackBurnManager:
- The manager holds non-PSW tokens accumulated from fees.
- Authorized operators trigger a buyback: the manager swaps these tokens for PSW on a UniswapV2-compatible AMM.
- All purchased PSW is sent to the burn address (
0x000...dEaD), permanently removing it from supply.
Slippage is controlled via maxAllowedSlippageBps, and all token movements are executed with SafeERC20. This creates deflationary pressure tied directly to protocol activity.
PSW Token
PSW is the Panoptis DEX native token:
| Property | Value |
|---|---|
| Standard | ERC-20 + ERC-2612 (permit) |
| Symbol | PSW |
| Decimals | 18 |
| Fixed Supply | 50,000,000 |
| Minting | None after deployment |
The fixed supply combined with emission caps and buyback-burn creates a bounded, deflationary token economy.
Security Design
| Concern | Mitigation |
|---|---|
| Reentrancy | ReentrancyGuard on all deposit/withdraw/harvest paths |
| Token transfers | SafeERC20 wrapper throughout |
| Fee-on-transfer tokens | Net-amount accounting after transfer |
| Emergency exit | emergencyWithdraw() allows unstaking without reward claim |
| Boost controller failure | Fallback returns 1× boost so users always receive base rewards |
| Emission spikes | Epoch cap enforced by EmissionManager |
Contract Summary
| Contract | Role |
|---|---|
PanoptisFarm | Classic MasterChef — multi-pool staking and rewards |
PanoptisFarmV2Boosted | Enhanced farm with vePSW boost multipliers |
BoostController | Computes per-user boost basis points from vePSW balance |
VePSW | Voting escrow — lock PSW to earn boost and governance power |
EmissionManager | Epoch-capped treasury funding for farm rewards |
BuybackBurnManager | Automated PSW buyback and permanent burn |
PSWToken | Native ERC-20 protocol token (fixed supply, permit support) |