The AuraSpell contract is a contract that defines how the Blueberry Protocol interacts with Aura pools. It enables users to open and close positions and interact with the Blueberry Money Market, Balancer pools, and Aura pools.

Contract Dependencies

OpenZeppelin Contracts

The contract imports SafeERC20Upgradeable from the OpenZeppelin Contracts Upgradeable library, which is an open-source library that provides secure and tested implementations of popular token standards and other useful utilities.


The contract imports BasicSpell, which is a custom implementation that serves as the base contract for the AuraSpell.


The contract imports interfaces for interacting with several external contracts, including Curve Oracle, Wrapped Aura Pools, Balancer Pool, and Uniswap V2 Router02.

State Variables

The contract has several state variables for storing contract addresses and external contract instances.

  • IWAuraPools public wAuraPools: The address of the Wrapped Aura Pools contract.

  • ICurveOracle public crvOracle: The address of the Curve Oracle contract.

  • address public AURA: The address of the AURA token.



function initialize(IBank bank_, address werc20_, address weth_, address wAuraPools_) external initializer

The initialize function initializes the contract and sets the initial state variables.


function addStrategy(address bpt, uint256 maxPosSize) external onlyOwner

This function adds a strategy to the contract.


function openPositionFarm(OpenPosParam calldata param) external exisitingStrategy(param.StrategyId) existingCollateral(param.strategyId, param.collToken)

This function adds liquidity to the Balancer pool and stakes it in the Aura pool.


function closePositionFarm(
    ClosePosParam calldata param,
    IUniswapV2Router02 swapRouter,
    address[][] calldata swapPath
    existingCollateral(param.strategyId, param.collToken);

This function closes a position in the farm, removing liquidity from the Balancer pool and unstaking from the Aura pool.

Last updated