Package Logo
meteora_dlmm
meteora_dlmm@v0.5.0
Total Downloads
246
Published
3 days ago
Publisher
User Avatar 0xMukesh

Readme

dlmm-substream

a substreams package for indexing LP-related data emitted by meteora DLMM program. the primary focus of the substreams package is to provide a straightforward method for indexing data emitted by anchor events, in conjunction with the input accounts of the parent instruction.

outputType v/s instructionType

{
  "outputType": "...",
  "instructionType": "...",
  "args": {
    "...": {}
  }
}

apart from the basic fields such as txId, blockTime, blockSlot, the package returns outputType and instructionType. as previously mentioned, the package majorily tries to get the data from anchor events but input accounts is extracted from the parent/corresponding sibling instruction.

meteora dlmm program went through multiple iterations and there are many instructions which serve the same purpose (on a high level overview), uses the same event, but might have different ordering in input accounts. so to avoid such issues, the package goes through each type of instruction type and extract the required input accounts properly.

instructionType is the name of the parent instruction and outputType is used to indicate from where the data was extracted from i.e. from instruction arguments or anchor events (more about it below).

supported output type

  • IxnAddLiquidityByStrat — extracts data and inputs accounts from add liquidity by strategy related instructions (i.e. AddLiquidityByStrategyOneSide, AddLiquidityByStrategy, AddLiquidityByStrategy2). specifically used to extract deposity strategy details.
  • IxnInitializePosition — extracts data and input accounts from initialize position instruction. specifically used to extract lower bin id + width, which are not returned in AddLiquidity anchor event.
  • EvtCreatePosition
  • EvtAddLiquidity
  • EvtRemoveLiquidity
  • EvtClaimPositionFee
  • EvtClosePosition
  • EvtIncreasePositionLength
  • EvtDecreasePositionLength
  • EvtDecreasePositionLength

supported instructions

  • InitializePosition
  • AddLiquidity
  • AddLiquidity2
  • AddLiquidityOneSide
  • AddLiquidityOneSidePrecise
  • AddLiquidityByStrategyOneSide
  • AddLiquidityOneSidePrecise2
  • AddLiquidityByWeight
  • AddLiquidityByStrategy
  • AddLiquidityByStrategy2
  • ClaimFee
  • ClaimFee2
  • RemoveLiquidity
  • RemoveLiquidity2
  • RemoveLiquidityByRange
  • RemoveLiquidityByRange2
  • ClosePosition
  • ClosePosition2
  • ClosePositionIfEmpty

supported events

  • CreatePosition
  • AddLiquidity
  • RemoveLiquidity
  • ClaimPositionFee
  • ClosePosition
  • IncreasePositionLength
  • DecreasePositionLength
  • RebalanceLiquidity

Documentation

Modules

Maps icon
Maps

map
map_block

12ebcce98875bf48269bc3b5e44187efe2062db8
map map_block (
solana:blocks_without_votessf.solana.type.v1.Block
)  -> meteora_dlmm.v1.Output
substreams gui meteora-dlmm@v0.5.0 map_block

map
solana:blocks_without_votes

0be93a73c65aa8ec2de4b1a47209edeea493ff29
map solana:blocks_without_votes (
)  -> sf.solana.type.v1.Block
substreams gui meteora-dlmm@v0.5.0 solana:blocks_without_votes

map
solana:v020:blocks_without_votes

0be93a73c65aa8ec2de4b1a47209edeea493ff29
map solana:v020:blocks_without_votes (
)  -> sf.solana.type.v1.Block

blocks_without_votes allows you to consume a full Solana Block without Vote instructions (Vote111111111111111111111111111111111111111). If you consume it on HISTORICAL data (+1000 blocks from HEAD), you will be reading from the StreamingFast cache, thus saving costs on the amount of TB read.

substreams gui meteora-dlmm@v0.5.0 solana:v020:blocks_without_votes
Block Indexes icon
Block Indexes

blockIndex
solana:program_ids_without_votes

811466d12743a8b02be8ba6649cfa9a24aa1af62
substreams gui meteora-dlmm@v0.5.0 solana:program_ids_without_votes
Protobuf

Protobuf Docs Explorer

sol.transactions.v1
sf.solana.type.v1
sol.instructions.v1
meteora_dlmm.v1