Class: KandelStrategies
Entrypoint for the Kandel strategies. Kandel is an Automated Market Making strategy that uses on-chain order flow to repost offers instantly, without any latency. Within a market and price range you select, Kandel automatically posts bids and asks. Its main goal is to buy low and sell high - profits are made through accumulated spread.
Constructorsβ
constructorβ
β’ new KandelStrategies(mgv
): KandelStrategies
Constructor
Parametersβ
Name | Type | Description |
---|---|---|
mgv | Mangrove | The Mangrove to interact with. |
Returnsβ
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:34
Propertiesβ
seederβ
β’ seeder: KandelSeeder
Seeder for creating Kandel instances on-chain.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:20
farmβ
β’ farm: KandelFarm
Repository for Kandel instances.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:23
mgvβ
β’ mgv: Mangrove
The Mangrove to interact with.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:26
configurationβ
β’ configuration: KandelConfiguration
The default configuration values to use for Kandel.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:29
Methodsβ
instanceβ
βΈ instance(params
): Promise
<GeometricKandelInstance
>
Creates a KandelInstance object to interact with a Kandel strategy on Mangrove.
Parametersβ
Name | Type | Description |
---|---|---|
params | Object | The parameters for creating the KandelInstance. |
params.address | string | The address of the Kandel strategy. |
params.market | Market | (baseAddress : string , quoteAddress : string , tickSpacing : number ) => Promise <Market > | The market used by the Kandel instance or a factory function to create the market. |
Returnsβ
Promise
<GeometricKandelInstance
>
A new KandelInstance.
Dev
If a factory function is provided for the market, then remember to disconnect market when no longer needed.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:48
generatorβ
βΈ generator(market
): GeometricKandelDistributionGenerator
Creates a generator for generating Kandel distributions for the given market.
Parametersβ
Name | Type | Description |
---|---|---|
market | Market | The market to calculate for. |
Returnsβ
GeometricKandelDistributionGenerator
A new KandelDistributionGenerator.
Defined inβ
@mangrovedao/mangrove.js/src/kandelStrategies.ts:93