janfiedler / invariant-jupiter-arbitrage-bot

Arbitrage bot on Solana for Invariant pools against Jupiter aggregator
18 stars 8 forks source link

Invariant Simulation seems broken #1

Open krazzarkov opened 9 months ago

krazzarkov commented 9 months ago

It seems that simulating Invariant txns does not work properly. I've encountered two scenarios in which this occurs.

Scenario 1: Invariant simulate exception: Error: Account does not exist

When changing the config to use "SNY" (TokenX), and "USDC" (TokenY), the invariant simulation continues throwing an exception saying that the account doesn't exist, giving a random public key. I double-checked and the token addresses provided for SYN and USDC are accurate.

This issue also happens when adding new tokens to the config.

Scenario 2: Invariant simulate exception: ReferenceError: pool is not defined

When using the default config provided in this repository, the invariant simulation throws an exception saying pool is not defined.

Seems like Jupiter functionality is working properly and it's just Invariant simulation that is having issues.

janfiedler commented 9 months ago

HI, invariant in past weeks changed fees level of pools. Code isnt updated to actual range. I think this is reason why it telling you pool is not defined. What fee you are interested? I will test it and update code.

Thanks