Liquidity staking pool

Abstract

The protocol deploys the InfraredVault.sol smart contracts for any Proof-of-Liquidity enabled pool by the Berachain gauge system. 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. 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.
  • 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:

Terminal
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:

Terminal
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.

    Terminal
    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.

    Terminal
    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.

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:

Terminal
cast send [Infrared-Vault-Address] "getReward()" --rpc-url [RPC-URL] --private-key [PRIVATE-KEY]

Claiming rewards for another account:

Terminal
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.
    Terminal
    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.
    Terminal
    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.

On this page