Skip to main content

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​

NameTypeDescription
mgvMangroveThe Mangrove to interact with.

Returns​

KandelStrategies

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​

NameTypeDescription
paramsObjectThe parameters for creating the KandelInstance.
params.addressstringThe address of the Kandel strategy.
params.marketMarket | (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​

NameTypeDescription
marketMarketThe market to calculate for.

Returns​

GeometricKandelDistributionGenerator

A new KandelDistributionGenerator.

Defined in​

@mangrovedao/mangrove.js/src/kandelStrategies.ts:93