AuraBalVault - 自动复投器

AuraBalVault 兼容 ERC4626

将 auraBal 投入 AuraBalVault 中,它将自动复利奖励。Vault 获得三种奖励代币:BAL、bb-a-USD 和 AURA。BAL 和 bb-a-USD 在市场上出售换取 auraBal,然后重新投入。除此之外还可领取 AURA 奖励代币。

AuraBalVault

由 llama.airforce 分叉

isHarvestPermissioned

bool isHarvestPermissioned

authorizedHarvesters

mapping(address => bool) authorizedHarvesters

constructor

constructor(address _token, address _virtualRewardFactory) public

setHarvestPermissions

function setHarvestPermissions(bool _status) external

设定是否只有白名单地址可执行收穫

Parameters

updateAuthorizedHarvesters

function updateAuthorizedHarvesters(address _harvester, bool _authorized) external

由收穫者(harvesters)的白名单中新增或移除地址

Parameters

harvest

function harvest(uint256 _minAmountOut) public

申领奖励并兑换成auraBAL去质押

Parameters

harvest

function harvest() public

申领奖励并兑换成auraBAL去质押

FeeForwarder

将已收集的奖励传送至金库。

Forwarded

event Forwarded(address vault, address token, uint256 amount)

constructor

constructor(address _dao) public

Parameters

forward

function forward(address vault, address token, uint256 amount) public

GenericUnionVault

withdrawalPenalty

uint256 withdrawalPenalty

MAX_WITHDRAWAL_PENALTY

uint256 MAX_WITHDRAWAL_PENALTY

FEE_DENOMINATOR

uint256 FEE_DENOMINATOR

underlying

address underlying

virtualRewardFactory

address virtualRewardFactory

strategy

address strategy

extraRewards

address[] extraRewards

isExtraReward

mapping(address => bool) isExtraReward

WithdrawalPenaltyUpdated

event WithdrawalPenaltyUpdated(uint256 _penalty)

Harvest

event Harvest(address _caller, uint256 _value)

CallerIncentiveUpdated

event CallerIncentiveUpdated(uint256 _incentive)

StrategySet

event StrategySet(address _strategy)

ExtraRewardAdded

event ExtraRewardAdded(address _reward, address extraReward)

ExtraRewardCleared

event ExtraRewardCleared(address _reward)

constructor

constructor(address _token, address _virtualRewardFactory) public

setWithdrawalPenalty

function setWithdrawalPenalty(uint256 _penalty) external

更新退出的罚款

Parameters

setStrategy

function setStrategy(address _strategy) external

设置strategy合约地址

Parameters

extraRewardsLength

function extraRewardsLength() external view returns (uint256)

额外奖励长度

addExtraReward

function addExtraReward(address _reward) external returns (bool)

新增额外奖励合约

Parameters

Return Values

clearExtraRewards

function clearExtraRewards() external

清除额外奖励阵列

totalUnderlying

function totalUnderlying() public view returns (uint256 total)

Query the amount currently staked

Return Values

balanceOfUnderlying

function balanceOfUnderlying(address user) external view returns (uint256 amount)

Returns the amount of underlying a user can claim

Parameters

Return Values

deposit

function deposit(uint256 _amount, address _receiver) public returns (uint256 _shares)

Deposit user funds in the autocompounder and mints tokens representing user's share of the pool in exchange

Parameters

Return Values

redeem

function redeem(uint256 _shares, address _receiver, address _owner) public returns (uint256 withdrawn)

Unstake underlying token in proportion to the amount of shares sent

Parameters

Return Values

harvest

function harvest() public virtual

Claim rewards and swaps them to auraBAL for restaking

asset

function asset() public view returns (address)

The address of the underlying token used for the Vault for accounting, depositing, and withdrawing.

totalAssets

function totalAssets() public view returns (uint256)

Total amount of the underlying asset that is “managed” by Vault.

convertToShares

function convertToShares(uint256 _assets) public view returns (uint256)

The amount of shares that the Vault would exchange for the amount of assets provided, in an ideal scenario where all the conditions are met.

convertToAssets

function convertToAssets(uint256 _shares) public view returns (uint256)

The amount of assets that the Vault would exchange for the amount of shares provided, in an ideal scenario where all the conditions are met.

maxDeposit

function maxDeposit(address) public pure returns (uint256)

Maximum amount of the underlying asset that can be deposited into the Vault for the receiver, through a deposit call.

previewDeposit

function previewDeposit(uint256 _assets) public view returns (uint256)

Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given current on-chain conditions.

maxMint

function maxMint(address) public pure returns (uint256)

Maximum amount of shares that can be minted from the Vault for the receiver, through a mint call.

previewMint

function previewMint(uint256 _shares) public view returns (uint256)

Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given current on-chain conditions.

mint

function mint(uint256 _shares, address _receiver) public returns (uint256)

Mints exactly shares Vault shares to receiver by depositing assets of underlying tokens.

maxWithdraw

function maxWithdraw(address _owner) public view returns (uint256)

Maximum amount of the underlying asset that can be withdrawn from the owner balance in the Vault, through a withdraw call.

previewWithdraw

function previewWithdraw(uint256 _assets) public view returns (uint256)

Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, given current on-chain conditions.

withdraw

function withdraw(uint256 _assets, address _receiver, address _owner) public returns (uint256)

Burns shares from owner and sends exactly assets of underlying tokens to receiver.

maxRedeem

function maxRedeem(address _owner) public view returns (uint256)

Maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, through a redeem call.

previewRedeem

function previewRedeem(uint256 _shares) public view returns (uint256)

Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, given current on-chain conditions.

AuraBalStrategy

vault

address vault

rewardTokens

address[] rewardTokens

rewardHandlers

mapping(address => address) rewardHandlers

FEE_DENOMINATOR

uint256 FEE_DENOMINATOR

constructor

constructor(address _vault, address _balVault, address _auraBalStaking, address _balToken, address _wethToken, address _auraToken, address _auraBalToken, address _bbusdToken, bytes32 _auraBalBalETHBptPoolId, bytes32 _balETHPoolId) public

setApprovals

function setApprovals() external

Set approvals for the contracts used when swapping & staking

addRewardToken

function addRewardToken(address _token, address _handler) external

Add a reward token and its handler

Parameters

updateRewardToken

function updateRewardToken(address _token, address _handler) external

Update the handler of a reward token

Parameters

totalRewardTokens

function totalRewardTokens() external view returns (uint256)

returns the number of reward tokens

Return Values

totalUnderlying

function totalUnderlying() public view returns (uint256 total)

Query the amount currently staked

Return Values

stake

function stake(uint256 _amount) public

Deposits underlying tokens in the staking contract

withdraw

function withdraw(uint256 _amount) external

Withdraw a certain amount from the staking contract

Parameters

harvest

function harvest(uint256 _minAmountOut) public returns (uint256 harvested)

Claim rewards and swaps them to auraBAL for restaking

Parameters

Return Values

AuraBalStrategyBase

BBUSD_TOKEN

address BBUSD_TOKEN

AURA_TOKEN

address AURA_TOKEN

AURABAL_TOKEN

address AURABAL_TOKEN

WETH_TOKEN

address WETH_TOKEN

BAL_TOKEN

address BAL_TOKEN

BAL_ETH_POOL_TOKEN

address BAL_ETH_POOL_TOKEN

auraBalStaking

contract IBasicRewards auraBalStaking

balVault

contract IBalancerVault balVault

constructor

constructor(address _balVault, address _auraBalStaking, address _balToken, address _wethToken, address _auraToken, address _auraBalToken, address _bbusdToken, bytes32 _auraBalBalETHBptPoolId, bytes32 _balETHPoolId) public

BalancerSwapsHandler

SwapPath

struct SwapPath {
  bytes32[] poolIds;
  address[] assetsIn;
}

constructor

constructor(address _token, address _strategy, address _balVault, address _wethToken, struct BalancerSwapsHandler.SwapPath _swapPath) public

getSwapPath

function getSwapPath() external view returns (struct BalancerSwapsHandler.SwapPath)

setApprovals

function setApprovals() external

sell

function sell() external

HandlerBase

owner

address owner

pendingOwner

address pendingOwner

token

address token

strategy

address strategy

WETH_TOKEN

address WETH_TOKEN

balVault

contract IBalancerVault balVault

constructor

constructor(address _token, address _strategy, address _balVault, address _wethToken) public

setPendingOwner

function setPendingOwner(address _po) external

applyPendingOwner

function applyPendingOwner() external

rescueToken

function rescueToken(address _token, address _to) external

sell

function sell() external virtual

receive

receive() external payable

Last updated