🫐
Blueberry Product Docs
  • 🫐Welcome to Blueberry Protocol
  • Blueberry Overview
    • 👋What is Blueberry?
    • 🔍Concept Overview
    • 🔬Front End
  • 💸Earn
    • ⚖️Leveraged Strategies
    • 🌊Liquidation Process on Blueberry
      • The Concept of Liquidation
      • Liquidations on Blueberry
      • Role of Bots in the Liquidation Process
      • Mitigating Liquidation Risk
    • 📈Earn Token Listing
    • 📉Earn Token Delisting
    • 📏Strategy Listing and Delisting
    • 💲Fee Structure
    • ⁉️Earn Error Codes
  • 💰Lending Protocol
    • 🔎Overview
      • 🔨Governance
        • 💱Flash Loans
        • 🛑Delist
    • 🪙bToken Introduction
      • bToken Address
    • 📈Interest Rate Model
    • 💲Price Oracle
    • ⁉️Error Code
      • ⁉️Key Events
      • ⁉️bToken Error Code
      • ⁉️Comptroller Error Code
    • 💾Change Log
  • 🪙Tokenomics
    • 🔵BLB Governance Token
    • 💰ibTokens
    • 🍩$bdBLB
    • ⚓Lockdrop
    • 📀Token Distribution
  • 🖥️developer-guides
    • 📜Contracts
      • Blueberry Bank
        • Introduction
        • Blueberry Bank Contract
          • Variables
          • Modifiers
        • Fee Manager
        • ProtocolConfig
      • Oracle
        • Introduction
        • AggregatorOracle
        • CoreOracle
      • Spell
        • Introduction
        • AuraSpell
        • BasicSpell
        • ConvexSpell
        • IchiSpell
        • LongShortSpell
      • Vault
        • Introduction
        • HardVault
        • SoftVault
      • Utils
        • BlueBerryConst
        • BlueBerryErrors
        • EnsureApprove
        • ERC1155NaiveReceiver
      • Wrapper
        • Introduction
        • WAuraPools
        • WConvexPools
        • WCurveGauge
        • WERC20
        • WIchiFarm
      • Interact with Blueberry V1
    • 📔Deployed Contracts
  • 🛡️Security
    • 🛡️Audits
    • 🛡️Bug Bounty
  • Legal
    • 📃Terms of Service
    • 📃Privacy Policy
    • 📄Risks
  • Miscellaneous
    • 💙Early Adopter Wallet List
Powered by GitBook
On this page
  • Key Features
  • Functions
  1. developer-guides
  2. Contracts
  3. Wrapper

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, and EnsureApprove contracts.

  • Implements IERC20Wrapper and IWAuraPools 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.

function initialize(
    address aura_,
    address auraPools_
) external initializer;

encodeId

Encodes the given pool ID and AURA per share value into an ERC-1155 token ID.

function encodeId(
    uint256 pid,
    uint256 auraPerShare
) public pure returns (uint256 id);

decodeId

Decodes the given ERC-1155 token ID into its pool ID and AURA per share value.

function decodeId(
    uint256 id
) public pure returns (uint256 gid, uint256 auraPerShare);

getUnderlyingToken

Returns the underlying ERC20 token address for the given ERC-1155 token ID.

function getUnderlyingToken(
    uint256 id
) external view override returns (address uToken);

getVault

Returns the Balancer vault associated with the given Balancer pool token.

solidityCopy codefunction getVault(address bpt) public view returns (IBalancerVault);

getPoolTokens

Returns the tokens, balances, and last changed block for the given Balancer pool token.

function getPoolTokens(
    address bpt
)
    external
    view
    returns (
        address[] memory tokens,
        uint256[] memory balances,
        uint256 lastChangedBlock
    );

getPool

Returns the Balancer pool address and pool ID associated with the given Balancer pool token and pool ID.

function getPool(
    address bpt,
    uint256 pid
) external view returns (address, uint256);

getPoolInfoFromPoolId

Returns detailed information about the pool associated with the given pool ID.

function getPoolInfoFromPoolId(
    uint256 pid
)
    public
    view
    returns (
        address lptoken,
        address token,
        address gauge,
        address crvRewards,
        address stash,
        bool shutdown
    );

pendingRewards

Returns the pending rewards for the given ERC-1155 token ID and amount.

function pendingRewards(
    uint256 tokenId,
    uint256 amount
)
    public
    view
    override
    returns (address[] memory tokens, uint256[] memory rewards);

mint

Mints wrapped LP tokens (ERC-1155 tokens) for the given pool ID and amount.

function mint(
    uint256 pid,
    uint256 amount
) external nonReentrant returns (uint256 id);

burn

Burns the given ERC-1155 token ID and amount to redeem the underlying LP tokens and associated rewards.

function burn(
    uint256 id,
    uint256 amount
) external nonReentrant returns (address[] memory rewardTokens, uint256[] memory rewards);
PreviousIntroductionNextWConvexPools

Last updated 2 years ago

🖥️
📜