Waivio

Universal Staking Module Staking and Protocol Owned Liquidity Plugin for Ouroboros

0 comments

kiraxoy47.2916 hours agoHive.Blog9 min read

Universal Staking Module

Introduction

The **Universal Staking Module (USM)** is a comprehensive suite of smart contracts which impact how liquidity provision and token staking are managed across Uniswap V3 and ERC20 assets within Ouroboros deployments. It unifies multiple staking paradigms into a single, cohesive system while maintaining the flexibility demanded by modern DeFi protocols.

**Core Architecture**

The Universal Staking Module consists of three primary components:

**1. UniswapV3 Enhanced Staker** - A sophisticated NFT position management system that extends standard Uniswap V3 staking with advanced features including protocol-owned liquidity (POL) mechanics, restricted tick ranges, and dual reward accrual mechanisms to cater for contested and non-contested liquidity setups.

**2. ERC20 Staking Manager** - A versatile staking platform for standard ERC20 tokens, supporting both locked and unlocked incentive structures with flexible reward distribution schedules.

**3. Emission Controller** - A unified reward distribution engine that handles complex vesting schedules, including dripped rewards and exponentially vested rewards. Both types can include forfeitable claims, along with staged mint cycles, and time delayed initial unlocks.

**Key Usecases for Ouroboros**

**Protocol-Owned Liquidity (POL)** - Positions can be designated as permanent protocol liquidity, creating a guaranteed liquidity base that strengthens protocol stability and reduces mercenary capital risks.

**Dual Reward Accrual Mechanisms to Target Existing LP setups** - Support for both traditional liquidity-weighted rewards and share-weighted distribution models, allowing protocols to optimize for different user behaviors and market conditions. This allows the targeted incentivisation of protocol owned liquidity formation against pre-existing locked liquidity pools, or the creation of newly formed full range liquidity pools for the purposes of constructing reliable onchain oracles.

**Addition of Time Locked Incentives for ORX -** brings additional yield sources to ORX

Types of Locked Stakes

Incentives offer a variety of configuration and participation settings. Most of these will allow users to enter and exit stakes at will, but some, will ***only allow users to enter,*** and then exit at either a predefined, or undefined future date.

ERC20 Locked Stakes

In the context of ERC20 single asset stakes, locked incentives are marked as 'Time Locked' on the incentive card. Once staked into those incentives, a user must serve the full term of the stake.

To know when the term ends, you can either look at the timeline component to see time remaining, or hover over the bar to see the exact end date. Critically, users do not decide the terms of the lockup. A user who locks half way through the incentive duration, will be locked for half the time as those who locked on day 1, but receive half the rewards.

UniswapV3 Protocol-Owned-Liquidity Incentives

In the context of LP stakes, locked incentives are marked as 'POL' on the incentive card. Once a liquidity NFT is staked in a POL incentive, **it cannot be withdrawn from the platform until explicitly released.**

**Important Considerations for POL/Locked liquidity NFTs**

  1. **You should assume that the duration of the lock is indefinite. The facility to release the lock, is largely so that users can reclaim their tokens in the event that they are no longer needed by the platform OR for the case where USDx locked in a liquidity pool, is needed for some other purpose.**

  2. **POL Incentives are likely for stable asset pairs, but in the event that a volatile pair is listed, please be mindful that if those tokens are eventually released, you will not receive the same amount of each back due to Impermanent Loss (IL).**

  3. Most if not all locked liquidity incentives, will fall into well defined ranges. However, in the unlikely event that an open ended incentive is created from a liquidity range point of view, please be aware that if your provided NFT falls out of range of the active liquidity on UniswapV3, it may not earn rewards or trading fees.

**Key Summary of Locked Incentives**

  1. **Single Asset stakes must serve their full term, and will be automatically released after.**

  2. **Liquidity NFTs become permanently locked, but can move between incentives within the platform.**

  3. **Liquidity NFTs can be released from the platform at a future date. This becomes particularly nice if the supplied NFT contains a stable pair, as it may act as a type of savings account for the user.**

**ERC20 Staking System**

The ERC20 Staking Manager enables protocols to create targeted incentive programs for any standard token. Stakers deposit their tokens into specific incentive pools where rewards accumulate continuously based on their proportional share of the total staked amount. Each incentive operates independently with its own reward token, duration, and distribution parameters, allowing multiple programs simultaneously for different user segments or strategic goals.

**Key Features:**

* **Flexible Lock Mechanisms** - Choose between freely withdrawable stakes or time-locked commitments with enhanced rewards

* **Multiple Emission Styles**:

* Regular - Instant transfer upon claiming

* Dripped - Linear release over specified period

* Vested - Exponential release

* Staging Periods - Optional delay between claiming and receiving rewards

* Forfeitable Allocations - One-shot emissions returning unclaimed rewards after first claim

* **Grace Period Protection** - Configurable window after program ends before creators can reclaim funds

* **Refundee System** - Automatic return of unclaimed rewards to designated address

**Uniswap V3 Staking System**

The enhanced Uniswap V3 Staker manages liquidity NFT positions with unprecedented control over where and how liquidity is deployed. Liquidity providers stake their position NFTs to earn rewards while maintaining the ability to collect trading fees and adjust liquidity amounts. The system supports sophisticated requirements around tick ranges, position widths, and permanence, enabling protocols to precisely target liquidity where it's needed most while rewarding providers based on either their time-in-range performance or their simple share of total liquidity.

**Key Features:**

* **Dual Reward Mechanisms** - Liquidity-weighted (rewards for in-range time) or Share-weighted (flat distribution)

* **Protocol-Owned Liquidity (POL)** - Positions can be permanently locked as immutable protocol liquidity

* **Range Requirements** - Fixed (exact ticks), Bounded (within range), or Minimum Width specifications

* **Dynamic Liquidity Management** - Increase/decrease liquidity without losing staking status via auto-unstake/restake

* **Multi-Incentive Staking** - Single NFT can participate in up to 10 incentives simultaneously

* **Fee Collection** - Collect trading fees without affecting staked status

* **Full-Range Zap UX** - Single-token entry automatically creating balanced positions

* **Automatic Staking on Deposit** - NFTs can be staked at time of deposit, to decrease transaction overheads.

* **Position Transfer Support** - Transfer ownership while maintaining all active stakes

Unified Reward Claims via the Emission Controller

Both the ERC20, and UniV3 systems integrate with a unified **EmissionController** that handles complex vesting schedules and reward distribution patterns, ensuring consistent behavior across all incentive types while maintaining gas efficiency through careful storage optimization and enumerable set management.

**Complete Liquidity Position Control**

**Managing Your Staked NFT Positions**

Once your Uniswap V3 NFT enters the staking system, it retains full functionality as a living financial instrument rather than becoming a frozen asset. Every core operation you'd perform on an unstaked position remains available, enhanced with reward-earning capabilities and streamlined execution paths.

**Position Ownership Transfers**

Your staked NFT positions can move between wallets without disrupting any earning mechanisms. When you transfer a deposited position to another address, all active stakes, accumulated rewards, and earning rates move with it. The new owner steps into your exact position - they inherit your reward accumulation history, can claim pending rewards you've earned, and continue earning from all active incentives without any interruption. This transferability enables OTC trading of yield-bearing positions, or simple wallet migrations when you upgrade your security setup.

**Dynamic Liquidity Adjustments**

Market conditions change, and your positions can adapt without sacrificing rewards. Adding liquidity happens through a single function call. The system automatically handles the temporary unstaking from all active incentives, increasing your position through the NFT Position Manager, then restaking to the exact same incentive set. Your reward streams resume immediately with calculations adjusted for the new liquidity amount.

Removing liquidity follows the same seamless pattern for non-POL positions. Whether you're taking profits, rebalancing your portfolio, or reducing exposure, you can decrease your position size while maintaining all active stakes on the remaining liquidity. The system recalculates your reward share proportionally and continues accumulation without missing a beat.

For POL positions, adding additional liquidity removes the overhead of needing to create a new NFT with each liquidity increase.

**Independent Fee Collection**

Trading fees from your liquidity position flow independently of staking rewards. The `collectFees` function lets you harvest accumulated trading fees. Your staked position remains untouched, continuing to earn rewards across all active incentives while you extract the trading income.

**Unified Stake Management**

From a single NFT position's perspective, the system provides complete visibility and control over all reward streams. You can query which incentives your position participates in, or can participate in, by simply observing the management interface.

Alternatively, use the 'at a glance' card which shows max vs actual staked potential.

**The Bottom Line...**

The Universal Staking Module transforms fragmented staking infrastructure into a unified, battle-tested platform. Protocols get precise liquidity control without development overhead. Users get consistent interfaces with maximum flexibility. The system handles everything from simple yield farming to complex POL formation, from instant rewards to sophisticated vesting schedules, from single positions to portfolio-wide management - all through one cohesive framework that prioritizes both capital efficiency and user experience.

Whether you're bootstrapping initial liquidity, or building permanent protocol infrastructure, the Universal Staking Module provides the tools to execute a custom launch strategy to fit the target environment.

Comments

Sort byBest