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
- 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. - 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:
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:
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
-
Approve LP tokens: First, call the
ERC20::approve()
method on the LP token contract, setting theInfraredVault.sol
contract as the spender. -
Stake LP tokens: Once approved, stake the tokens by calling the
InfraredVault::stake()
method.
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
:
Claiming rewards for another account:
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:
-
Exit: This method withdraws all the staked LP tokens and rewards.
- Note: Only callable by the
msg.sender
who staked the LP tokens.
- Note: Only callable by the
-
Withdraw: This method only withdraws the staked LP tokens.
- Note: Only callable by the
msg.sender
who staked the LP tokens.
- Note: Only callable by the
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.