Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create a 1% dynamic AMM pool #136

Open
oocrypticoo opened this issue Jul 14, 2024 · 1 comment
Open

Can't create a 1% dynamic AMM pool #136

oocrypticoo opened this issue Jul 14, 2024 · 1 comment

Comments

@oocrypticoo
Copy link

When setting
export const CONSTANT_PRODUCT_DEFAULT_TRADE_FEE_BPS = 100; in constants.ts

I get the following error:

Simulation failed.
Message: Transaction simulation failed: Error processing Instruction 4: custom program error: 0x7d6.
Logs:
[
  "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success",
  "Program Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB invoke [1]",
  "Program log: Instruction: InitializePermissionlessPoolWithFeeTier",
  "Program log: AnchorError caused by account: pool. Error Code: ConstraintSeeds. Error Number: 2006. Error Message: A seeds constraint was violated.",
  "Program log: Left:",
  "Program log: 78oFV3zWNqAVkXsyhKe33MwAR9aMfJrdc5Rniwf8WyKX",
  "Program log: Right:",
  "Program log: 7hYkxar1zaukmptgNb7WeEyEPfeD5fPCceefkmQCR21j",
  "Program Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB consumed 30006 of 1298941 compute units",
  "Program Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB failed: custom program error: 0x7d6"
].

export const CONSTANT_PRODUCT_DEFAULT_TRADE_FEE_BPS = 25; works fine

0.25% SUCCESS:
Screenshot 2024-07-14 185055

1% FAIL:
Screenshot 2024-07-14 173652

@codewithgun
Copy link
Contributor

Which environment are you testing on? I just tested on local and devnet, and it works.

Test:
bced08b

Devnet tx:
https://explorer.solana.com/tx/2LNhztMQn1cy52kQVijW6FY67BDB3TNhPM8qo45FVa9jUmsxCnY4iJbCmQT68YHz3qLKUZTjXJasnVenswxYc1fV?cluster=devnet

Could you try again? Maybe the devnet program was out of sync when you tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants