Skip to content

Liquidity Staking Pool

Abstract

The protocol deploys the InfraredVault.sol smart contracts for any Proof-of-Liquidity enabled pool by the Berachain Gauge-System. Through the Liquidity Router, developers and liquidity providers can integrate into Proof-of-Liquidity with a single click. The InfraredVault.sol holds the LP positions for users in a non-custodial manner and streams the rewards as ERC-20 tokens.

Key Features

  1. Non-Custodial Holdings: The InfraredVault.sol smart contract securely holds LP positions without taking custody of users' assets, ensuring that users maintain control over their holdings.
  2. One-Click Integration: The Liquidity Router simplifies the process for developers and liquidity providers to participate in Proof-of-Liquidity, enabling seamless integration with just one click.
  3. Streamed Rewards: Rewards from staked LP positions are streamed as ERC-20 tokens, providing a straightforward and efficient way for users to receive their earnings.

User Benefits

  • Security and Control: Users retain full control over their assets while participating in the staking pool, thanks to the non-custodial nature of the InfraredVault.sol.
  • Ease of Use: The one-click integration through the Liquidity Router makes it easy for anyone to participate in the Proof-of-Liquidity system, lowering the barrier to entry.
  • Efficient Reward Distribution: Streamed rewards in the form of ERC-20 tokens ensure that users receive their earnings promptly and can easily use or reinvest them within the DeFi ecosystem.

By focusing on these features, the Liquidity Staking Pool enhances user experience and security while simplifying the process of participating in Proof-of-Liquidity. This approach encourages broader participation and contributes to the overall growth and stability of the Berachain ecosystem.

Supported LP Tokens

All active vaults are those that are receiving $BGT emissions. These can be identified using the Berachain's Berachef.sol::isFriendOfTheChef(address lpToken) bool public method.

To check if an LP token is supported:

cast call [BerachefAddress] "isFriendOfTheChef(address)" [LP-Token-Address] --rpc-url [RPC-URL]

Vaults that are active and receiving $BGT emissions will have an InfraredVault.sol contract deployed for them. This can be confirmed by calling the Infrared::vaultRegistry() method.

To verify the deployment of an InfraredVault:

cast call [Infrared-Address] "vaultRegistry(address)" [LP-Token-Address] --rpc-url [RPC-URL]

By using these methods, users and developers can easily verify which LP tokens are supported and actively receiving $BGT emissions, ensuring their participation in the most relevant and rewarding vaults.

Staking

The Staking Pool is designed to conform to widely accepted and user-friendly APIs, drawing significant inspiration from Synthetix's StakingRewards.sol and Curve-DAO's MultiReward.sol.

How to Stake

  1. Approve LP Tokens: First, call the ERC20::approve() method on the LP token contract, setting the InfraredVault.sol contract as the spender.

    cast send [LP-Token-Address] "approve(address,uint256)" [InfraredVault-Address] [Amount] --rpc-url [RPC-URL]
  2. Stake LP Tokens: Once approved, stake the tokens by calling the InfraredVault::stake() method.

    cast send [InfraredVault-Address] "stake(uint256)" [Amount] --rpc-url [RPC-URL]

By following these steps, users can easily stake their LP tokens using the familiar and efficient interfaces provided by the InfraredVault.sol contract. This design ensures a seamless and user-friendly staking experience, leveraging well-established practices from the broader DeFi community.

Liquidity Router

The Liquidity Router is a system designed to simplify the process for developers and liquidity providers. It allows them to route their liquidity through a single smart contract, enabling depositing and staking into Infrared with a single call. This streamlined approach reduces complexity and enhances efficiency for users.

Note: The Liquidity Router feature is [Coming Soon].

Rewards

The protocol is designed to receive rewards in multiple tokens. All liquidity staking pool vaults will receive $iBGT at different rates based on their global allocation from Berachain's Emission System.

Claiming Rewards

Claiming rewards is straightforward. Users can harvest and distribute their rewards by calling the InfraredVault::getReward() method.

Claiming Rewards for msg.sender:
cast send [Infrared-Vault-Address] "getReward()" --rpc-url [RPC-URL] --private-key [PRIVATE-KEY]
Claiming Rewards for Another Account:
cast send [Infrared-Vault-Address] "getRewardForUser(address)" [USER-ADDRESS] --rpc-url [RPC-URL] --private-key [PRIVATE-KEY]

This simple claiming process ensures that users can easily access their earned rewards, enhancing the overall user experience and encouraging active participation in the staking pool.

Withdrawal

There are two ways to withdraw from the liquidity staking pool:

  1. Exit: This method withdraws all the staked LP tokens and rewards.

    • Note: Only callable by the msg.sender who staked the LP tokens.
    cast send [Infrared-Vault-Address] "exit()" --rpc-url [RPC-URL] --private-key [PRIVATE-KEY]
  2. Withdraw: This method only withdraws the staked LP tokens.

    • Note: Only callable by the msg.sender who staked the LP tokens.
    cast send [Infrared-Vault-Address] "withdraw()" --rpc-url [RPC-URL] --private-key [PRIVATE-KEY]

By providing these two options, the protocol ensures flexibility for users, allowing them to either completely exit their position and claim all rewards or selectively withdraw their staked LP tokens while leaving their rewards intact. This approach caters to different user needs and strategies, enhancing the overall utility and user experience of the staking pool.