Comments (1)
GitHub wiped out my answer... Well, in short, you need to flip the price so it's the price of USDC in WETH (the price in a pool is the price of token 0 in terms of token 1):
math.floor(math.log(int(1e18 // 1900.79e6), 1.0001))
# 200820
from uniswapv3-book.
Related Issues (20)
- proposal(docs): add instructions to add code for eth precision HOT 2
- Calculating ticks seems wrong HOT 1
- Addition of event mint is missing HOT 2
- Ask for permission to translate this book into Chinese HOT 5
- Typo in milestone_2 tick-bitmap-index
- Advice: Add a section about the difference between our final implementation and the v3-core&v3-periphery repo HOT 2
- shouldTransferInCallback in setupTestCase should become before pool.mint() HOT 1
- how to automatic calculate token1 amount from token 0 amount and the ticks HOT 1
- Question about tick feeGrowthOutsideX128{0,1} initialization HOT 4
- An error in calculation HOT 1
- Tick spacing vs Fee for Uni V3 pool identification HOT 2
- Constant Function Market Makers HOT 1
- Clarify that the tick bitmap only indexes spaced ticks HOT 1
- Show import statements in when using Tick and Position UniswapV3Pool HOT 1
- Build error when running server locally
- Calculating liquidity HOT 1
- Create a pdf version HOT 5
- Wrong Calculation in Q64.96 number of sqrt Price HOT 1
- Chapter 18 missing reference to liquidity argument
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uniswapv3-book.