pumpdotfun-sdk icon indicating copy to clipboard operation
pumpdotfun-sdk copied to clipboard

Account data anomaly

Open winktool opened this issue 1 year ago • 3 comments

BondingCurveAccount {
  discriminator: 6966180631402821399n,
  virtualTokenReserves: 1057999999750065n,
  virtualSolReserves: 30425330823n,
  realTokenReserves: 778099999750065n,
  realSolReserves: 425330823n,
  tokenTotalSupply: 1000000000000000n,
  complete: false
}

Sometimes, when you continuously request the data from the bondingCurveAccount, the returned data is abnormal, causing the price calculation to fail. Why does this happen? For example, in this case, there is an obvious anomaly in realSolReserves.

winktool avatar Jul 23 '24 17:07 winktool

Hmm first glance I dont see whats wrong, looks like there is 0.4 SOL in the real sol reserves? What am I missing?

rckprtr avatar Jul 23 '24 21:07 rckprtr

realSolReserves should actually have a value much higher than 425330823n, this happens by accident, the next request is back to normal!

winktool avatar Jul 24 '24 14:07 winktool

Why dont you use virtualSolReserves instead, never had problem calculating the price that way. Also i think the real sol reserves are right, pumpfun adds 30 sol to the liquidity, i dont think they add that to the real sol reserves?

matotubol avatar Jul 26 '24 15:07 matotubol