Output
meteora_dlmm.v1.Outputmeteora_dlmm
Package ref
meteora-dlmm@v0.9.0Run package
CLI
Run map_block from the command line.
substreams run meteora-dlmm@v0.9.0 map_block -e solana --start-block -1substreams auth or directly on thegraph.market (see docs).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 inAddLiquidityanchor event.EvtCreatePositionEvtAddLiquidityEvtRemoveLiquidityEvtClaimPositionFeeEvtClosePositionEvtIncreasePositionLengthEvtDecreasePositionLengthEvtDecreasePositionLength
supported instructions
InitializePositionAddLiquidityAddLiquidity2AddLiquidityOneSideAddLiquidityOneSidePreciseAddLiquidityByStrategyOneSideAddLiquidityOneSidePrecise2AddLiquidityByWeightAddLiquidityByStrategyAddLiquidityByStrategy2ClaimFeeClaimFee2RemoveLiquidityRemoveLiquidity2RemoveLiquidityByRangeRemoveLiquidityByRange2ClosePositionClosePosition2ClosePositionIfEmpty
supported events
CreatePositionAddLiquidityRemoveLiquidityClaimPositionFeeClosePositionIncreasePositionLengthDecreasePositionLengthRebalanceLiquidity
Modules
Execution graph
Show 3 dependencies
Output
sf.solana.type.v1.BlockInputs
Output
sf.substreams.index.v1.Keys
`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.
Output
sf.solana.type.v1.BlockInputs