Preset
Implements
Serializable
Table of contents
Constructors
Properties
- baseFactor
- binStep
- decayPeriod
- filterPeriod
- maxVolatilityAccumulated
- protocolShare
- reductionFactor
- sampleLifetime
- variableFeeControl
Methods
Constructors
constructor
• new Preset(binStep?
, baseFactor?
, filterPeriod?
, decayPeriod?
, reductionFactor?
, variableFeeControl?
, protocolShare?
, maxVolatilityAccumulated?
, sampleLifetime?
): Preset
Parameters
Name | Type | Default value | Description |
---|---|---|---|
binStep | u32 | 0 | The bin step |
baseFactor | u32 | 0 | The base factor |
filterPeriod | u32 | 0 | The filter period, where the fees stays constant |
decayPeriod | u32 | 0 | The decay period, where the fees are halved |
reductionFactor | u32 | 0 | The reduction factor, used to calculate the reduction of the accumulator |
variableFeeControl | u32 | 0 | The variable fee control, used to control the variable fee, can be 0 to disable them |
protocolShare | u32 | 0 | The share of fees sent to protocol |
maxVolatilityAccumulated | u32 | 0 | The max value of volatility accumulated |
sampleLifetime | u32 | 0 | The value of volatility accumulated |
Returns
Defined in
Properties
baseFactor
• baseFactor: u32
= 0
The base factor
Defined in
binStep
• binStep: u32
= 0
The bin step
Defined in
decayPeriod
• decayPeriod: u32
= 0
The decay period, where the fees are halved
Defined in
filterPeriod
• filterPeriod: u32
= 0
The filter period, where the fees stays constant
Defined in
maxVolatilityAccumulated
• maxVolatilityAccumulated: u32
= 0
The max value of volatility accumulated
Defined in
protocolShare
• protocolShare: u32
= 0
The share of fees sent to protocol
Defined in
reductionFactor
• reductionFactor: u32
= 0
The reduction factor, used to calculate the reduction of the accumulator
Defined in
sampleLifetime
• sampleLifetime: u32
= 0
The value of volatility accumulated
Defined in
variableFeeControl
• variableFeeControl: u32
= 0
The variable fee control, used to control the variable fee, can be 0 to disable them
Defined in
Methods
deserialize
▸ deserialize(data
, offset
): Result
<i32
>
Parameters
Name | Type |
---|---|
data | StaticArray <u8 > |
offset | i32 |
Returns
Result
<i32
>
Implementation of
Serializable.deserialize
Defined in
serialize
▸ serialize(): StaticArray
<u8
>
Returns
StaticArray
<u8
>
Implementation of
Serializable.serialize