question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mainnet: OPUL/ALGO Pool Returning Wrong Quote

See original GitHub issue

Running the following on mainnet:

ALGO = client.fetch_asset(0)
OPUL = client.fetch_asset(287867876)
pool = client.fetch_pool(OPUL, ALGO)
quote = pool.fetch_fixed_input_swap_quote(ALGO(2500), slippage=0.01)

returns, for example, 2955 as quote.

In reality, this is actually 0.2955, so the quote is actually is off by exactly 10000 for some reason.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gokselcobancommented, Feb 3, 2022

@albertshin, Can you please share an example? It would be great to share an example code with expected and real values.

Sorry, you have already did.

0reactions
albertshincommented, Feb 3, 2022

I see what you mean. Re-reading Fergal’s original reply that everything is expressed in microunits makes more sense now. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tinyman Python SDK - PythonRepo
pooling1.py This example demonstrates retrieving the current pool position/share for an ... Mainnet: OPUL/ALGO Pool Returning Wrong Quote.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found