Nexera-FiAdapters & DeFi ProtocolsAura

Aura Protocol

Overview

Aura Finance is a DeFi protocol that enhances incentives for both Balancer liquidity providers (LPs) and BAL token stakers (converting them into veBAL) by aggregating BAL deposits and incorporating Aura's native token, promoting community participation.

Moreover, Aura Finance simplifies the process of depositing Balancer Pool Tokens (BPTs) for LPs through a network of 4626 vaults, effectively serving as a Balancer yield aggregator. In these deposit pools, LPs benefit from easy onboarding, veBAL ownership, and the opportunity to earn additional AURA rewards.

The Nexera-Fi AuraAdapter interacts with and utilizes Aura's gauge deposit pools (4626 vaults):

In the following sections, we'll provide an overview of this contract and its methods that Nexera-Fi AuraAdapter interacts with.

Interactions with AuraAdapter

The Nexera-Fi AuraAdapter engages with Aura's gauge deposit pools, adhering to the ERC-4626 tokenized vault standard. Specifically, the AuraAdapter interacts with Aura protocol by invoking methods described in the diagram below. Each method plays a distinct role within the Adapter, facilitating strategies to seamlessly integrate liquidity provision, liquidity withdrawal, and yield boosting within Aura's ecosystem.


graph LR; style Nexera_Fi fill:#8453ed style AURA fill:#4284f5; style GAUGE_DEPOSIT_POOLS fill:#57deca; subgraph Nexera_Fi A[<b> AuraAdapter </b>] end subgraph AURA subgraph GAUGE_DEPOSIT_POOLS B["<b>...</b>"] C["<b>BaseRewardPool4626 Instance</b>"] D["<b>...</b>"] end end A --> |<b>asset</b>: <i>Retrieves the address of the underlying BPT</i>| GAUGE_DEPOSIT_POOLS A --> |<b>rewardToken</b>: <i>Retrieves the address of the reward token</i>| GAUGE_DEPOSIT_POOLS A --> |<b>stakingToken</b>: <i>Retrieves the address of the auraBPT staking token</i>| GAUGE_DEPOSIT_POOLS A --> |<b>getReward</b>: <i>Gets the allocated rewards</i>| GAUGE_DEPOSIT_POOLS A --> |<b>deposit</b>: <i>Deposits BPT and receives vault's shares</i>| GAUGE_DEPOSIT_POOLS A --> |<b>withdrawAndUnwrap</b>: <i>Withdraws specified BPT amount</i>| GAUGE_DEPOSIT_POOLS A --> |<b>withdrawAllAndUnwrap</b>: <i>Withdraws all allocated BPT</i>| GAUGE_DEPOSIT_POOLS A --> |<b>withdraw</b>: <i>Withdraws specified auraBPT staked amount</i>| GAUGE_DEPOSIT_POOLS A --> |<b>withdrawAll</b>: <i>Withdraws all staked auraBPT</i>| GAUGE_DEPOSIT_POOLS A --> |<b>stake</b>: <i>Stakes specified auraBPT amount</i>| GAUGE_DEPOSIT_POOLS A --> |<b>stakeAll</b>: <i>Stakes all auraBPT held</i>| GAUGE_DEPOSIT_POOLS

BaseRewardPool4626

The BaseRewardPool4626 is designed to wrap the Synthetix BaseRewardPool and provides compatibility with the IERC4626 standard. This standardization enables interaction with other contracts and protocols that adhere to the IERC4626 interface.

These instances primarily operate as Reward Pools rather than traditional vaults. In this context, the asset-to-share ratio is maintained at 1:1, ensuring that users' assets are closely aligned with their share in the pool. The chosen "asset" within such pools is a corresponding Balancer Pool Token (BPT) token, which represents a user's share of assets in the Balancer's pool.

In the context of the Nexera-Fi AuraAdapter, these eleven methods come into play:

Methods

asset

Retrieves the address of the underlying ERC20 token (BPT) used for the Vault for accounting, depositing, and withdrawing.

function asset() public view returns (address);

This method is invoked by the following AuraAdapter functions:

The _deposit and _withdraw functions within the Adapter rely on the asset method of the target pool to assert that the underlying asset is consistent with the one provided in the expectedIn and out arguments for deposit and withdrawal operations, respectively.


rewardToken

Retrieves the address of the ERC20 reward token (BAL) for the pool.

function rewardToken() public view returns (address);

This method is invoked by the following AuraAdapter functions:

The above three functions within the Adapter rely on the rewardToken method of the target pool to assert that the token utilized as rewards is consistent with the one provided in the expectedIn argument when claiming rewards is desired through the respective operations.


stakingToken

Retrieves the address of the ERC20 staking token (auraBPT) for the pool.

function stakingToken() public view returns (address);

This method is invoked by the following AuraAdapter functions:

The _stakeOperation and _unstakeOperation functions within the Adapter rely on the stakingToken method of the target pool to assert that the staking token is consistent with the one provided in the expectedIn and out arguments for staking and unstaking actions, respectively.

The _stake and _stakeAll functions within the Adapter utilize the address returned by the stakingToken method of the target pool to appropriately adjust the allowance of the pool for the staking token. This adjustment is achieved through the use of the safeIncreaseAllowance function provided by the IERC20 interface of the staking token before conducting the staking action.


getReward

Gets the allocated rewards.

function getReward() public returns (bool);

This method is invoked by the following AuraAdapter function:

The _collect function within the Adapter invokes the target pool's getReward method to obtain the allocated rewards.


deposit

Deposits BPT and mints vault's shares. Internally it wraps the BPT to the required token (auraBPT) in the booster and stakes it.

function deposit(uint256 assets, address receiver) public returns (uint256);

This method is invoked by the following AuraAdapter function:

The _deposit function within the Adapter invokes the target pool's deposit method to facilitate the depositing of assets, with the amount associated with assets specified in the out argument. The minted vault shares are allocated to the Adapter as the receiver.


withdrawAndUnwrap

Withdraws the specified allocated BPT amount (unwraps the auraBPT to BPT) and, if desired, allows users to claim rewards as well.

function withdrawAndUnwrap(uint256 amount, bool claim) public returns (bool)

This method is invoked by the following AuraAdapter function:

The _withdrawAndUnwrapAsset function within the Adapter invokes the target pool's withdrawAndUnwrap method to withdraw the specified BPT amount, while also optionally claiming allocated rewards.

It is executed in the context of the Adapter's _withdraw function when the amount field of expectedIn argument does not equal 0.


withdrawAllAndUnwrap

Withdraws all allocated BPT (unwraps the auraBPT to BPT) and, if desired, allows users to claim rewards as well.

function withdrawAllAndUnwrap(bool claim) external;

This method is invoked by the following AuraAdapter function:

The _withdrawAllAndUnwrapAsset function within the Adapter invokes the target pool's withdrawAllAndUnwrap method to withdraw all the BPT provided, while also optionally claiming allocated rewards.

It is executed in the context of the Adapter's _withdraw function when the amount field of expectedIn argument is set to 0.


withdraw

Withdraws the specified allocated auraBPT staked amount and, if desired, allows users to claim rewards as well.

function withdraw(uint256 amount, bool claim) public returns (bool);

This method is invoked by the following AuraAdapter function:

The _unstake function within the Adapter invokes the target pool's withdraw method to withdraw the specified auraBPT amount, while also optionally claiming allocated rewards.

It is executed in the context of the Adapter's _operate function when the action defined in OperateOperation is set to UNSTAKE and the amount field of expectedIn argument does not equal 0.


withdrawAll

Withdraws all staked auraBPT and, if desired, allows users to claim rewards as well.

function withdrawAll(bool claim) external;

This method is invoked by the following AuraAdapter function:

The _unstakeAll function within the Adapter invokes the target pool's withdrawAll method to withdraw all the staked auraBPT, while also optionally claiming allocated rewards.

It is executed in the context of the Adapter's _operate function when the action defined in OperateOperation is set to UNSTAKE and the amount field of expectedIn argument is set to 0.


stake

Stakes a specified amount of the staking token (auraBPT) for the calling address.

function stake(uint256 _amount) public returns (bool);

This method is invoked by the following AuraAdapter function:

The _stake function within the Adapter invokes the target pool's stake method to stake the specified auraBPT amount.

It is executed in the context of the Adapter's _operate function when the action defined in OperateOperation is set to STAKE and the amount field of expectedIn argument does not equal MAX_UINT256.


stakeAll

Stakes entire balance of the staking token (auraBPT) for the calling address.

function stakeAll() external returns (bool);

This method is invoked by the following AuraAdapter function:

The _stakeAll function within the Adapter invokes the target pool's stakeAll method to stake the entire Adapter's auraBPT balance.

It is executed in the context of the Adapter's _operate function when the action defined in OperateOperation is set to STAKE and the amount field of expectedIn argument is set to MAX_UINT256.


Please note: For detailed information about Aura protocol, consult the official Aura documentation.

On this page