Function calculateSpreadBN
- calculateSpreadBN(baseSpread: number, lastOracleReservePriceSpreadPct: BN, lastOracleConfPct: BN, maxSpread: number, quoteAssetReserve: BN, terminalQuoteAssetReserve: BN, pegMultiplier: BN, baseAssetAmountWithAmm: BN, reservePrice: BN, totalFeeMinusDistributions: BN, netRevenueSinceLastFunding: BN, baseAssetReserve: BN, minBaseAssetReserve: BN, maxBaseAssetReserve: BN, markStd: BN, oracleStd: BN, longIntensity: BN, shortIntensity: BN, volume24H: BN, returnTerms?: boolean): number[] | {
effectiveLeverage: number;
effectiveLeverageCapped: number;
halfRevenueRetreatAmount: number;
inventorySpreadScale: number;
longSpread: number;
longSpreadwEL: number;
longSpreadwInvScale: number;
longSpreadwOffsetShrink: number;
longSpreadwPS: number;
longSpreadwRevRetreat: number;
longVolSpread: number;
maxTargetSpread: number;
revenueRetreatAmount: number;
shortSpread: number;
shortSpreadwEL: number;
shortSpreadwInvScale: number;
shortSpreadwOffsetShrink: number;
shortSpreadwPS: number;
shortSpreadwRevRetreat: number;
shortVolSpread: number;
totalSpread: number;
}
-
Parameters
-
baseSpread: number
-
lastOracleReservePriceSpreadPct: BN
-
lastOracleConfPct: BN
-
maxSpread: number
-
quoteAssetReserve: BN
-
terminalQuoteAssetReserve: BN
-
pegMultiplier: BN
-
baseAssetAmountWithAmm: BN
-
reservePrice: BN
-
totalFeeMinusDistributions: BN
-
netRevenueSinceLastFunding: BN
-
baseAssetReserve: BN
-
minBaseAssetReserve: BN
-
maxBaseAssetReserve: BN
-
markStd: BN
-
oracleStd: BN
-
longIntensity: BN
-
shortIntensity: BN
-
volume24H: BN
-
returnTerms: boolean = false
Returns number[] | {
effectiveLeverage: number;
effectiveLeverageCapped: number;
halfRevenueRetreatAmount: number;
inventorySpreadScale: number;
longSpread: number;
longSpreadwEL: number;
longSpreadwInvScale: number;
longSpreadwOffsetShrink: number;
longSpreadwPS: number;
longSpreadwRevRetreat: number;
longVolSpread: number;
maxTargetSpread: number;
revenueRetreatAmount: number;
shortSpread: number;
shortSpreadwEL: number;
shortSpreadwInvScale: number;
shortSpreadwOffsetShrink: number;
shortSpreadwPS: number;
shortSpreadwRevRetreat: number;
shortVolSpread: number;
totalSpread: number;
}