题目
46912 Quiz 2 Automatic Market Maker Examples
单项选择题
Suppose we have a smart contract that is able to exchange CT tokens for TT tokens and TT tokens for CT tokens. It is based on a constant product formula. The number of CT tokens times the number of TT tokens is always equal to 200. The current market price of a CT token is 5 ETH and the current market price of a TT token is 10 ETH. To allow swaps, the contract is initially provide with 20 CT tokens and 10 TT tokens. Note: This is a constant product AMM. If a trader sends 5 CT tokens to the contract, how many TT tokens should she expect in exchange? (We are not concerned with fees.)
选项
A.1
B.4
C.2
D.3
E.5
查看解析
标准答案
Please login to view
思路分析
Start by identifying the constant product invariant: CT_tokens_in_pool × TT_tokens_in_pool = 200, which is the k value.
Initially, the pool has 20 CT and 10 TT, and 20 × 10 = 200, so the invariant holds.
Now a trader sends 5 CT tokens to the contract. The CT side of the pool increases to 20 +......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
Which statement is false about Uniswap V2?
Suppose we have a smart contract that is able to exchange CT tokens for TT tokens and TT tokens for CT tokens. The current market price of a CT token is 5 ETH and the current market price of a TT token is 10 ETH. The contract is written to always exchange at the rate of 2 CT tokens for 1 TT token and 1 TT token for 2 CT tokens. To allow swaps, the contract is initially provide with 20 CT tokens and 10 TT tokens. Note: This is not a constant product AMM. Suppose the market price (in ETH) of TT tokens doubles. This contract will
In a consumer society, many adults channel creativity into buying things
Economic stress and unpredictable times have resulted in a booming industry for self-help products
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!