Stake auraBal into the AuraBalVault, which will automatically compound the rewards. The Vault earns three reward tokens: BAL, bb-a-USD, and AURA. BAL and bb-a-USD are sold in the market for auraBal, which is then re-stake. AURA added as an additional reward token that can be claimed.
AuraBalVault
Forked from llama.airforce
isHarvestPermissioned
Copy bool isHarvestPermissioned
authorizedHarvesters
Copy mapping ( address => bool ) authorizedHarvesters
constructor
Copy constructor ( address _token , address _virtualRewardFactory ) public
setHarvestPermissions
Copy function setHarvestPermissions ( bool _status ) external
Sets whether only whitelisted addresses can harvest
Parameters
updateAuthorizedHarvesters
Copy function updateAuthorizedHarvesters ( address _harvester , bool _authorized ) external
Adds or remove an address from the harvesters' whitelist
Parameters
harvest
Copy function harvest ( uint256 _minAmountOut ) public
Claim rewards and swaps them to auraBAL for restaking
Parameters
harvest
Copy function harvest () public
Claim rewards and swaps them to auraBAL for restaking
FeeForwarder
Forwards collected fees to Vault.
Forwarded
Copy event Forwarded ( address vault, address token, uint256 amount)
constructor
Copy constructor ( address _dao ) public
Parameters
forward
Copy function forward ( address vault , address token , uint256 amount) public
GenericUnionVault
withdrawalPenalty
Copy uint256 withdrawalPenalty
MAX_WITHDRAWAL_PENALTY
Copy uint256 MAX_WITHDRAWAL_PENALTY
FEE_DENOMINATOR
Copy uint256 FEE_DENOMINATOR
underlying
virtualRewardFactory
Copy address virtualRewardFactory
strategy
Copy address [] extraRewards
Copy mapping ( address => bool ) isExtraReward
WithdrawalPenaltyUpdated
Copy event WithdrawalPenaltyUpdated ( uint256 _penalty)
Harvest
Copy event Harvest ( address _caller, uint256 _value)
CallerIncentiveUpdated
Copy event CallerIncentiveUpdated ( uint256 _incentive)
StrategySet
Copy event StrategySet ( address _strategy)
Copy event ExtraRewardAdded ( address _reward, address extraReward)
Copy event ExtraRewardCleared ( address _reward)
constructor
Copy constructor ( address _token , address _virtualRewardFactory ) public
setWithdrawalPenalty
Copy function setWithdrawalPenalty ( uint256 _penalty ) external
Updates the withdrawal penalty
Parameters
setStrategy
Copy function setStrategy ( address _strategy ) external
Set the address of the strategy contract
Parameters
Copy function extraRewardsLength () external view returns ( uint256 )
Count of extra rewards
Copy function addExtraReward ( address _reward ) external returns ( bool )
Add extra reward contract
Parameters
Return Values
Copy function clearExtraRewards () external
Clear extra rewards array
totalUnderlying
Copy function totalUnderlying () public view returns ( uint256 total)
Query the amount currently staked
Return Values
balanceOfUnderlying
Copy function balanceOfUnderlying ( address user) external view returns ( uint256 amount)
Returns the amount of underlying a user can claim
Parameters
Return Values
deposit
Copy 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
Copy 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
Copy function harvest () public virtual
Claim rewards and swaps them to auraBAL for restaking
asset
Copy function asset () public view returns ( address )
The address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
totalAssets
Copy function totalAssets () public view returns ( uint256 )
Total amount of the underlying asset that is “managed” by Vault.
convertToShares
Copy 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
Copy 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
Copy 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
Copy 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
Copy 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
Copy 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
Copy function mint ( uint256 _shares , address _receiver ) public returns ( uint256 )
Mints exactly shares Vault shares to receiver by depositing assets of underlying tokens.
maxWithdraw
Copy 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
Copy 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
Copy 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
Copy 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
Copy 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
rewardTokens
Copy address[] rewardTokens
rewardHandlers
Copy mapping(address => address) rewardHandlers
FEE_DENOMINATOR
Copy uint256 FEE_DENOMINATOR
constructor
Copy constructor(address _vault, address _balVault, address _auraBalStaking, address _balToken, address _wethToken, address _auraToken, address _auraBalToken, address _bbusdToken, bytes32 _auraBalBalETHBptPoolId, bytes32 _balETHPoolId) public
setApprovals
Copy function setApprovals() external
Set approvals for the contracts used when swapping & staking
addRewardToken
Copy function addRewardToken(address _token, address _handler) external
Add a reward token and its handler
Parameters
updateRewardToken
Copy function updateRewardToken(address _token, address _handler) external
Update the handler of a reward token
Parameters
totalRewardTokens
Copy function totalRewardTokens() external view returns (uint256)
returns the number of reward tokens
Return Values
totalUnderlying
Copy function totalUnderlying() public view returns (uint256 total)
Query the amount currently staked
Return Values
stake
Copy function stake(uint256 _amount) public
Deposits underlying tokens in the staking contract
withdraw
Copy function withdraw(uint256 _amount) external
Withdraw a certain amount from the staking contract
Parameters
harvest
Copy function harvest(uint256 _minAmountOut) public returns (uint256 harvested)
Claim rewards and swaps them to auraBAL for restaking
Parameters
Return Values
AuraBalStrategyBase
BBUSD_TOKEN
AURA_TOKEN
AURABAL_TOKEN
Copy address AURABAL_TOKEN
WETH_TOKEN
BAL_TOKEN
BAL_ETH_POOL_TOKEN
Copy address BAL_ETH_POOL_TOKEN
auraBalStaking
Copy contract IBasicRewards auraBalStaking
balVault
Copy contract IBalancerVault balVault
constructor
Copy constructor(address _balVault, address _auraBalStaking, address _balToken, address _wethToken, address _auraToken, address _auraBalToken, address _bbusdToken, bytes32 _auraBalBalETHBptPoolId, bytes32 _balETHPoolId) public
BalancerSwapsHandler
SwapPath
Copy struct SwapPath {
bytes32[] poolIds;
address[] assetsIn;
}
constructor
Copy constructor(address _token, address _strategy, address _balVault, address _wethToken, struct BalancerSwapsHandler.SwapPath _swapPath) public
getSwapPath
Copy function getSwapPath() external view returns (struct BalancerSwapsHandler.SwapPath)
setApprovals
Copy function setApprovals() external
sell
Copy function sell() external
HandlerBase
owner
pendingOwner
token
strategy
WETH_TOKEN
balVault
Copy contract IBalancerVault balVault
constructor
Copy constructor(address _token, address _strategy, address _balVault, address _wethToken) public
setPendingOwner
Copy function setPendingOwner(address _po) external
applyPendingOwner
Copy function applyPendingOwner() external
rescueToken
Copy function rescueToken(address _token, address _to) external
sell
Copy function sell() external virtual
receive
Copy receive() external payable