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

[Bug] PriceMath.TickIndexToPrice and PriceMath.SqrtPriceX64ToPrice Wrong price calculations #50

Open
Maxxx555 opened this issue Feb 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Maxxx555
Copy link

Describe the bug
Wrong price calculations

To Reproduce

Console.WriteLine(PriceMath.TickIndexToPrice(1, 9, 9));
Console.WriteLine(PriceMath.TickIndexToPrice(100, 9, 9));
10.00150003749937502188359611493754442728685383249508961171928583303106051744175749673006360257982567683817469619873
10.15112303331957826695058866288058596662162812280744838892230990557699568227283140711413108281156799322006970554316890624

Expected behavior

1.0001
1.0100496620928754
@Maxxx555 Maxxx555 added the bug Something isn't working label Feb 15, 2024
@GabrielePicco
Copy link
Contributor

@Maxxx555 can you please expand on the issue description with the formula, pool used as example with tick size/prize and expected calculation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants