MeteoraAg / dlmm-sdk

An SDK for building applications on top of Dynamic CLMM
68 stars 57 forks source link

Fix/getBins doesnt work correctly if more than 2 bin arrays #116

Open 00xSam opened 4 weeks ago

shadeglare commented 4 weeks ago

I found possible erroneous behaviour the getBins method can produce. if lowerBinId and upperBinId are equal and there's no bin array for it the method returns empty bins array but when lowerBinId and upperBinId aren't equal it can skip bins completely.

shadeglare commented 5 days ago

Refactored the getBins method in a more concise manner: https://github.com/MeteoraAg/dlmm-sdk/pull/119 Already tested in production on https//udlmm.xyz cc: @00xSam, @codewithgun