Showen Peng

@luffy

Joined on Apr 24, 2021

  • mint KEY KEY为随机数字1-48或随机字母A-Z Key price 0.0002 ETH/个 铸造 Ticket 彩票形式,5个数字+1个字母 玩家可将任意5个数字key+1个字母key铸造为1张Ticket(NFT) 奖池 Pot Key的铸造费用全部进入奖池 开奖规则 5+1 最近连续mint 的6个key满足5个数字+1个字母则自动开奖并作为开奖号码
     Like  Bookmark
  • The core of Uniswap V3 is to provide liquidity through intervals (Concentrated Liquidity), where liquidity providers add liquidity to a range that has the potential for price fluctuations to improve capital utilization. TWAMM automated market makers as a new type of AMM protocol can also use Concentrated Liquidity. Capital Utilization Let's look at the utilization rate of Uniswap V2 using non-concentrated liquidity. The above graph shows the volume change curve of $x-y$ in the pool. The current price in the pool is at $c$ and is assumed to fluctuate between $a$ price point and $b$ price point. Sliding from point $c$ to point $a$ consumes the maximum $y_{real}$ and sliding from point $c$ to point $b$ consumes the maximum $x_{real}$. That is, the current price $c$ point, oscillating between $a$ and $b$ points, consumes only $x_{real}$ and $y_{real}$ at maximum. Theoretically it is enough to provide $x_{real}$ and $y_{real}$. And in fact, as shown above, at the price $c$ point, $x$ and $y$ are provided greater than $x_{real}$ and $y_{real}$, respectively. It is obvious that the funds $x-x_{real}$ and $y-y_{real}$ are never used in this case, which is also called idle funds. In this case, the capital utilization rate is $\dfrac{x_{real}}{x}$ or $\dfrac{y_{real}}{y}$. If the price fluctuation is very small, the capital utilization is very low. How to add liquidity in a certain price interval and provide Swap function is the focus point of Uniswap V3, which needs to start with the virtual Reserves.
     Like  Bookmark
  • Uniswap V3 核心是通过盘口区间提供流动性(集中式流动性),流动性提供者将流动性添加到有可能价格波动到的区间范围,提高资金使用率。 TWAMM 做市商作为新型的 AMM 协议同样可以采用集中流动性(Concentrated Liquidity)。 资金利用率 先看看 Uniswap V2 使用非集中流动性的资金利用率。 上图为资金池中的 $x-y$ 的量变化曲线。资金池中的当前价格在 $c$ 点,并且假设会在 $a$ 价格点和 $b$ 价格点之间波动。从 $c$ 点向 $a$ 点滑动,消耗最大 $y_{real}$,从 $c$ 点向 $b$ 点滑动,消耗最大为 $x_{real}$。也就是说,当前价格 $c$ 点,在 $a$ 点和 $b$ 点之间震荡的话,最大只需要消耗 $x_{real}$ 和 $y_{real}$。理论上只要提供 $x_{real}$ 和 $y_{real}$ 就足够了。而事实上,如上图所示,在价格 $c$ 点,分别提供了大于 $x_{real}$ 和 $y_{real}$ 的 $x$ 和 $y$。明显可以看出,$x-x_{real}$ 和 $y-y_{real}$ 的资金在这种情况下是永远用不上的,也就称为闲置资金。在这种情况下,资金利用率为 $\dfrac{x_{real}}{x}$ 或者 $\dfrac{y_{real}}{y}$。如果价格波动非常小的话,资金利用率是非常低的。 如何在某个区间添加流动性并提供 Swap 功能是 Uniswap V3 的重点,这需要先从虚拟资金池说起。
     Like  Bookmark
  • Definition Assume that TWAMM requires $N$ blocks to execute a large virtual transaction, and that the pool selling $X$ sells at a rate of $x_{rate}$ per block, while the pool selling $Y$ sells at a rate of $y_{rate}$ per block. Thus, the total amount of $X$ sold during the whole period is $x_{in}=Nx_{rate}$ and the total amount of $Y$ sold is $y_{in}=Ny_{rate}$. Also, we note the initial reserves $x_{reserve}$ and $y_{reserve}$ for this time period in embeded AMM as $x_{0}=x_{ammStart}$ and $y_{0}=y_{ammStart}$, respectively. According to the design of TWAMM, large orders are traded with blocks, each block sells $x_{rate}$ to get $y_{out}$, or sells $y_{rate}$ to get $x_{out}$, while AMM updates the values of $x_{reserve}$ and $y_{reserve}$, the whole process $N$ transactions in total. It is worth noting that each block transaction of AMM always follows a constant product market making. Formula
     Like 3 Bookmark
  • 最近,Paradigm 研究合伙人 Dave White、Dan Robinson 与 Uniswap 创始人 Hayden Adams 一起合作设计了一个全新的做市模型「时间加权平均做市商 TWAMM」(Time-Weighted Average Market Maker)。根据其发表文章介绍,TWAMM 可以在以太坊上有效地交易大额订单,工作原理是将长期大额订单分解为无限多个无限小的虚拟订单,在一定时间内使用嵌入式 AMM 平滑地执行这些交易。 关于 TWAMM 的虚拟交易所涉及的数学,Dave White 在文中并没有多费笔墨,只在最后给出了非常简单的数学结论,这对于理解 TWAMM 的数学原理非常不利。本文将重点对 TWAMM 的数学原理进行严格的论证和解释,至于 TWAMM 模型详细的设计原理,可以前往 Paradigm 官网查看:https://www.paradigm.xyz/2021/07/twamm/,本文不再做详述。 定义 假设 TWAMM 执行大额虚拟交易需要 $N$ 个区块,出售 $X$ 的池子以每区块 $x_{rate}$ 的速率出售,而出售 $Y$ 的池子以每个区块 $y_{rate}$ 的速率出售。因此,在整个期间售出的 $X$ 总量为 $x_{in}=Nx_{rate}$,售出的 $Y$ 总量为 $y_{in}=Ny_{rate}$。 同时,我们将此时间段嵌入 AMM 的初始储备 $x_{reserve}$ 和 $y_{reserve}$ 分别表示为 $x_{0}=x_{ammStart}$ 以及 $y_{0}=y_{ammStart}$。 按照 TWAMM 的设计,大额订单是随着区块进行交易的,每个区块出售 $x_{rate}$ 得到 $y_{out}$,或者出售 $y_{rate}$ 得到 $x_{out}$,同时 AMM 会更新 $x_{reserve}$ 和 $y_{reserve}$ 的值,整个过程总共交易 $N$ 次。
     Like 2 Bookmark