more docs
This commit is contained in:
parent
50eac74b18
commit
01471b7037
9 changed files with 80 additions and 11 deletions
|
|
@ -1,5 +1,20 @@
|
|||
# Uniswap V3 Math - Critical Learnings
|
||||
|
||||
## Critical Implementation Details
|
||||
|
||||
### Price Representation in KRAIKEN
|
||||
- `_priceAtTick(tick)` returns **price²** in X96 format, NOT regular price or sqrtPrice
|
||||
- This is intentional: price² = (sqrtPrice)² / 2^96
|
||||
- Used for ETH requirement calculations in floor positioning
|
||||
- To get regular price from price²: take sqrt and shift left by 48 bits
|
||||
- VWAP stores price² for volume-weighted averaging
|
||||
|
||||
### ETH Scarcity vs Abundance
|
||||
- **Scarcity**: Floor ETH < Outstanding KRAIKEN * VWAP price → Floor moves to extreme ticks (140k+)
|
||||
- **Abundance**: Sufficient ETH → Floor placed near VWAP tick
|
||||
- Extreme floor positions (tick 141,200+) are CORRECT behavior in scarcity scenarios
|
||||
- Scarcity protects protocol solvency by making KRAIKEN very cheap (ETH expensive)
|
||||
|
||||
## Token Ordering and Price Representation
|
||||
|
||||
### Price Direction Reference Table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue