Aura Finance
English
Search
⌃K

Solidity API

Documentation generated with solidity-docgen
​

AuraToken

Basically an ERC20 with minting functionality operated by the "operator" of the VoterProxy (Booster).
The minting schedule is based on the amount of CRV earned through staking and is distirbuted along a supply curve (cliffs etc). Fork of ConvexToken.

operator

address operator

vecrvProxy

address vecrvProxy

EMISSIONS_MAX_SUPPLY

uint256 EMISSIONS_MAX_SUPPLY

INIT_MINT_AMOUNT

uint256 INIT_MINT_AMOUNT

totalCliffs

uint256 totalCliffs

reductionPerCliff

uint256 reductionPerCliff

minter

address minter

minterMinted

uint256 minterMinted

Initialised

event Initialised()

OperatorChanged

event OperatorChanged(address previousOperator, address newOperator)

constructor

constructor(address _proxy, string _nameArg, string _symbolArg) public
Name
Type
Description
_proxy
address
CVX VoterProxy
_nameArg
string
Token name
_symbolArg
string
Token symbol

init

function init(address _to, address _minter) external
Initialise and mints initial supply of tokens.
Name
Type
Description
_to
address
Target address to mint.
_minter
address
The minter address.

updateOperator

function updateOperator() public
This can be called if the operator of the voterProxy somehow changes.

mint

function mint(address _to, uint256 _amount) external
Mints AURA to a given user based on the BAL supply schedule.

minterMint

function minterMint(address _to, uint256 _amount) external
Allows minter to mint to a specific address

AuraBalRewardPool

Modifications from convex-platform/contracts/contracts/BaseRewardPool.sol: - Delayed start (tokens transferred then delay is enforced before notification) - One time duration of 14 days - Remove child reward contracts - Penalty on claim at 20%

rewardToken

contract IERC20 rewardToken

stakingToken

contract IERC20 stakingToken

duration

uint256 duration

rewardManager

address rewardManager

auraLocker

contract IAuraLocker auraLocker

penaltyForwarder

address penaltyForwarder

pendingPenalty

uint256 pendingPenalty

startTime

uint256 startTime

periodFinish

uint256 periodFinish

rewardRate

uint256 rewardRate

lastUpdateTime

uint256 lastUpdateTime

rewardPerTokenStored

uint256 rewardPerTokenStored

_totalSupply

uint256 _totalSupply

userRewardPerTokenPaid

mapping(address => uint256) userRewardPerTokenPaid

rewards

mapping(address => uint256) rewards

_balances

mapping(address => uint256) _balances

RewardAdded

event RewardAdded(uint256 reward)

Staked

event Staked(address user, uint256 amount)

Withdrawn

event Withdrawn(address user, uint256 amount)

RewardPaid

event RewardPaid(address user, uint256 reward, bool locked)

PenaltyForwarded

event PenaltyForwarded(uint256 amount)

Rescued

event Rescued()

constructor

constructor(address _stakingToken, address _rewardToken, address _rewardManager, address _auraLocker, address _penaltyForwarder, uint256 _startDelay) public
Simple constructor
Name
Type
Description
_stakingToken
address
Pool LP token
_rewardToken
address
$AURA
_rewardManager
address
Depositor
_auraLocker
address
$AURA lock contract
_penaltyForwarder
address
Address to which penalties are sent
_startDelay
uint256
​

totalSupply

function totalSupply() public view returns (uint256)

balanceOf

function balanceOf(address account) public view returns (uint256)

updateReward

modifier updateReward(address account)

lastTimeRewardApplicable

function lastTimeRewardApplicable() public view returns (uint256)

rewardPerToken

function rewardPerToken() public view returns (uint256)

earned

function earned(address account) public view returns (uint256)

stake

function stake(uint256 _amount) public returns (bool)

stakeAll

function stakeAll() external returns (bool)

stakeFor

function stakeFor(address _for, uint256 _amount) public returns (bool)

withdraw

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

getReward

function getReward(bool _lock) public returns (bool)
Gives a staker their rewards
Name
Type
Description
_lock
bool
Lock the rewards? If false, takes a 20% haircut

forwardPenalty

function forwardPenalty() public
Forwards to the penalty forwarder for distro to Aura Lockers

rescueReward

function rescueReward() public
Rescues the reward token provided it hasn't been initiated yet

setLocker

function setLocker(address _newLocker) external
Updates the locker address

initialiseRewards

function initialiseRewards() external returns (bool)
Called once to initialise the rewards based on balance of stakeToken

AuraClaimZap

Claim zap to bundle various reward claims
Claims from all pools, and stakes cvxCrv and CVX if wanted. v2: - change exchange to use curve pool - add getReward(address,token) type - add option to lock cvx - add option use all funds in wallet

crv

address crv

cvx

address cvx

cvxCrv

address cvxCrv

crvDepositWrapper

address crvDepositWrapper

cvxCrvRewards

address cvxCrvRewards

locker

address locker

owner

address owner

Options

enum Options {
ClaimCvxCrv,
ClaimLockedCvx,
ClaimLockedCvxStake,
LockCrvDeposit,
UseAllWalletFunds,
LockCvx
}

constructor

constructor(address _crv, address _cvx, address _cvxCrv, address _crvDepositWrapper, address _cvxCrvRewards, address _locker) public
Name
Type
Description
_crv
address
CRV token (0xD533a949740bb3306d119CC777fa900bA034cd52);
_cvx
address
CVX token (0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
_cvxCrv
address
cvxCRV token (0x62B9c7356A2Dc64a1969e19C23e4f579F9810Aa7);
_crvDepositWrapper
address
crvDepositWrapper (0x8014595F2AB54cD7c604B00E9fb932176fDc86Ae);
_cvxCrvRewards
address
cvxCrvRewards (0x3Fe65692bfCD0e6CF84cB1E7d24108E434A7587e);
_locker
address
vlCVX (0xD18140b4B819b895A3dba5442F959fA44994AF50);

getName

function getName() external pure returns (string)

setApprovals

function setApprovals() external
Approve spending of: crv -> crvDepositor cvxCrv -> cvxCrvRewards cvx -> Locker

_checkOption

function _checkOption(uint256 _mask, uint256 _flag) internal pure returns (bool)
Use bitmask to check if option flag is set

claimRewards

function claimRewards(address[] rewardContracts, address[] extraRewardContracts, address[] tokenRewardContracts, address[] tokenRewardTokens, uint256 depositCrvMaxAmount, uint256 minAmountOut, uint256 depositCvxMaxAmount, uint256 options) external
Claim all the rewards
Name
Type
Description
rewardContracts
address[]
Array of addresses for LP token rewards
extraRewardContracts
address[]
Array of addresses for extra rewards
tokenRewardContracts
address[]
Array of addresses for token rewards e.g vlCvxExtraRewardDistribution
tokenRewardTokens
address[]
Array of token reward addresses to use with tokenRewardContracts
depositCrvMaxAmount
uint256
The max amount of CRV to deposit if converting to crvCvx
minAmountOut
uint256
The min amount out for crv:cvxCrv swaps if swapping. Set this to zero if you want to use CrvDepositor instead of balancer swap
depositCvxMaxAmount
uint256
The max amount of CVX to deposit if locking CVX
options
uint256
Claim options

_claimExtras

function _claimExtras(uint256 depositCrvMaxAmount, uint256 minAmountOut, uint256 depositCvxMaxAmount, uint256 removeCrvBalance, uint256 removeCvxBalance, uint256 options) internal
Claim additional rewards from: - cvxCrvRewards - cvxLocker
Name
Type
Description
depositCrvMaxAmount
uint256
see claimRewards
minAmountOut
uint256
see claimRewards
depositCvxMaxAmount
uint256
see claimRewards
removeCrvBalance
uint256
crvBalance to ignore and not redeposit (starting Crv balance)
removeCvxBalance
uint256
cvxBalance to ignore and not redeposit (starting Cvx balance)
options
uint256
see claimRewards

AuraLocker

Effectively allows for rolling 16 week lockups of CVX, and provides balances available at each epoch (1 week). Also receives cvxCrv from CvxStakingProxy and redistributes to depositors.
Invdividual and delegatee vote power lookups both use independent accounting mechanisms.

RewardData

struct RewardData {
uint32 periodFinish;
uint32 lastUpdateTime;
uint96 rewardRate;
uint96 rewardPerTokenStored;
}

UserData

struct UserData {
uint128 rewardPerTokenPaid;
uint128 rewards;
}

EarnedData

struct EarnedData {
address token;
uint256 amount;
}

Balances

struct Balances {
uint112 locked;
uint32 nextUnlockIndex;
}

LockedBalance

struct LockedBalance {
uint112 amount;
uint32 unlockTime;
}

Epoch

struct Epoch {
uint224 supply;
uint32 date;
}

DelegateeCheckpoint

struct DelegateeCheckpoint {
uint224 votes;
uint32 epochStart;
}

rewardTokens

address[] rewardTokens

queuedRewards

mapping(address => uint256) queuedRewards

newRewardRatio

uint256 newRewardRatio

rewardData

mapping(address => struct AuraLocker.RewardData) rewardData

rewardDistributors

mapping(address => mapping(address => bool)) rewardDistributors

userData

mapping(address => mapping(address => struct AuraLocker.UserData)) userData

rewardsDuration

uint256 rewardsDuration

lockDuration

uint256 lockDuration

lockedSupply

uint256 lockedSupply

epochs

struct AuraLocker.Epoch[] epochs

balances

mapping(address => struct AuraLocker.Balances) balances

userLocks

mapping(address => struct AuraLocker.LockedBalance[]) userLocks

_delegates

mapping(address => address) _delegates

_checkpointedVotes

mapping(address => struct AuraLocker.DelegateeCheckpoint[]) _checkpointedVotes

delegateeUnlocks

mapping(address => mapping(uint256 => uint256)) delegateeUnlocks

blacklist

mapping(address => bool) blacklist

stakingToken

contract IERC20 stakingToken

cvxCrv

address cvxCrv

denominator

uint256 denominator

cvxcrvStaking

address cvxcrvStaking

kickRewardPerEpoch

uint256 kickRewardPerEpoch

kickRewardEpochDelay

uint256 kickRewardEpochDelay

isShutdown

bool isShutdown

_name

string _name

_symbol

string _symbol

_decimals

uint8 _decimals

DelegateChanged

event DelegateChanged(address delegator, address fromDelegate, address toDelegate)

DelegateCheckpointed

event DelegateCheckpointed(address delegate)

Recovered

event Recovered(address _token, uint256 _amount)

RewardPaid

event RewardPaid(address _user, address _rewardsToken, uint256 _reward)

Staked

event Staked(address _user, uint256 _paidAmount, uint256 _lockedAmount)

Withdrawn

event Withdrawn(address _user, uint256 _amount, bool _relocked)

KickReward

event KickReward(address _user, address _kicked, uint256 _reward)

RewardAdded

event RewardAdded(address _token, uint256 _reward)

BlacklistModified

event BlacklistModified(address account, bool blacklisted)

KickIncentiveSet

event KickIncentiveSet(uint256 rate, uint256 delay)

Shutdown

event Shutdown()

constructor

constructor(string _nameArg, string _symbolArg, address _stakingToken, address _cvxCrv, address _cvxCrvStaking) public