Farms
Panoptis Farms let you earn PSW rewards by staking LP tokens from the DEX. The boosted farm additionally multiplies your rewards based on your vePSW voting escrow balance, rewarding long-term participants.
Getting Started
What You Need
- LP tokens: Provide liquidity to any Panoptis pool to receive LP tokens.
- PSW tokens (optional): Lock PSW to get vePSW and boost your rewards by up to 2.5×.
Staking LP Tokens
Step 1 — Approve the Farm
Before staking, approve the farm contract to transfer your LP tokens:
lpToken.approve(farmAddress, amount)Step 2 — Deposit
farm.deposit(pid, amount)pid is the pool ID for the LP token you want to stake. Depositing also automatically harvests any pending rewards you’ve accrued so far.
Step 3 — Earn Rewards
Rewards start accruing instantly. Your share of rewards per second is:
For boosted pools, yourStake is replaced by your boosted amount (see below).
Step 4 — Harvest
farm.harvest(pid, receiver)Harvests pending rewards without changing your staked amount. You can harvest at any time.
Step 5 — Withdraw
farm.withdraw(pid, amount)Unstakes your LP tokens and simultaneously harvests pending rewards.
Emergency Withdrawal
farm.emergencyWithdraw(pid, receiver)Returns your staked LP tokens immediately, forfeiting all pending rewards. Use only in exceptional circumstances.
Boosted Farming (vePSW)
The PanoptisFarmV2Boosted contract multiplies your reward weight based on your vePSW balance. Maximum boost is 2.5× (configurable per pool).
How Your Boost Is Calculated
The BoostController computes your boost every time you interact with the boosted farm:
- At zero vePSW you receive 1× (base rewards).
- At
requiredVeor more vePSW you receive the maximum boost (up to 2.5×). - Between those points your boost scales linearly.
Refreshing Your Boost
Your boost is recalculated automatically on every deposit, withdrawal, and harvest. You can also force a refresh without changing your position:
farm.refreshBoost(pid, user)This is useful after locking more PSW or extending your lock — the farm won’t pick up the increased vePSW balance until a refresh.
Locking PSW for vePSW
To participate in boosted farming and governance, lock PSW tokens in the VePSW contract.
Create a Lock
vePSW.createLock(amount, unlockTime)unlockTimemust be between 7 days and 4 years from now.- Unlock times are rounded to the nearest Thursday (weekly boundary).
Increase Your Lock
Add more PSW to your existing lock:
vePSW.increaseAmount(additionalAmount)Extend your lock duration:
vePSW.increaseUnlockTime(newUnlockTime)You cannot shorten an existing lock.
Voting Power Decay
Your vePSW balance decays linearly as you approach your unlock date:
A lock of 100 PSW for the full 4 years starts with 100 vePSW and decreases to 0 at expiry. To maintain boost levels, extend your lock periodically.
Withdraw After Expiry
vePSW.withdraw()After the unlock date, your full PSW amount is returned. No penalties.
Reward Rates and Pool Weights
Each farm pool has an allocation point weight. The proportion of total global rewards flowing to a pool is:
Governance adjusts allocation points to direct incentives. You can view current pool configurations by reading poolInfo(pid) from the farm contract.
Emission Schedule
Farm rewards are funded from the treasury via the EmissionManager contract, which enforces an epoch cap on how many tokens can be sent per period. This prevents sudden large emissions that would spike circulating supply. Rates therefore increase gradually and predictably.
Buyback and Burn
A portion of protocol revenue is used to buy back PSW on the open market and permanently burn it. This creates deflationary pressure proportional to protocol activity, benefiting long-term holders and stakers.
Key Contract Functions Reference
Farm / Boosted Farm
| Function | Description |
|---|---|
deposit(pid, amount) | Stake LP tokens and harvest pending rewards |
withdraw(pid, amount) | Unstake LP tokens and harvest pending rewards |
harvest(pid, receiver) | Claim pending rewards without unstaking |
emergencyWithdraw(pid, receiver) | Emergency unstake, forfeits rewards |
refreshBoost(pid, user) | Recalculate user boost after vePSW change |
pendingReward(pid, user) | View claimable rewards |
poolInfo(pid) | Pool configuration (allocPoint, accRewardPerShare, totalStaked) |
userInfo(pid, address) | User stake and rewardDebt |
rewardPerSecond() | Global reward emission rate (tokens/second) |
totalAllocPoint() | Sum of all pool allocation points |
VePSW
| Function | Description |
|---|---|
createLock(amount, unlockTime) | Lock PSW and create vePSW position |
increaseAmount(amount) | Add PSW to existing lock |
increaseUnlockTime(newTime) | Extend existing lock duration |
withdraw() | Withdraw PSW after lock expiry |
balanceOf(address) | Current vePSW balance (decays over time) |
locked(address) | View lock amount and unlock time |
totalLocked() | Total PSW currently locked in contract |
BoostController
| Function | Description |
|---|---|
getBoostBps(user, pid, amount) | Returns boost in basis points (10000 = 1×) |
poolConfigs(pid) | Pool-specific boost configuration |