WAuraPools
The WAuraPools
contract is a wrapper for leveraged liquidity provider (LP) tokens on the Blueberry Protocol. The contract allows users to mint and burn ERC-1155 tokens representing their LP positions, while also allowing them to interact with the underlying rewards of the associated pools.
Key Features
Inherits from OpenZeppelin's
ERC1155Upgradeable
,ReentrancyGuardUpgradeable
,OwnableUpgradeable
, andEnsureApprove
contracts.Implements
IERC20Wrapper
andIWAuraPools
interfaces.Mints and burns wrapped LP tokens (ERC-1155 tokens) while interacting with the underlying rewards.
Functions
initialize
Initializes the contract with the given AURA token and Aura Pools contract addresses.
encodeId
Encodes the given pool ID and AURA per share value into an ERC-1155 token ID.
decodeId
Decodes the given ERC-1155 token ID into its pool ID and AURA per share value.
getUnderlyingToken
Returns the underlying ERC20 token address for the given ERC-1155 token ID.
getVault
Returns the Balancer vault associated with the given Balancer pool token.
getPoolTokens
Returns the tokens, balances, and last changed block for the given Balancer pool token.
getPool
Returns the Balancer pool address and pool ID associated with the given Balancer pool token and pool ID.
getPoolInfoFromPoolId
Returns detailed information about the pool associated with the given pool ID.
pendingRewards
Returns the pending rewards for the given ERC-1155 token ID and amount.
mint
Mints wrapped LP tokens (ERC-1155 tokens) for the given pool ID and amount.
burn
Burns the given ERC-1155 token ID and amount to redeem the underlying LP tokens and associated rewards.
Last updated