Skip to main content

VaultStorage

VaultStorage​

AssetSupported​

event AssetSupported(address _asset)

AssetDefaultStrategyUpdated​

event AssetDefaultStrategyUpdated(address _asset, address _strategy)

AssetAllocated​

event AssetAllocated(address _asset, address _strategy, uint256 _amount)

StrategyApproved​

event StrategyApproved(address _addr)

StrategyRemoved​

event StrategyRemoved(address _addr)

Mint​

event Mint(address _addr, uint256 _value)

Redeem​

event Redeem(address _addr, uint256 _value)

CapitalPaused​

event CapitalPaused()

CapitalUnpaused​

event CapitalUnpaused()

RebasePaused​

event RebasePaused()

RebaseUnpaused​

event RebaseUnpaused()

VaultBufferUpdated​

event VaultBufferUpdated(uint256 _vaultBuffer)

OusdMetaStrategyUpdated​

event OusdMetaStrategyUpdated(address _ousdMetaStrategy)

RedeemFeeUpdated​

event RedeemFeeUpdated(uint256 _redeemFeeBps)

PriceProviderUpdated​

event PriceProviderUpdated(address _priceProvider)

AllocateThresholdUpdated​

event AllocateThresholdUpdated(uint256 _threshold)

RebaseThresholdUpdated​

event RebaseThresholdUpdated(uint256 _threshold)

StrategistUpdated​

event StrategistUpdated(address _address)

MaxSupplyDiffChanged​

event MaxSupplyDiffChanged(uint256 maxSupplyDiff)

YieldDistribution​

event YieldDistribution(address _to, uint256 _yield, uint256 _fee)

TrusteeFeeBpsChanged​

event TrusteeFeeBpsChanged(uint256 _basis)

TrusteeAddressChanged​

event TrusteeAddressChanged(address _address)

NetOusdMintForStrategyThresholdChanged​

event NetOusdMintForStrategyThresholdChanged(uint256 _threshold)

SwapperChanged​

event SwapperChanged(address _address)

SwapAllowedUndervalueChanged​

event SwapAllowedUndervalueChanged(uint256 _basis)

SwapSlippageChanged​

event SwapSlippageChanged(address _asset, uint256 _basis)

Swapped​

event Swapped(address _fromAsset, address _toAsset, uint256 _fromAssetAmount, uint256 _toAssetAmount)

UnitConversion​

enum UnitConversion {
DECIMALS,
GETEXCHANGERATE
}

Asset​

struct Asset {
bool isSupported;
enum VaultStorage.UnitConversion unitConversion;
uint8 decimals;
uint16 allowedOracleSlippageBps;
}

assets​

mapping(address => struct VaultStorage.Asset) assets

mapping of supported vault assets to their configuration

allAssets​

address[] allAssets

list of all assets supported by the vault.

Strategy​

struct Strategy {
bool isSupported;
uint256 _deprecated;
}

strategies​

mapping(address => struct VaultStorage.Strategy) strategies

mapping of strategy contracts to their configiration

allStrategies​

address[] allStrategies

list of all vault strategies

priceProvider​

address priceProvider

Address of the Oracle price provider contract

rebasePaused​

bool rebasePaused

pause rebasing if true

capitalPaused​

bool capitalPaused

pause operations that change the OToken supply. eg mint, redeem, allocate, mint/burn for strategy

redeemFeeBps​

uint256 redeemFeeBps

Redemption fee in basis points. eg 50 = 0.5%

vaultBuffer​

uint256 vaultBuffer

Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.

autoAllocateThreshold​

uint256 autoAllocateThreshold

OToken mints over this amount automatically allocate funds. 18 decimals.

rebaseThreshold​

uint256 rebaseThreshold

OToken mints over this amount automatically rebase. 18 decimals.

oUSD​

contract OUSD oUSD

Address of the OToken token. eg OUSD or OETH.

adminImplPosition​

bytes32 adminImplPosition

strategistAddr​

address strategistAddr

Address of the Strategist

assetDefaultStrategies​

mapping(address => address) assetDefaultStrategies

Mapping of asset address to the Strategy that they should automatically

maxSupplyDiff​

uint256 maxSupplyDiff

Max difference between total supply and total value of assets. 18 decimals.

trusteeAddress​

address trusteeAddress

Trustee contract that can collect a percentage of yield

trusteeFeeBps​

uint256 trusteeFeeBps

Amount of yield collected in basis points. eg 2000 = 20%

MINT_MINIMUM_UNIT_PRICE​

uint256 MINT_MINIMUM_UNIT_PRICE

ousdMetaStrategy​

address ousdMetaStrategy

Metapool strategy that is allowed to mint/burn OTokens without changing collateral

netOusdMintedForStrategy​

int256 netOusdMintedForStrategy

How much OTokens are currently minted by the strategy

netOusdMintForStrategyThreshold​

uint256 netOusdMintForStrategyThreshold

How much net total OTokens are allowed to be minted by all strategies

MIN_UNIT_PRICE_DRIFT​

uint256 MIN_UNIT_PRICE_DRIFT

MAX_UNIT_PRICE_DRIFT​

uint256 MAX_UNIT_PRICE_DRIFT

SwapConfig​

struct SwapConfig {
address swapper;
uint16 allowedUndervalueBps;
}

swapConfig​

struct VaultStorage.SwapConfig swapConfig

setAdminImpl​

function setAdminImpl(address newImpl) external

set the implementation for the admin, this needs to be in a base class else we cannot set it

Parameters​

NameTypeDescription
newImpladdressaddress of the implementation