📓VLib

Library which defined the main data structured used by the protocol.

Data Structures

CreationProps

struct CreationProps {
    string vaultName;
    string description;
    string shareName;
    string shareSymbol;
    address strategist; 
}
Name
Type
Description

vaultName

string

name of the vault

description

string

description of the vault

shareName

string

name of vault's share

shareSymbol

string

symbol of the share

strategist

address

address of the strategist

Token

struct Token {
    address tokenAddress;
    address priceFeedAddress;
    uint8 priceFeedPrecision;
    uint256 denominator;
}
Name
Type
Description

tokenAddress

address

address of a token

priceFeedAddress

address

address of the token's oracle

priceFeedPrecision

uint8

denominator

uint256

decimal of the token

UserProps

mapping(address => uint256) lastEntries;

ConstantProps

struct ConstantProps {
    address factory;
    uint256 createdAt; 
    address share;
}
Name
Type
Description

factory

address

factory's address

createdAt

uint256

block timestamp at vault creation

share

address

address of vault's share

HistoryProps

struct HistoryProps {
    uint256 highWaterMark; 
    uint256[] prevRebalanceSignals; 
    uint256 prevSwap; 
    uint256 prevMngHarvest; 
}
Name
Type
Description

highWaterMark

uint256

highest price peak of Vault share

prevRebalanceSignals

uint256[]

last signal send by the strategist

prevSwap

uint256

last timestamp at which the Vault was rebalanced

prevMngHarvest

uint256

last timestamp at which management fees were collected

FeesProps

struct FeesProps {
    address beneficiary;
    uint256 exitFees; 
    uint256 managementFeesRate; 
    uint256 managementFeesToStrategist; 
    uint256 performanceFeesRate; 
    uint256 performanceFeesToStrategist; 
}
Name
Type
Description

beneficiary

address

strategist address

exitFees

uint256

fees in Basis Point : [0, 10000]

managementFeesRate

uint256

from 0 to 1 000 000

managementFeesToStrategist

uint256

fees to strategist in basis point - [0, 5000]

performanceFeesRate

uint256

performance fees rate in basis point - [0, 7500]

performanceFeesToStrategist

uint256

performance fees to strategist in basis point - [0, 5000]

ConfigProps

struct ConfigProps {
    bool paused;
    uint8 verified;
    string name;
    string description;
}
Name
Type
Description

paused

bool

indicates if the vault is paused

verified

uint8

indicates if the vault is verified

name

string

name of the vault

description

string

description of the vault

SecurityProps

struct SecurityProps {
    uint256 maxAUM; 
    uint256 maxLossSwap; 
    uint256 minAmountDeposit; 
    uint256 maxAmountDeposit; 
    uint256 minFrequencySwap; 
    uint256 minSecurityTime; 
    uint256 minHarvestThreshold; 
}
Name
Type
Description

maxAUM

uint256

maximum amount the vault can handle

maxLossSwap

uint256

price Impact and Slippage

minAmountDeposit

uint256

minimum amount a user can deposit to the vault

maxAmountDeposit

uint256

maximum amount a user can deposit to the vault

minFrequencySwap

uint256

minimum period during which the operator can not rebalance the vault

minSecurityTime

uint256

minimum time between two deposit/redeem

minHarvestThreshold

uint256

minimum worth of share to mint from harvesting fees

Last updated