You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\<open>\<^bold>p\<^bold>r\<^bold>o\<^bold>c getSqrtRatioAtTick v \<lbrace> t \<Ztypecolon> \<^bold>v\<^bold>a\<^bold>l[v] Tick \<longmapsto> price_of t \<Ztypecolon> \<^bold>v\<^bold>a\<^bold>l Price \<rbrace>\<close>
90
+
andgetTickAtSqrtRatio_\<phi>app:
91
+
\<open>\<^bold>p\<^bold>r\<^bold>e\<^bold>m\<^bold>i\<^bold>s\<^bold>e 0 < p
92
+
\<Longrightarrow> \<^bold>p\<^bold>r\<^bold>o\<^bold>c getTickAtSqrtRatio v \<lbrace> p \<Ztypecolon> \<^bold>v\<^bold>a\<^bold>l[v] Price \<longmapsto> tick_of_price p \<Ztypecolon> \<^bold>v\<^bold>a\<^bold>l Tick \<rbrace>\<close>
93
+
94
+
recordtick_info=
95
+
liquidityGross::nat
96
+
liquidityNet::int
97
+
feeGrowthOutside0X128::nat
98
+
feeGrowthOutside1X128::nat
99
+
tickCumulativeOutside::int
100
+
secondsPerLiquidityOutsideX128::nat
101
+
secondsOutside::nat
102
+
initialized::bool
103
+
104
+
definition\<open>growth_Inv f f' delta current =
105
+
(\<forall>i. f i = (if i \<le> current then (sum f' {j. j \<le> i}) + delta i else (sum f' {j. i < j}) - delta i))\<close>
Suggestion: It must be done during pre-processing, cuz it never generates the code for, like, `1.5 + 1.5`.
6
+
Can we use the constant evaluator of Solidity itself?
7
+
8
+
Small stuffs, not hard but need attention
9
+
1. abi.decode / abi.encodeWithSelector, .selector
10
+
These are used in Uniswap! https://docs.soliditylang.org/en/v0.8.15/units-and-global-variables.html?highlight=encodewithselector#abi-encoding-and-decoding-functions
11
+
2. type expression `type(int32).max` (The uniswap only uses `type(T).max/min`
indeed, our semantic model can support this, by recording the layout on the reference, but the reasoning can be difficult. so i think, we just make it in semantics at most, and
0 commit comments