我们应该如何想象 Uniswap v4?

币圈资讯 阅读:37 2024-04-22 11:43:20 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

作者:A51 Finance 翻译:善欧巴,比特币买卖交易网

关于 Uniswap v4 以及它将如何彻底改变 DeFi 领域的文章已经有很多,但只有少数文章是用来指导开发人员如何为其发布做准备的。任何想要在 Uniswap 上创造一些东西的人都会很难理解从哪里开始。信息碎片化且不易获取。

本文试图解决这个问题。我们将详细介绍 Uniswap v4 中的每个概念,以便您在它最终发布时能够以最佳方式定位自己。

想象一下 Uniswap v4 与 Uniswap v4 的对比 v3

Uniswap Labs 希望 Uniswap v4 成为 AMM 的平台,这意味着 Uniswap v4 不再只是一个 AMM,而是一个构建 AMM 的平台。在接受 Bankless 采访时,Hayden Adams 将 Uniswap v4 与以太坊及其以汇总为中心的路线图进行了比较。

Uniswap 正在朝着类似的方向发展,用 hooks 而不是 rollups。就像以太坊一样,Uniswap Labs 也打算保持基础协议简单,没有任何复杂性,所有创新都被推到了边缘,意味着挂钩。Hooks 将成为所有创新发生的地方。这样做的原因之一是 Uniswap v3 的工作方式相当固执己见,但 Uniswap v4 只是一个中立的流动性创新空间,用于构建固执己见的 AMM。这可能会极大地刺激 AMM 领域的创新。

这让我想起Vitalik 写的关于区块链设计结局的文章,他认为所有的区块链最终都会收敛到类似的设计,无论它们是以 L2 为中心的链还是整体链。这似乎是 Uniswap v4 的结局,而 v5 可能会将 Uniswap 带到应用链。

Uniswap v4“不再只是一个 AMM”是什么意思?

这意味着Uniswap v4不仅是一个资产交换平台,也是一个开发者可以构建自己的定制AMM的平台。

既然分叉激励不再存在,其他 AMM 会发生什么?

许多 AMM 是 Uniswap v2 或 v3 的分叉,在 Uniswap 已经占据主导地位的链上,未来将面临一段艰难的时期。他们可能也必须开始在 Uniswap v4 上进行构建。除此之外,绝大多数 AMM 的唯一创新都是围绕 LP 费用,但由于 Uniswap v4 现在允许您在其生态系统中完成所有这些操作,由于 Uniswap 生态系统的巨大网络效应,这些 AMM 可能不再那么有利可图。

v4 与 v3 中的想象池

池在 v4 和 v3 中具有非常不同的含义。在 Uniswap 的早期版本中,所有流动性都驻留在池中,每个池都是一个单独的合约。在 v4 中,所有流动性都存在于单例合约中,池只是您使用 hooks 进行的所有可定制性的包装

任何人都可以使用自己的自定义挂钩初始化自己的池,这意味着实际上一对代币可能存在数百个甚至数千个池。

单例合约和池之间的流动性如何运作

所有池中的资产本身都驻留在一份合约中,但受池管理。池是设定价格比率、附加挂钩和进行交易的地方。

我们是否应该担心同一份合约中的所有流动性?

绝对不。单例架构过去已经尝试过并且效果良好。Balancer 一直是单例架构的支持者。在气体效率方面,它比工厂架构具有巨大的优势。如果有人担心单例合约中的潜在漏洞可能会使所有资产面临风险,那么也应该意识到工厂架构在这方面也好不到哪儿去,因为工厂合约中的漏洞也意味着该段代码会被复制到工厂部署的所有合约意味着现在所有合约都存在该漏洞。

Uniswap v4 上可以构建什么

在自动做市商 (AMM) 的背景下,Uniswap v4 引入了挂钩和更加以平台为中心的方法,可以创建高度专业化和创新的 AMM。以下是一些具体的可能性:

自定义费用结构:开发人员可以创建具有独特动态费用模型的 AMM,根据市场状况、交易量甚至一天中的时间进行调整,以优化流动性提供者的回报和交易者成本。

动态流动性分配: Uniswap v4 上的 AMM 可以根据算法自动调整不同价格范围的流动性,最大限度地提高资本效率并可能减少无常损失。

集中的流动性头寸:虽然 Uniswap v3 引入了集中的流动性,但 v4 可以允许对流动性头寸进行更精细的控制,使开发人员能够创建迎合特定细分市场或策略的 AMM。

流动性提供商 (LP) 策略挂钩: AMM 可以设计为允许 LP 实施自定义流动性策略,例如自动重新平衡、收益率优化或与其他 DeFi 协议集成以获得额外收益。

滑点保护机制: Uniswap v4 上的 AMM 可以包括高级滑点保护,使用钩子与预言机或其他数据源集成,实时调整矿池参数,以保护用户免受抢先交易或价格操纵的影响。

跨协议 AMM:通过利用 hooks,开发人员可以创建跨不同协议工作的 AMM,从而实现流动性共享并增加市场深度。

特定于代币的 AMM: AMM 可以针对特定类型的代币(例如稳定币、治理代币或实用代币)进行定制,从而针对这些代币的特定特征优化交易功能。

风险调整型 AMM: AMM 可以根据所交易资产的风险状况来调整费用或流动性深度,从而有可能吸引不同类别的投资者。

具有集成保险的 AMM: Hooks 可以创建具有集成保险机制的 AMM,提供针对智能合约风险或其他 DeFi 相关风险(如分歧损失或 LVR)的保护。

社交交易 AMM:可以在流动性提供者遵循成功交易者或资金池的策略的情况下创建 AMM,自动调整其流动性供应以反映成功的模式。

具有治理功能的矿池:开发人员可以构建包含特定矿池治理功能的 AMM,并可以为社区协作开辟另一个前沿。

通过为流动性提供和交易提供中立的平台,Uniswap v4 使开发人员能够在 AMM 领域进行创新,创建专业且可能更高效的市场。

Uniswap v4 Hooks是一个很棒的列表网站,可以查看迄今为止已构建的内容。

Uniswap v4 的路由和矿池发现问题

由于 Uniswap v3 具有工厂池部署架构,因此它根据费用等级(0.01%、0.05%、0.3%、1%)提供了有限的池变体。池一旦创建,就无法以相同的费用等级重新创建,这意味着每对最多允许创建 4 种类型的池。因此,Uniswap 的交换路由器只会解析池中这些层的交易。

通过引入单例架构和具有单独钩子集成的池创建,池位置与钩子可以有无限的组合,这很棒,因为任何人都可以使用一组自定义逻辑创建自己的池版本,以促进流动性提供和交易。虽然这种定制打开了创新之门,但同时也为 Uniswap 或 Uniswap X 的交换路由器造成了决策真空。以下是矿池创建者将面临的一些矿池发现问题。

  1. 头寸发现: Uniswap X 交换路由器要求填充者从任何地方提供最佳交易报价,无论交易是否在 Uniswap 上。单个资金池头寸创建者必须在该头寸中创建足够的流动性深度,才能引起填充者的注意。

  2. 挂钩执行依赖性:交易填充者是挑剔的,因此只有选择性头寸才会用于填充交易,这意味着附加到其他不会被选中的头寸的挂钩将闲置。 假设池仓位附加了一个限价单挂钩,则需要触发其后的 Swap 事件才能实际了解价格变化,从而导致其填写限价单。这对于该职位的用户来说效率很低。

  3. 交换接口: v3 中的新策略构建者和池创建者并不担心必须要求他们的社区从特定层进行交换或构建自己的交换接口,因为选择有限,发现更容易。在 v4 中,他们将必须宣传其头寸,并且可能必须构建其微型交换前端以保持交易通过其头寸。这种方法的局限性在于,他们最初不会通过登陆 Uniswap 前端的大多数用户的钩子获得交易量。

结论

总而言之,Uniswap 正在迈向另一个未知的流动性和交易体验领域,该领域最终将转变为本地流动性层,许多流动性和货币市场将建立在该层上,模块化 AMM 将成为一种常态。然而,过渡仍然需要解决一些可能产生的真空,即通过几乎数千个具有自定义挂钩的独特头寸公平分配交易优先级以及用户体验,因为其前身 v3 存在 LP 盈利能力的基本问题,因为波动性的出血性无常损失。


There have been many articles about and how it will completely change the field, but only a few articles are used to guide developers how to prepare for its release. Anyone who wants to create something on the internet will find it difficult to understand where to start information fragmentation and it is not easy to get it. This paper tries to solve this problem. We will introduce each concept in detail so that you can position yourself in the best way when it is finally released. Imagine the contrast with. Hoping to become a platform means that it is no longer just one platform, but a built platform. In an interview, it will be compared with Ethereum and its summary-centered road map, and it is developing in a similar direction, instead of keeping the basic protocol simple like Ethereum, all innovations are pushed to the edge, which means that the hook will become the place where all innovations occur. One of the reasons for this is that the working method is quite opinionated, but it is only a neutral flow. Sexual innovation space is used to build opinionated ideas, which may greatly stimulate innovation in the field. This reminds me of the article written about the ending of blockchain design. He believes that all blockchains will eventually converge to similar designs, whether they are center-oriented chains or whole chains. This seems to be the ending and may bring it to the application chain. What do you mean, it means not only an asset exchange platform, but also a developer can build his own customized platform. Since bifurcation is exciting, There is no longer anything else that will happen. Many yes or no forks in the already dominant chain will face a difficult period in the future. They may also have to start building on the internet. Besides, most of the only innovations are around the cost, but because you are now allowed to complete all these operations in its ecosystem, these may no longer be so profitable because of the huge network effect of the ecosystem. The imagination pool in harmony has a very different meaning in the early version of. All liquidity resides in the pool, and each pool is a separate contract. In the pool, all liquidity resides in a single contract. The pool is just all customizable packaging that you use. Anyone can initialize his own pool with his own custom hook. This means that there may actually be hundreds or even thousands of pools for a pair of tokens. How does the liquidity between the single contract and the pool work? All the assets in the pool reside in a single contract, but the pool is managed by the pool, and the price ratio is set. Should we worry about all the liquidity in the same contract? The single-case structure has been tried in the past and has been a supporter of the single-case structure with good results. It has great advantages over the factory structure in gas efficiency. If someone is worried that the potential loopholes in the single-case contract may put all assets at risk, then they should also realize that the factory structure is not much better in this respect, because the loopholes in the factory contract also mean that this generation. The code will be copied to all contracts deployed in the factory, which means that all contracts now have this loophole. What can be built? In the context of automatic market makers, the introduction of hooks and a more platform-centric approach can create highly specialized and innovative. The following are some specific possibilities: the developer can create a unique dynamic cost model, which can be adjusted according to market conditions and even the time of day to optimize the returns of liquidity providers and traders. Cost dynamic liquidity allocation can automatically adjust the liquidity of different price ranges according to the algorithm to maximize capital efficiency and possibly reduce impermanent losses. Although centralized liquidity is introduced, it can allow more detailed control of liquidity positions, enabling developers to create liquidity provider strategies that cater to specific market segments or strategies. Hooks can be designed to allow the implementation of custom liquidity strategies, such as automatic rebalancing, yield optimization or Integrating with other protocols to obtain additional benefits, the slip point protection mechanism can include advanced slip point protection, using hooks to integrate with Oracle or other data sources to adjust mine pool parameters in real time to protect users from preemptive trading or price manipulation. Through the use of developers across protocols, it is possible to create tokens that work across different protocols to achieve liquidity sharing and increase market depth. Token-specific tokens can be customized for specific types of tokens, such as stable currency management tokens or practical tokens, so as to Optimize the trading function according to the specific characteristics of these tokens. Risk adjustment can adjust the cost or liquidity depth according to the risk status of the traded assets, which may attract different types of investors with integrated insurance. It can create protection against smart contract risk or other related risks, such as divergence loss. Social transactions can automatically adjust their liquidity supply if liquidity providers follow the strategy of successful traders or fund pools. In order to reflect the successful model, mine pool developers with governance functions can build a mine pool with specific governance functions and open up another frontier for community collaboration. By providing a neutral platform for liquidity provision and trading, developers can innovate in the field and create a professional and possibly more efficient market. It is a great listing website, which can view the routing of the content built so far and find problems in the mine pool. Because of the factory pool deployment architecture, it is proposed according to the cost level. Once a pool with limited resources is created, it cannot be recreated at the same expense level, which means that each pair is allowed to create at most two types of pools. Therefore, the switching router will only analyze the transactions of these layers in the pool. By introducing singleton architecture and pool creation with individual hook integration, there can be unlimited combinations of pool locations and hooks, which is great because anyone can create their own version of the pool using a set of custom logic to promote liquidity provision and transactions, although this customization has opened up innovation. At the same time, it also creates a decision-making vacuum for the exchange router of OR. The following are some problems that the mine pool creator will face. The position discovery exchange router requires the filler to provide the best trading quotation from anywhere, regardless of whether the transaction is on the single fund pool position. The creator must create enough liquidity depth in the position to attract the attention of the filler. The filler is picky in hooking dependent transactions, so only selective positions will be used to fill the transaction, which means that the hooks attached to other positions that will not be selected will be idle. Assuming that a limit order hook is attached to the pool position, it needs to be triggered. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=62385

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友