学习在线课程,掌握职场技能
我在Ropsten上观看了Weth-dai池的状态(104356071028999999961933,4222393388012675303130025)和0.3%的费用。
因此,其做市商k = 440793144016302785315704912324574874873249338325。
然后,我向其发送了1000000000000000 weth,使池状态更改为(10435617102899999999999961933,233,4233,4253.到44078825189922742914812232388888881530978138779512。
任何人都可以让我知道为什么k不根据定义保持其价值不变?
I was watching the state of the WETH-DAI pool on Ropsten which was (10435607102899899961933, 422393388012675303130025) and its 0.3% fee.
So its market maker k = 4407931440163027853157049123245748733249338325.
Then I sent 1000000000000000 WETH to it making the pool state changed to (10435617102899899961933, 422388295347420373432664) and the k changed to 4407882518992274291481223238881530978138779512.
Can anyone let me know why the k not keeping its value unchanged by definition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所谓的“恒定产品”公式正在欺骗,因为由于UNISWAP的0.3%费用,K值实际上会在每笔交易上发生变化。如果不涉及费用,这只是一个恒定的产品。
该费用作为流动性存入游泳池,并在游泳池中增加流动性会改变您所看到的K值。
我发现文章在解释在不同情况下如何影响K值有用。
The so called "constant-product" formula is deceiving since the K value will actually change on each transaction because of Uniswap's 0.3% fee. It's only a constant product if there's no fee involved.
The fee is deposited as liquidity in the pool, and adding liquidity to the pool changes the K value which is what you're seeing.
I found this article to be useful in explaining how the K value is affected in different scenarios.