Parameter Details
// Instrument Type, each instrument types has its own base implemetation
enum InstrumentType {
General, //general yield strategy in DeFi
CreditLine,
CoveredCallShort,
LendingPool,
StraddleBuy,
LiquidityProvision,
AssetAllocation
}
// All Instrument Specific Data
struct InstrumentData {
bytes32 name;
InstrumentType instrument_type;
bool isPerp; // whether instrument is perpetual
address instrument_address; // deployed instrument contract that has necessary instrument specific subparameters
string description;
/// Fixed Term Instrument Parameters, empty if perpetual
FixedParams fixedParams
/// Perpetual Term Instrument Parameters, empty if fixed
PerpetualParams perpParams
}
struct FixedParams{
uint256 principal; //this is total available allowance in underlying
uint256 expectedYield; // total interest paid over duration in underlying
uint256 duration;
uint256 maturityDate;
}
struct PerpParams{
uint256 saleAmount;
uint256 initPrice; // init price of longZCB in the amm
uint256 promisedReturn; //per unit time
uint256 inceptionTime;
uint256 inceptionPrice; // init price of longZCB after assessment
uint256 leverageFactor; // leverageFactor * manager collateral = capital from vault to instrument
uint256 managementFee; // sum of discounts for high reputation managers/validators
}
Last updated