<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>W3.Hitchhiker</title>
        <link>https://paragraph.com/@w3hitchhiker</link>
        <description>W3.Hitchhiker aims to discover cutting-edge tech and innovative teams by first principles thinking and long-term analysis strategies.</description>
        <lastBuildDate>Wed, 20 May 2026 06:07:34 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>W3.Hitchhiker</title>
            <url>https://storage.googleapis.com/papyrus_images/bb992376850fb7bfadf539d8707fd8018fe50506f70fedb115d68462f2bf3823.jpg</url>
            <link>https://paragraph.com/@w3hitchhiker</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Web3行研会分享（2023/03/31期）：探索 Celestia 的核心技术与最新进展（In Chinese）]]></title>
            <link>https://paragraph.com/@w3hitchhiker/web3-2023-03-31-celestia-in-chinese</link>
            <guid>P9JawmdF2QAHJtCvCfHU</guid>
            <pubDate>Thu, 20 Apr 2023 06:04:14 GMT</pubDate>
            <description><![CDATA[YouTube： Bilibili：Web3行研会分享（2023/03/31期）：探索 Celestia 的核心技术与最新进展_哔哩哔哩_bilibili本期由 W3 Hitchhiker @Hoyt 将跟大家全面讲解 Celestia ，带大家深入探索 Celestia 的核心技术与最新进展，干货满满！欢迎关注我们各个channel！公众号：Web3行研会Twitter：https://twitter.com/Web3BuidlGroupB站：https://space.bilibili.com/1203944704YouTube：https:, 视频播放量 316、弹幕量 0、点赞数 5、投硬币枚数 4、收藏人数 7、转发人数 1, 视频作者 Web3BuidlerTech, 作者简介 Web3BuidlerTech 是一个完全开放的、为大家提供web3和最新技术的学习型Dao组织。，相关视频：Web3行研会分享（2023/03/17期）：全链上动态NFT技术分析及未来趋势探讨，以太坊中文周会（2024/07/15期）：每周简报Weekly Briefing，Web3行研会...]]></description>
            <content:encoded><![CDATA[<p><strong><em>YouTube：</em></strong></p><div data-type="youtube" videoId="O2KHor155dY">
      <div class="youtube-player" data-id="O2KHor155dY" style="background-image: url('https://i.ytimg.com/vi/O2KHor155dY/hqdefault.jpg'); background-size: cover; background-position: center">
        <a href="https://www.youtube.com/watch?v=O2KHor155dY">
          <img src="{{DOMAIN}}/editor/youtube/play.png" class="play"/>
        </a>
      </div></div><p><strong><em>Bilibili：</em></strong></p><div data-type="embedly" src="https://www.bilibili.com/video/BV12L411X7mi/?spm_id_from=333.999.0.0&amp;vd_source=38efe0b12a444636078c0a66d93eb905" data="{&quot;provider_url&quot;:&quot;https://www.bilibili.com&quot;,&quot;description&quot;:&quot;本期由 W3 Hitchhiker\u0003 @Hoyt 将跟大家全面讲解 Celestia ，带大家深入探索 Celestia 的核心技术与最新进展，干货满满！欢迎关注我们各个channel！公众号：Web3行研会Twitter：https://twitter.com/Web3BuidlGroupB站：https://space.bilibili.com/1203944704YouTube：https:, 视频播放量 316、弹幕量 0、点赞数 5、投硬币枚数 4、收藏人数 7、转发人数 1, 视频作者 Web3BuidlerTech, 作者简介 Web3BuidlerTech 是一个完全开放的、为大家提供web3和最新技术的学习型Dao组织。，相关视频：Web3行研会分享（2023/03/17期）：全链上动态NFT技术分析及未来趋势探讨，以太坊中文周会（2024/07/15期）：每周简报Weekly Briefing，Web3行研会分享（2023/01/09期）：每周简报Weekly Briefing，以太坊中文周会（2024/07/08期）：每周简报Weekly Briefing，Web3BuidlerTech分享（2024/01/12期）：MEV 101，Web3BuidlerTech分享（2024/07/19期）：The Surge: Scaling Ethereum to 100K TPS，Web3BuidlerTech分享（2023/12/29期）：庖丁解牛：Ordinals和BRC20技术原理解析，以太坊中文周会（2024/09/09期）：每周简报Weekly Briefing，Web3行研会分享（2022/12/02期）：新公链 Sui 技术解读，Web3行研会分享（2023/05/11期）：Web3开发共学系列第一期 Learn 4844 by Coding&quot;,&quot;title&quot;:&quot;Web3行研会分享（2023/03/31期）：探索 Celestia 的核心技术与最新进展_哔哩哔哩_bilibili&quot;,&quot;author_name&quot;:&quot;Web3BuidlerTech&quot;,&quot;url&quot;:&quot;https://www.bilibili.com/video/BV12L411X7mi/&quot;,&quot;thumbnail_width&quot;:100,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Bilibili&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:100}" format="small"><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://www.bilibili.com/video/BV12L411X7mi/?spm_id_from=333.999.0.0&amp;vd_source=38efe0b12a444636078c0a66d93eb905" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Web3行研会分享（2023/03/31期）：探索 Celestia 的核心技术与最新进展_哔哩哔哩_bilibili</h2><p>本期由 W3 Hitchhiker @Hoyt 将跟大家全面讲解 Celestia ，带大家深入探索 Celestia 的核心技术与最新进展，干货满满！欢迎关注我们各个channel！公众号：Web3行研会Twitter：https://twitter.com/Web3BuidlGroupB站：https://space.bilibili.com/1203944704YouTube：https:, 视频播放量 316、弹幕量 0、点赞数 5、投硬币枚数 4、收藏人数 7、转发人数 1, 视频作者 Web3BuidlerTech, 作者简介 Web3BuidlerTech 是一个完全开放的、为大家提供web3和最新技术的学习型Dao组织。，相关视频：Web3行研会分享（2023/03/17期）：全链上动态NFT技术分析及未来趋势探讨，以太坊中文周会（2024/07/15期）：每周简报Weekly Briefing，Web3行研会分享（2023/01/09期）：每周简报Weekly Briefing，以太坊中文周会（2024/07/08期）：每周简报Weekly Briefing，Web3BuidlerTech分享（2024/01/12期）：MEV 101，Web3BuidlerTech分享（2024/07/19期）：The Surge: Scaling Ethereum to 100K TPS，Web3BuidlerTech分享（2023/12/29期）：庖丁解牛：Ordinals和BRC20技术原理解析，以太坊中文周会（2024/09/09期）：每周简报Weekly Briefing，Web3行研会分享（2022/12/02期）：新公链 Sui 技术解读，Web3行研会分享（2023/05/11期）：Web3开发共学系列第一期 Learn 4844 by Coding</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://www.bilibili.com</span></div></div></a></div></div><hr><h3 id="h-celestia" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Celestia 在线分享笔录第一部分——核心概念</h3><p><em>Celestia Online Sharing Transcript Part 1 - Core Concepts</em></p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第二部分：白皮书中的核心技术</h3><p><em>Part2：Core Technology in Whitepaper</em></p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第三部分：最近进展，测试网和翻译</h3><p><em>Part3：News and Progress, Testnet Practice and Translation</em></p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第四部分：市场评估</h3><p><em>Part4：Market Evaluation</em></p><p>（后面三部分暂时不打算弄了，因为实在太长，而且技术有关的东西，也需要演示，感兴趣的朋友请看视频）</p><p><em>( I don&apos;t plan to work on the remaining three parts for now because they are too long and also involve technical demonstrations. Interested friends please watch the video. )</em></p><hr><h3 id="h-host" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Host：</h3><blockquote><p><strong>欢迎大家来到我们 web3 行研会每周的分享，这次非常高兴是来自 w3.hitchhiker 的 hyot，为我们带来 celestia 的技术的分享。</strong><br><em>Welcome everyone to our weekly sharing at the web3 research seminar. We are delighted to have Hyot from W3.Hitchhiker to share with us about the technology of Celestia.</em></p></blockquote><h3 id="h-speaker" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Speaker：</h3><blockquote><p><strong>大家好，我是 W3 的技术合伙人 hoyt，很高兴今天 web3 行研会提供这么一个机会，让我来分享 celestia 相关的一些核心技术和进展。</strong> <em>Hello everyone, I&apos;m Hoyt, the technical partner at W3. I&apos;m delighted to have this opportunity at the web3 research seminar today to share with you some of the core technologies and progress related to Celestia.</em></p></blockquote><blockquote><p><strong>我们 w3 团队是一个小的投研团队，也是一个一级基金，目前主要的人员来自传统的金融机构，互联网以及游戏大厂，推崇技术导向的基础设施协议，致力于和项目方共同成长。</strong> <em>Our W3 team is a small research and investment team, as well as a first-tier fund. Currently, most of our team members come from traditional financial institutions, famous internet entities, and large gaming companies. We advocate for technology-driven infrastructure protocols and are committed to growing together with project teams.</em></p></blockquote><blockquote><p><strong>来这个会讲的一般都是项目方，但我们不是项目方，所以我先把项目方介绍一下。</strong> <em>Meet the team：</em></p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://celestia.org/team/">https://celestia.org/team/</a></p></blockquote><blockquote><p><em>Usually, the speakers at this seminar are project teams, but we are not the project team. So, let me introduce the project team first.</em></p></blockquote><blockquote><p><strong>因为今天时间有限，我就不详细介绍，第一排就是一些创始人，第二排主要就是核心的开发人员，然后下面还有一些其他的比如说 yas，是社区的主要的沟通者，基本上算是发言人，包括项目方的在线会议一般都是由他来主持，然后其他还有一些像在 discord 上面，一直测试网为大家服务的 pops 的几位运维的大牛，我跟这上面还对不上号，我也不是特别清楚，所以大概的一个项目方的介绍就先到这里了。</strong><br><em>Due to time constraints today, I won&apos;t go into detail. The first row consists of the founders, and the second row mainly includes core developers. There are also others need to be mentioned, such as Yas, who is the main communicator in the community and serves as a spokesperson. He usually hosts online meetings for the project team. Additionally, there are some experts in operations and maintenance, such as Pops team, who have been helping the community very well on the testnet on Discord for a long time. I&apos;m not very familiar with all of them, so this is a brief introduction of the project team.</em></p></blockquote><blockquote><p><strong>回到今天的项目这一块，那么先说一下什么是 celestia。 celestia 是一个专注于模块化的公链项目，那么在区块链的领域，这个模块化是一个怎么样的概念，也是一个新提出来的概念，我们稍后会花时间来重点讲一下这一块。</strong> <em>Moving on to today&apos;s project, let&apos;s first talk about what Celestia is. Celestia is a public chain project that focuses on modularity. In the field of blockchain, modularity is a new concept that we will spend some time later on to discuss in detail.</em></p></blockquote><blockquote><p><strong>其实很多人了解 celestia 主要是从数据可用性的这一块进来的，之前的很多中文的介绍材料都是集中在数据可用性这块，我今天提出来这一点，其实也是想跟大家更正一下，大家都有一个误解，其实 celestia 核心的这一块是在模块化，我稍后会详细展开来讲。</strong> <em>Actually, many people came to know about Celestia mainly from the aspect of data availability. Many Chinese introductory materials about Celestia have focused on this aspect. Today, I want to point out that there is a misunderstanding among many people. In fact, the core of Celestia is modularity, and I will explain this in detail later.</em></p></blockquote><blockquote><p><strong>然后说到数据可用性，其实这也是大家长久以来的一个很大的误解，什么是数据可用性？</strong> <em>Speaking of data availability, it has been a longstanding misunderstanding among many people. So what is data availability?</em></p></blockquote><blockquote><p><strong>大家一直认为是说数据可以从网络中下载到，随时可以下载到，这个是数据可用，这个望文生义就很明白了，但是其实这个不是 celestia 所定义的数据可用性的概念，celestia 定义的数据可用性，是说数据没有被出块者隐瞒，这个可能就不是很好理解，如果对比 BTC ，对比 ETH 来说，这是个什么意思？这数据怎么会被隐瞒了，你一个块出来要做共识对不对？你肯定得发到网上，那怎么会有隐瞒的情况，所以其实是跟链的一个安全模型是有关系的，就像 BTC，ETH 这种它的安全模型，大家可以看到它是一个基于多数诚实假设的要求，链上大部分节点是诚实的，通过一个拜占庭容错的机制来确保。在这个链当中大部分的节点，都是全节点，轻节点是没有什么安全性的，它们是这样一种情况。</strong><br><em>Many people have always believed that data availability refers to the ability to download data from the network at any time. However, this is not the definition of data availability in Celestia. Celestia&apos;s definition of data availability is that the data has not been hidden by the block producer. This may be difficult to understand. If we compare it to BTC or ETH, what does it mean for data to be hidden? Don&apos;t you need to broadcast the block for consensus? Therefore, this is related to the security model of the chain. Just like BTC and ETH, their security models are based on the assumption of the majority being honest. Most nodes on the chain are honest, and this is ensured through a Byzantine fault-tolerant mechanism. In this chain, most of the nodes are full nodes, and light nodes do not have much security. They are in such a situation. celestia</em></p></blockquote><blockquote><p><strong>就完全是另外一种假设，它假设多数节点是不诚实的，目的主要是为了支持轻节点。轻节点顾名思义就是说它不会下载全部的数据，它只会有一部分数据，一个轻节点如果是连接到比如说 n 个全节点，那么在 n 个全节点中，只要有一个是诚实的，那么轻节点的安全就可以在很大程度上得到保障。它是这么一个概念。既然它没有完整的数据，他怎么知道数据是真正被发布到网上了，他怎么来确认这一点呢？所以这个就是一个数据可用性的概念。</strong><br><em>Celesita is a completely different assumption, where it assumes that most nodes are not honest, and its purpose is mainly to support light nodes. A light node, as the name suggests, does not download all the data, it only has some of the data. If a light node is connected to, for example, N full nodes, as long as one of them is honest, the security of the light node can be largely guaranteed. This is the concept behind it. Since the light node does not have all the data, how does it know if the data has really been published on the internet and how does it confirm this? So, this is a concept of data availability.</em></p></blockquote><blockquote><p><strong>对全节点来说是没有这个问题的，轻节点会有这个问题，那么为什么要有轻节点，这就是为了做数据扩容。如果你链上都是全节点的话，大家都要参与共识，大家都要把所有的数据从头到尾处理一遍，那么要协调这么多的节点，要保证链的安全的话，扩容是非常难做的。</strong><br><em>For full nodes, this is not a problem, but for light nodes it is. So why do we need light nodes? It is for data scaling. If all the nodes in the chain are full nodes, everyone must participate in consensus and process all the data from beginning to end. Coordinating so many nodes and ensuring the security of the chain makes scaling very difficult.</em></p></blockquote><blockquote><p><strong>这是现在 ETH 面临的一个突出的问题，那么 celestia 就提供对轻节点的支持，来达到扩容的目的。但是这个数据可用性我刚才讲了，它其实不是 celstia 最核心的一块，为什么？等一会儿也会要讲到，那么它真正最核心的一块，是模块化，模块化也是个新概念，是个什么意思呢？</strong><br><em>This is a prominent problem that ETH is facing now, and Celestia provides support for light nodes to achieve scalability. However, as I mentioned earlier, data availability is not actually the most critical part of Celestia. Why? We will talk about it in a moment. The truly core aspect of Celestia is modularity, which is a new concept. What does modularity mean？</em></p></blockquote><blockquote><p>**就是说像 ETH 这样的链大家都知道它是在一条链上面把执行层、结算层还有共识，包括数据的存储这些东西，它都打包在一起了，我们把称为整体的链或者是集成的链，它每一条链都有完整的端到端功能，包括 ETH 也好，像什么 AVAX 这些对吧，它都是这样一种形态的。 **<em>In other words, chains like ETH integrate the execution layer, settlement layer, consensus, and data storage into one chain. This integrated chain is referred to as monolithic chain, where each chain has complete end-to-end functionality, including ETH, as well as other chains like AVAX.</em></p></blockquote><blockquote><p><strong>Celestia 就提出来一种新的形态，就是我一条链只做这其中的一种功能，就比如我这条链只做共识，我这条链只做执行，我这条链只做结算这样的，就把整体的链的功能做了打散，这样有什么好处？从技术上看，打散以后，我每一个技术团队，我可能精力是有限的，我只负责我自己最擅长的那一块，比如我擅长做执行提高效率，那么我就只做执行这一块。然后我不用去考虑太多对链的整体的影响，就精力会更集中一点。</strong><br><em>Celestia proposes a new approach where each chain only performs one of these functions. For example, one chain may only handle consensus, another may only handle execution, and yet another may only handle settlement. By breaking down the functions of the integrated chain, it has several benefits. From a technical perspective, breaking down the chain allows each technical team to focus on their core strengths and responsibilities. For instance, a team that excels in improving execution efficiency can concentrate solely on the execution aspect, without needing to consider the overall impact on the chain. This approach enables teams to better concentrate their efforts and resources on a specific function.</em></p></blockquote><blockquote><p><strong>现在 ETH，比如你想要实现一个功能，那么首先要社区讨论，然后要 EIP，又要开发客户端，要上测试网测试，最后你要等待一个发布的时机，这个功能才能上线。这样就会拖得比较长，可能一年两年前你要一个功能，到现在还没出现，这样对技术的发展就会有一定的阻碍。所以 celestia 这个模块化想要解决的一个问题，我相信大部分做技术的朋友可能会更喜欢这样一种，更专注于自己那一块的方式。</strong><br><em>Currently, for ETH, if you want to implement a new feature, you first need to discuss it with the community and create an EIP. Then you need to develop a client, test it on the testnet, and wait for the feature to be released. This process can take a long time, and the technical development can be hindered. Celestia&apos;s modularity approach aims to address this issue. I believe most technical professionals would prefer a more focused approach, where they can concentrate on their core expertise, and avoid being slowed down by the overall development process.</em></p></blockquote><blockquote><p><strong>下面我们说回到 celestia 整个架构提供一些什么样的特性？主要就三个特性，首先最重要是安全性，就是刚才讲了它是最小诚实假设的这么一个模型。然后还有扩展性，通过做模块化来提供的扩展性，以及吞吐量的问题，最后他又提出来一个概念是链的主权的问题，主权问题我们也等一下再详细来讲。</strong><br><em>Let&apos;s talk about the features provided by the Celestia architecture? There are three main features. Firstly, the most important one is security, as we mentioned earlier, it is based on the dishonest-majorities-assumption model. Secondly, there is scalability, which is achieved through modularity. There is the issue of throughput also. Finally, the concept of chain sovereignty is introduced, and we will discuss this in more detail later.</em></p></blockquote><blockquote><p><strong>首先说安全性的问题，共享的安全性的话，它是一个什么意思？就是说由不同的模块或者是不同的应用加入到整个网络里面来，每个应用每个网络它可能只关心自己的数据，但是它在维护整个网络的安全性的时候，它是不分彼此，大家是共同来维护网络安全。比如它在数据采样的时候，它不是只采样自己的数据，它在用数据的时候它只下载自己的数据，但是它在数据采样的时候，它实际上是会去下载别人的数据来来做采样，但是采样的数据只是整体数据的很小的一部分，就不会对它带来特别大的负担，那么大家这样来共同维护链的安全性。</strong><br><em>First, let&apos;s talk about the issue of security. What does &quot;shared security&quot; mean? It means that different modules or applications are joined together in the network, and each application or network may only care about its own data. However, when maintaining the security of the entire network, everyone works together to maintain network security. For example, during data sampling, it does not only sample its own data. When using data, it only downloads its own data. However, during data sampling, it actually downloads other people&apos;s data to do sampling, but the sampled data is only a small part of the overall data, so it won&apos;t bring a particularly large burden to it. In this way, everyone works together to maintain the security of the chain.</em></p></blockquote><blockquote><p><strong>然后反复说了，基于最小诚实假设。那么它对于安全性的要求就是不要求多数节点诚实，就是只要求连接到的节点中一部分是诚实的就可以了，所以这样它在某一个方面来说是会比 eth 这样更安全一些，但是它有相对来说没那么好的地方，在后面我们再讲，这些就是安全性的一块。</strong><br><em>I emphasize again that Celestia&apos;s security is based on the dishonest-majorities-assumption. This means that it does not require the majority of connected nodes to be honest, and only a portion of the nodes need to be honest to ensure security. In this aspect, Celestia may be more secure than Ethereum. However, there are also drawbacks to this approach, which will be discussed later. This concludes the discussion on the security aspect of Celestia.</em></p></blockquote><blockquote><p><strong>然后还有扩展这一块，它主要就是通过刚才说的模块化的这样一个方式来实现的。然后他认为这样，比如链上做执行的项目可能有两三家，然后做共识，做结算的项目可能又有两三家，那么你如果是做应用的话，你可以根据你自己的需求，来选择不同的项目来进行组合，最后做成一个端到端的，给用户提供服务的一个应用。</strong><br><em>The next aspect is scalability, which is mainly achieved through modularization as mentioned earlier. The idea is that there may be two or three projects that handle execution on the chain, and another two or three projects that handle consensus and settlement. As an application developer, you can choose different projects based on your own needs and combine them to create an end-to-end application that provides services to users.</em></p></blockquote><blockquote><p><strong>那么它跟 ETH 这种就很不一样，ETH 本身它就提供了完整的功能，你拿着这一条链，就可以直接在上面开发合约，做应用，开发 DAPP 什么的，你就直接可以做了。但是 celestia 是不行的，它这样一个模块化的概念之后，它 celestia 的主链只是承担了一个简单的共识，和数据可用性的功能，其他的功能它是没有的。所以你只是用主链的话，你几乎什么也做不了，你只能做一些像存储这样的，业务逻辑非常简单的这样一些应用，所以这个是很不一样，那么现在就需要两方面，一个是要有项目组来提供其他的一些模块，另一个是要有人来把这些模块给串起来，这是 celestia 要面对的两个问题。所以为什么大家一直觉得 celestia 项目提出了这么久，好像也很难落地，好像有点空，就是这个原因。因为项目组，就 celestia 自己项目组它是不愿意去做。其实这是他的理念，他是不愿意去把所有的这些功能都做了，一是他自己精力有限，他不认为他能够做到有竞争力。二是如果什么模块都有一个官方的，可能就挤占了第三方的一些发展空间，这样就不利于整个社区生态的繁荣，所以这个是他的理念。</strong><br><em>Compared to Ethereum, Celestia is very different. Ethereum provides a complete set of functionalities, so developers can develop contracts, applications, and DApps directly on the chain. However, Celestia cannot do this. After introducing the concept of modularity, the main chain of Celestia only provides simple consensus and data availability functions, and lacks other functionalities. If you only use the main chain, you can hardly do anything, except for some very simple applications with simple business logic, such as storage. Therefore, there are two issues that Celestia needs to address: one is to have project teams to provide other modules, and the other is to have people to integrate these modules. This is why people have felt that Celestia has been proposed for so long but has yet to be implemented. This is because the Celestia project team is not willing to do everything. This is their philosophy. First, their own resources are limited, and they don&apos;t believe they can be competitive in all areas. Second, if there is an official module for everything, it may squeeze the development space of third parties, which is not conducive to the prosperity of the entire community ecology.</em></p></blockquote><blockquote><p><strong>另外，说到吞吐量，大家知道 celestia 它的所谓的吞吐量，它是没有执行，然后又没有结算，没有这些东西，然后他就说他吞吐量很大，有人就会觉得就很没有意思，你这个什么都不做，然后你吞吐量很大有什么意思？但其实这个不是bug，这是一个特性，为什么这样说呢？比如说执行，你需不需要这个是看你的应用的需求。假如说你真的只是做像存储这样的应用的话，那么你其实不需要执行对不对？那么确实它可以实现很高的吞吐量。如果是在 ETH 上面？你要实现一个存储，即使这么简单的功能，你还是要去弄一个合约，做一些接口，你还要走 calldata ，费用又很高，就减不下来，已经那么复杂了，就是上去了，就下不来，有这个问题。然后假如你这个应用，你真的需要执行层，或者结算层什么的，那么你去选择一个高性能的执行层，选择一个高性能的结算层。刚才说了可能有那么两三家在竞争的，你去选择一个最好的，最有利于你的一个项目，这样对项目方来说，他们就也有一个竞争。适度的竞争，也会促进整个技术的发展，所以 celestia 的理念是这样子。</strong><br><em>Regarding throughput, you may know that Celestia claims to have a high throughput, but it doesn&apos;t involve execution or settlement. Some people may think it&apos;s not meaningful to have a high throughput when you&apos;re not doing anything. However, this is not a bug, it&apos;s a feature. Whether you need execution or not depends on your application requirements. For example, if you&apos;re only doing storage-related applications, you don&apos;t need execution, and it can achieve a high throughput. However, if you&apos;re on ETH, even if you&apos;re implementing a simple storage function, you still need to create a contract, do some interfaces, and use calldata, which is expensive and complicated. If your application really needs execution or settlement, you can choose a high-performance execution or settlement layer. As mentioned earlier, there may be two or three competitors to choose from, and you can choose the best one that suits your project, which will promote competition and the development of technology. This is the philosophy of Celestia.</em></p></blockquote><blockquote><p><strong>再就是主权的问题，它认为有两方面的主权，一个是说你的状态的最终确认的一个主权。比如说 ETH 上，APP 是在二层的话，你提交到主链上面，有一个合约来验证你，然后如果这个合约通过的话，那么 ETH 的基本的逻辑，6个块以后，你链的状态固定下来，就认为你是完全有效的这么一个状态，那么最终有一个合约来验证。可能因为突发情况，或者临时情况，你以前合约里面没考虑到的一些东西，你现在验证不通过，即使整个社区都认为应该是这样子，但是你没办法，做不了，你要先升级合约对吧？等等。</strong><br><em>Another issue is the sovereignty. Celestia believes that there are two aspects of sovereignty, one being the sovereignty over the final confirmation of your state. For example, on Ethereum, if your app is on layer 2 and you submit it to the main chain, there is a contract that verifies it. If the contract passes, Ethereum&apos;s basic logic is that after 6 blocks, your chain state is fixed and considered to be a completely valid state, verified by the contract. However, due to unforeseen or temporary circumstances, some things that were not considered in the previous contract may now cause the verification to fail. Even if the entire community thinks that it should be verified, you cannot do it, and you need to upgrade the contract.</em></p></blockquote><blockquote><p><strong>那么 clestia 就认为，你为什么要这样？就是认为链的一个基本的概念，你加入一个网络，加入一条链，那么你认可链上面的一些数据，这个数据才对你有意义，如果大家都认可这个数据，大家就达成了共识，所以根本上是一个社区的共识，而不是需要一层的链来做监管这样的一个东西。</strong><br><em>Celestia believes that the fundamental concept of joining a network and joining a new chain is based on the community&apos;s consensus on the data on that chain. The data on the chain is only meaningful to you if you agrees on it, so do everyone in the community. Therefore, it is fundamentally a consensus of the community, rather than a need for a layer of chain to act as a regulator.</em></p></blockquote><blockquote><p><strong>但一层监管就是因为大家都已经认可了 ETH，所以你利用一层监管。但是在 celestia 看来，对于很多应用场景来说是没有必要，如果社区自己可以决定什么样是规范链，那么 celestia 来说，传上来的数据我照单全收，只要是你有签名的我照单全收，然后我再把这个数据吐回给你的网络中的节点，至于你这些节点认不认可这些数据，这些节点你们自己社区说了算。所以说这个是一个最终状态的主权。</strong><br><em>But the reason for the first layer of supervision is because everyone has already recognized Ethereum, so you can use first-layer supervision. However, from Celestia&apos;s perspective, for many use cases, it is not necessary. If the community can decide what is the canonic chain, then for Celestia, it will accept the data you send as long as you have a signature, and then it will return this data to the nodes in your network. As for whether these nodes accept this data, it&apos;s up to your community to decide. Therefore, this is a matter of final sovereignty.</em></p></blockquote><blockquote><p><strong>还有就是功能升级的主权。功能主权是什么意思？功能指的是，比如 ETH 就是 EVM 我想增加一个操作码。那也就是刚才说的，就一整套的复杂流程你要去走，你要考虑方方面面的一些事情，升级做起来就非常得麻烦。celestia 就不这样，因为模块化，每个人专注自己的这一块，你想做什么功能你就做，就放到市场上就市场来检验。大家认不认可你的功能，就看市场就好了。这样就很简单，很直接，你就有一个自由升级，自由分叉的这样一个主权。celestia 它认为就是这两方面来构成了主权。</strong><br><em>Another aspect of sovereignty is the ability to upgrade functionality. What does functionality sovereignty mean? It refers to the ability to add new functionalities to a system, such as adding an opcode to the EVM in Ethereum. However, this process can be complicated and requires a lot of considerations. Celestia takes a different approach by using a modular system, where each person focuses on their own area of expertise. If you want to create a new functionality, you can do so and put it on the market for evaluation. Whether or not your functionality is accepted by the community is determined by the market. This approach is simple and direct, and it provides the freedom to upgrade and fork the system as needed. Celestia believes that these two aspects together constitute sovereignty.</em></p></blockquote><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://mailto:rex@w3hitchhiker.com/"><em>rex@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/6367db1bc775c8f390854b88e44a2b7a5bbb19a3911f8584a17a9f8bf93bb236.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[DeFi 借贷的圣杯：不足额抵押贷款]]></title>
            <link>https://paragraph.com/@w3hitchhiker/defi</link>
            <guid>JegPfGsuqyYsgLP5bBsZ</guid>
            <pubDate>Thu, 13 Apr 2023 02:39:01 GMT</pubDate>
            <description><![CDATA[原文：The Holy Grail of DeFi Lending: Undercollateralized Loans 译者：Jack Ding｜W3.Hitchhiker 编辑：Evelyn｜W3.Hitchhiker介绍在席卷而来的“实际收益率”叙事下，不足额抵押的借贷收入在 DeFi 中越来越受到研究和追捧。认识到加密媒体对这一主题的现有报道非常精彩，我们 Treehouse Research 也想就几个不同的观点分享我们的想法。 在本文中，我们将首先了解什么是信用，以及它为何对经济和企业很重要。然后，研究流行的 DeFi 信贷协议，以及它们与 TradFi / CeFi 借贷相比的优缺点。我们将总结几点我们认为对 DeFi 信贷市场下一阶段增长至关重要的观点。信贷：借贷的现代方式借贷是人类社会最古老的社会经济行为之一，可以追溯到古代美索不达米亚。古代贷款以典当商的形式开始，它们只是以被认为有价值的物品作为抵押的贷款。早期形式的信贷出现是因为资源所有者将生产材料借给劳动工人并期望偿还货物。如果借款人不还款，他的家人就有被当作奴隶的风险。 如今，信贷对企业和整个经济体都很重...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/insights/the-holy-grail-of-defi-lending-undercollateralized-loans"><strong><em>The Holy Grail of DeFi Lending: Undercollateralized Loans</em></strong></a></p><p><em>译者：Jack Ding｜W3.Hitchhiker</em></p><p><em>编辑：Evelyn｜W3.Hitchhiker</em></p><hr><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">介绍</h2><p>在席卷而来的“实际收益率”叙事下，不足额抵押的借贷收入在 DeFi 中越来越受到研究和追捧。认识到加密媒体对这一主题的现有报道非常精彩，我们 Treehouse Research 也想就几个不同的观点分享我们的想法。</p><p>在本文中，我们将首先了解什么是信用，以及它为何对经济和企业很重要。然后，研究流行的 DeFi 信贷协议，以及它们与 TradFi / CeFi 借贷相比的优缺点。我们将总结几点我们认为对 DeFi 信贷市场下一阶段增长至关重要的观点。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">信贷：借贷的现代方式</h2><p>借贷是人类社会最古老的社会经济行为之一，可以追溯到古代美索不达米亚。古代贷款以典当商的形式开始，它们只是以被认为有价值的物品作为抵押的贷款。早期形式的信贷出现是因为资源所有者将生产材料借给劳动工人并期望偿还货物。如果借款人不还款，他的家人就有被当作奴隶的风险。</p><p>如今，信贷对企业和整个经济体都很重要，因为它允许经济单位在不稀释股权的情况下提高营运资本。这种杠杆作用导致投资、资本支出和消费增加，从而导致经济快速增长。</p><p>在 TradFi 中，信用通常可以分为有担保贷款和无担保的信用贷款。抵押贷款是一种有担保的信贷，因为贷款是由财产抵押的。信用卡是一种无担保信贷，或者可以将其视为以借款人的信誉为抵押。信贷创造意味着资产负债表扩张。例如，在典型的抵押贷款中，买家为房产的市场价值支付 10-50% 的首付款，其余部分从银行融资。房产价值与首付款之间的差额是商业银行创造的信贷。在更宏大的计划中，美联储购买美国国债，这是一种向美国联邦政府借款的行为——即美联储（中央银行）向主权国家（政府）创造的信贷。</p><p>相反，在 DeFi 中，现有的大多数借贷协议都是基于超额抵押的基础上，类似于当铺的借贷方式，不涉及创造信用。如果 Elon Musk 不得不放下价值 10 亿美元的特斯拉股票以借入 5 亿美元购买别墅，则相当于 DeFi 中的超额抵押抵押贷款——这对已经拥有 10 亿美元的人来说不是很有吸引力，因为他可以很容易地找到一家银行愿意借给他 US$10B。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">信贷作为企业融资渠道</h2><p>传统企业有两种融资方式：债务融资和股权融资。股权融资涉及稀释所有权，创始人避免这种情况，尤其是在早期阶段，以避免失去股权上行空间。股权融资不会创造信贷，因为企业出售“自身的一部分”以换取现金。</p><p>为了在筹集营运资金的同时保持对其运营和业务决策的多数控制权，企业选择债务融资。债务融资创造信用，因为贷方提供现金或其他营运资金以换取未来本金加利息的偿还，而不是控股权。贷款人也避免承担股权风险，因为他们对借款人的资产拥有债权，而股权持有人则没有。这种形式的融资或贷款通常在企业或公司设法清除金融机构提出的所有要求后提供。</p><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">是什么阻止了 DeFi 中的信用创造？</h2><p>如前所述，<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/learn-defi/how-does-defi-lending-and-borrowing-work">DeFi 借贷</a>在很大程度上仍沿用古老的典当行模式——借款人放下一些有价值的东西作为抵押品，然后取出低于或等于抵押品价值的现金。这最终是因为 DeFi 借贷协议是无需许可的，这在程序上是高效的，并且不会对任何借款人产生偏见。然而，这阻碍了在 TradFi 世界中通常在信贷发起之前进行的贷款前信用检查和了解你的客户 (KYC) 程序。由于主流的 DeFi 借贷协议无法了解借款人的真实身份并评估他们的信用风险，因此它们只能通过超额抵押来确保贷方始终保持完整。</p><p>超额抵押贷款为金融部门提供了许多交易和对冲策略。由于它们不创造信贷，因此它们在非金融业务中的用例是有限的，因为只有资产所有者才能借贷，而穷人无法提高杠杆率。即使对于资产所有者而言，也有比参与 DeFi 借贷更有效的杠杆方式。例如，拥有价值 1000 万美元加密资产的人可能能够从进行 KYC 和信用检查的 CeFi 机构借入 2000 万美元。从本质上讲，<strong>无需许可的核心 DeFi 原则阻止了 DeFi 借贷市场的增长。</strong></p><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">新兴的 DeFi 信用协议</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6de174335f1268daa1c351aad8a27d4808fa80e3ac3eba5c1824e4ed4ed6ce59.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>目前，截至 2022 年 12 月 5 日，DeFi 借贷协议的累计 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/learn-defi/how-to-make-sense-of-metrics-in-defi">TVL</a> 为 US$13.96B，过去一年的每月借贷量从 US$9.37B 到 US$32.46B 不等。尽管这一数字即使在最近的市场收缩期间也一直保持稳定，但与 TradFi 市场相比，这个货币市场的规模仍然相形见绌。</p><p>TradFi 中的信贷市场规模约为 91T 美元，规模大于 TradFi 股票市场和 DeFi 货币市场。这在很大程度上是由于资本效率低下以及缺乏评估和定价 DeFi 信用风险的手段。</p><p>将信用协议引入 DeFi 领域引起了机构借款人和贷款人的浓厚兴趣，尤其是在全球金融体系的流动性被中央银行抽走的时期。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/af2dfbb51083b4825bda23faf64841f2dc0beaeef9f3cbc4f3410678f11a77e0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>TradFi 中的信贷市场规模约为 91T 美元，规模大于 TradFi 股票市场和 DeFi 货币市场。这在很大程度上是由于资本效率低下以及缺乏评估和定价 DeFi 信用风险的手段。</p><p>将信用协议引入 DeFi 领域引起了机构借款人和贷款人的浓厚兴趣，尤其是在全球金融体系的流动性被中央银行抽走的时期。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8b3e0ec2f05c300d21972245713bf76278c5a1076a4e67350f3fdadc383e5147.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>信用协议在 2022 年发放了总计 4.2B 美元的贷款，并且机构借款人有所增加。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/13a28719b18554ecec347c17c454bb6246531ca99a16728f717acec9547351ae.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>此外，Celsius 等大型 CeFi 贷方的违约导致加密金融领域的整体信贷收缩，因为 CeFi 贷方的风险偏好已经降低，使加密机构获得信贷的选择更少。因此，新兴的 DeFi 信用协议可以抢占留下的市场份额真空。例如，Maple Finance在其第二季度报告中指出，贷款人的需求全年保持强劲，23% 的贷款人增加了贷款头寸，增加了对借款人资本的需求。Clearpool还报告其提供的总流动性在 2022 年 9 月达到 1.45 亿美元的峰值，环比增长 30%，而 DeFi 的总流动性下降 26.7%。DeFi 信贷发起的超额增长通常与 CeFi 信贷危机相对应。</p><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">DeFi 信用协议的商业模式</h2><p>大多数 DeFi 信用协议目前不直接发放贷款，而是通过连接借款人和贷方充当信用基础设施提供者。这些信用协议的主要收入来源与其超额抵押协议类似，即来自未偿还贷款的利息收入的一部分。一旦入驻机构开始发放贷款，这些信贷协议通常要么从这些贷款产生的利息收入中抽取一定比例，要么在贷款发放时收取少量费用。例如，Clearpool 采用资金池和贷款的模式，将收取的所有利息支付的 5% 作为协议费用。运行贷款业务设置模型的协议，类似于 Maple，当贷款是由平台上有资金池的任何机构发起时，收取 1% 的设立费。这笔费用的 67% 作为协议收入发送给 Maple DAO。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d39ee50028c82e22e0c74b00543a45d2b24ce7fcb0606298569c5a3706d7aa8a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在过去的一年里，信用协议已经成功地产生了总计 1090 万美元的收入。由于使用这些协议的机构需要持续的流动性，这种收入增长一直相对稳定。</p><p>尽管更广泛的加密货币流动性收缩，但按每月借贷量计算最大的三个信用协议：Maple Finance、<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://truefi.io/">TrueFi</a> 和 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://goldfinch.finance/">Goldfinch</a> 在过去一年中产生了相对稳定的月收入。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/79c91dbc1d83c76688b08edbb009e8bd3e5c04cb323b574b0ad5c9717abff1e0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>这些信用协议向其提供资金的两大类机构是新兴市场中的加密原生机构和企业。目前在这些协议上积极贷款的加密原生机构主要是对冲基金和交易公司。这些公司虽然与 TradFi 同行的业绩相似（如果不是），并且资产负债表健康（尽管我们在 FTX 戏剧中确实看到了意外），但无法通过银行等传统机构获得贷款。</p><p>新兴市场是另一组由这些信贷协议资助的借款人。整个 2022 年，对私人债务风险敞口的需求持续增长，随着该领域的初创企业和技术生态系统不断发展，新兴债务市场也顺应这一趋势。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cf73a89715edc8c27586fff8a707d976ae9b99be742aabddbc99391d385c5c20.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>新兴债务市场为投资者提供了有利的风险回报投资组合，从而产生了对此类债务工具敞口的需求。然而，投资者可能会发现难以进入新兴经济体的债务市场。因此，为了解决这个问题，某些信用协议通过连接潜在的贷方和借款人来提供访问和收益。目前为新兴市场借款人提供服务的协议 Goldfinch 指出，为了尽量减少向仍处于增长阶段的行业提供信贷的风险和不确定性，他们只向历史稳定的成熟信贷基金和金融科技组织提供贷款财务绩效。此外，确保借款人达到令人满意的标准对 Goldfinch 和Credix，因为自成立以来总违约率一直为 0%。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">信用协议基础设施</h3><p>目前为这些协议提供信贷的过程相对相似，在协议机制和贷款管理方面存在一些细微差别。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/40e5c23dcfaa52fc14d36e28757540d104fc445c02eedc4e20f7876ca12f5bb0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">协议级别</h3><p>信用协议通常充当基础设施层，提供贷款发放前<strong>所需的必要风险评估和信用评分专业知</strong>识，以及制定利率机制等协议级决策。尽管与其他 DeFi 货币市场相比，此类信用风险评估决策可能使这些协议的某些方面更加中心化，但它们对于确保平台上借款人的质量符合某些标准以将信用风险降至最低至关重要。<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://credora.io/">协议要么拥有具有多年信用经验的团队，要么使用像Credora</a>这样的集中式信用评级供应商来评估每个潜在借款人的财务状况。</p><p>协议通常还负责为其贷款池设置利率，这些利率可以是动态的，也可以具有固定的默认水平。固定利率协议的示例包括 Maple Finance 和 TrueFi，因为其借贷池的贷款条款通常由借款人和运行池的一方<strong>在链下决定</strong>。动态利率通常使用将资金池利用率考虑在内的算法来确定适当的利率。这种方法被用于像 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://damm.finance/">dAMM</a> 这样的协议中。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">借款人</h3><p><strong>如何借？</strong></p><p>大多数信贷协议中借款人的流程相对标准化，<strong>他们必须完成协议规定的 KYC 和反洗钱 (AML) 程序，并在开设贷款池之前对其财务状况进行分析</strong>。借款人在完成必要的程序后，可以开设一个通常类似于循环信贷额度的借贷池，在借贷池中可以借入不超过一定数量的资金，并可以随时借贷。因为有足够的可用资金。这些流程适用于大多数允许机构建立自己的资金池并直接从中借款的协议，例如 dAMM 和 Clearpool。</p><p>然而，对于使用允许机构设立信贷设施的商业模式的协议，借款人通常必须在设立过程中通过额外的第三方。这个额外的一方扮演池经理的角色，直接与借款人互动，并与他们协商信贷条款。这些矿池管理者通常必须在矿池由他们设置时通过协议通过 KYC 检查。成为池经理类似于经营信贷业务，借款人必须与他们互动才能获得贷款。一旦这些贷款得到管理者的批准，借款人也可以开始从这些资金池中借款。遵循这种结构的协议包括 Maple Finance 和 TrueFi 的资本市场，其中每个池都由一个机构运营，该机构汇集资金并自行批准每个借款人。</p><p><strong>利息支付</strong></p><p>对于大多数协议，利息会在每个时期自动复利，借款人可以灵活地选择在他们认为合适的时候偿还贷款。然而，有一些协议，如 TrueFi，只需要在贷款期限结束时偿还利息，这使得借款人在还款日期到来之前没有义务支付利息。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">贷方</h3><p><strong>如何借出？</strong></p><p>目前，大多数信用协议都运行无许可池，这意味着贷方可以选择将资金存入他们选择的任何池中。只要用户有一个兼容的 Web3 钱包和要存入的资产池，他们就可以向他们选择的贷方提供资金以开始赚取利息。然而，对于某些协议和许可池，贷方需要先完成 KYC / AML 流程，然后才能将资金存入这些池。目前，要求贷方在能够存入资金之前完成 KYC 的三种协议是 Goldfinch、Centrifuge 和 Credix。</p><p><strong>香草借贷池</strong></p><p>当前的大多数协议都采用一种模型，在这种模型中，贷方只需选择他们希望将资金借给的机构，并将资金存入相应的资金池。这类似于在 AAVE 上提供资金，只是借款人是经过 KYC 流程并通过信用协议加入的机构。</p><p><strong>分层贷款池</strong></p><p>有几种协议将他们的贷款池分成不同的部分，使贷方能够选择他们愿意承担的风险量以获得利息收益。Centrifuge 是协议的一个例子，它以代表初级或高级贷款的不同代币的形式提供分段贷款。选择将资金借给初级部分的贷方通常会获得更高的收益率，因为他们会在发生任何违约的情况下提供第一损失资本。另一方面，高级部分的贷款人获得较低的收益率，但由于初级部分的流动性，他们免于违约。</p><p><strong>利息支付</strong></p><p>对于大多数协议，一旦贷方存入资金，他就无法提取资金，直到贷款期限结束或资金池中有足够的资金。这可能意味着所提供的资金在贷款期限内流动性不足。如果贷方将资金存入池中，此时其资金已被完全使用，则贷方将无法提取资金，直到下一次偿还利息或贷款完全偿还为止。</p><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">DeFi 作为信贷准入的均衡器？</h2><p>DeFi 信贷协议似乎只是传统银行或贷款机构的链上迭代，因为与超额抵押的对手相比，它们具有中心化的性质。然而，DeFi 信用协议在贷款的整个过程和生命周期中都具有优势，这是 TradFi 无法复制的。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">信贷流程的演变</h3><p>在 TradFi 中，一个人可以获得的信用额度取决于通常称为“5C 信用”的框架。该框架在决定向希望获得信贷的一方提供多少信贷方面起着重要作用。这也称为请求信用的一方的信用度。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/42058e728d83447a9bc3dbb776c3eb4395c854bc8b7b5b2e655d345cb798f493.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>通常会同时评估这些 5C，以准确了解潜在借款人当前的财务状况。例如，如果中小企业希望从银行获得贷款以资助购买机器，它们将由 5C 进行评估。然而，获得贷款的过程并不像在 AAVE 上获得贷款那样在 MetaMask 中批准钱包交易那么简单，相反，它需要多方和个人的参与才能完成该过程的每个步骤。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4f530a8183f2e12973368dc902a52700db660ec3e58870e224b8e206b1298a07.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4c0ae9b588c8caf2a02e24078396cba6b2b51c0263e64ed70b83633fc829a302.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>因此，获得 TradFi 贷款不仅昂贵，而且耗时。数据显示，平均一周内只有大约 7% 的 TradFi 贷款得到处理，多方参与会导致贷款成本激增。此外，在与借款人有现有关系的金融机构申请新的信贷额度可能仍需要再次通过整个 5C 审查周期。所有这些流程的运营成本很可能会在最终的贷款定价中由借款人承担，因为 TradFi 贷款（至少是合法贷款）被老牌金融机构高度垄断。因此，总计的成本很可能由借款人在总贷款定价中承担。</p><p>当前的 DeFi 信贷模型简化了 Tradfi 陈旧流程的低效率，该模型为借款人提供了操作灵活性，可以在初始借款人申请获得批准后全天候 24/7 借款和偿还。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4f28841489ebb175ddadca1a59fc8fddeb692ebbb1da89064cf01ee449f0ab05.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Clearpool 的贷款发放流程就是一个例子。对于 Clearpool，借款人仅通过两个中介机构——协议本身和 Credora。此外，与 TradFi 机构相比，批准和发起贷款请求所需的步骤和流程数量大大减少。中间人被淘汰，因此借款人可以从 DeFi 抵押贷款协议中获得有竞争力的利率。TradFi 借款中涉及的繁琐技术细节，例如等待贷款提款记入借款人账户，或将借入的流动性转移到目的地账户，可以被区块链技术有效地取代。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">为服务不足的借款人提供更大的信贷可用性</h3><p>DeFi 信贷协议虽然并不完美，但让以前被认为“服务不足”和 / 或被合法的 TradFi / CeFi 贷方定价的借款人更容易获得贷款（当然，高利贷者不在本文的上下文范围内）。例如，在 3AC 惨败之后，有抱负的加密货币做市商可能会发现很难通过从 CeFi 贷方借款来提高杠杆率，而且他们肯定没有希望通过与 TradFi 投资银行的回购交易来扩大资产负债表。许多加密金融机构也存在类似的障碍，而 DeFi 信贷为引入新的风险资本家 (VC) 资本提供了一种廉价且非稀释性的替代方案。在非金融领域，DeFi 信贷也填补了新兴市场（拉丁美洲、非洲和新兴亚洲）企业的空白。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/228e70e429d06b580957f996eea749968dc359e9515112ca4971262c71ce9e3d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>新兴市场的企业面临着显着的融资缺口，因为许多企业服务不足，每年缺乏大约 5 亿美元的投资。一些信用协议试图填补这一空白，其中之一是 Goldfinch，它专门将贷方资本与发展中国家的借款人联系起来，在这些国家获得 TradFi 信贷既昂贵又不方便。虽然 Goldfinch 上仍然对借款人进行 5C 信用尽职调查，但信用风险评估至少是通过去中心化共识（利益相关者之间）而不是企业垄断来进行的。</p><p>尽管 DeFi 信用协议目前仅服务于一个小众市场，但有几种途径可以实现更大规模的采用。一个可理解的轨迹是 DeFi 和 TradFi 中用户和实体之间信用评分/评级的相互承认，这将允许一方面有信用记录的借款人获得另一方面的信贷。这不仅有利于机构借款人，也有利于零售借款人，并有可能使链上信用卡成为现实。然而，为了 KYC 和合规目的，相互承认信用评分可能会要求借款人透露他们的真实身份。这可能会破坏去中心化最大化。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">透明度、反欺诈和风险管理</h3><p>DeFi 信用协议的发展为 TradFi 和 CeFi 信用市场中的几个问题提供了有希望的治疗方法。</p><p>最重要的是，DeFi 借贷是在链上进行的，并且可以接受审查，从而平衡了贷方之间的信息访问。与 TradFi 相比，在某些情况下，对借款人有私人信用敞口的贷方比只有公共债务敞口的贷方更早了解到即将发生的违约。私人信贷贷方在更快地获取信息方面具有不公平的优势，并可能以牺牲公共信贷贷方为代价来减少他们的风险敞口。尽管有内幕交易法，但此类案件很难在法庭上证明，因此，没有信息优势的贷方将蒙受损失。如果一个机构通过 DeFi 进行所有贷款，透明度将防止上述信息差距，并为所有贷方带来公平和真实的平等地位。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7e1595b28cd908499605e814d88ac6c59f872793320eea0f15f176732dc415fb.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>像 Clearpool 这样的协议通过使用 Credora 提供实时信用评分，其中可以随时获得有关借款人及其各自贷款池的信息。他们还为用户提供有关贷款规模和还款历史的信息，以及交易哈希值，如果贷方希望跟踪每个借款人的资金流向。尽管抵押品大小等信用条款对用户不可见，但与向 CeFi 机构借贷相比，仍具有更高级别的信息访问权限。</p><p>诚然，在这个阶段，许多列入白名单的 DeFi 借款人并不仅仅在链上借款，这给 CeFi 贷方留下了潜在的信息优势。然而，正如我们在 2022 年 5 月至 2022 年 7 月的 CeFi 信用危机期间观察到的那样，公开审查的链上借贷通常会首先偿还（部分是为了释放资产抵押品，但也出于监管压力）。</p><p>DeFi信用尽职调查中的共识机制也有助于减少欺诈。金融机构传统的贷款审批流程通常依赖少数决策者，这在预防欺诈方面存在集中和关键人员风险。_Netflix 的粉丝可能还记得真实故事改编的电视剧《发明安娜》_中的女主角安娜德尔维或安娜索罗金，她伪造了自己的身份，并设法诱骗银行延长对虚假印象和伪造文件的信贷额度。很难想象她在 DeFi 借贷的背景下取得这样的成就，在 DeFi 借贷中，KYC 由一群协议利益相关者（例如代币利益相关者）进行。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">现有信用协议</h2><p>在下表中，我们使用各种定性和定量指标比较了 DeFi 中当前和著名的信用协议。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/04171c03ba180efbc7fee830ad376f82b8f2e2d74155bbf6a80f4c216e1cda0e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b3f88f3b79833c159b0727c7cde3674d6c7ec09752d5a90940114580fd3e5549.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">DeFi 信用协议的当前局限性</h2><p>尽管取得了成就，但流行的 DeFi 信用协议仍面临一些限制，这些限制在不同程度上阻碍了进一步采用。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">缺乏期限结构</h3><p>这个缺点绝不仅限于 DeFi 信用协议。大多数 DeFi 货币市场以零期限方式运作，因为由于<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/treehouse-academy/what-makes-smart-contracts-important-in-defi">智能合约</a>风险，投资者在很大程度上仍坚持流动性投资。根据协议的不同，DeFi 信用池的结构可以是循环信贷设施，借款人可以按灵活的时间表提取和偿还，也可以是期限少于六个月的短期固定期限信贷额度。唯一的例外是 Goldfinch，它允许企业获得三年期借款安排。</p><p>目前，由于大多数 DeFi 信贷借款人是贸易公司等金融机构，因此缺乏持续时间不太令人担忧，因为这些借款人通常满足于短期融资。这样一来，当市场机会不适合大举借贷时，他们就可以享受缩减资产负债表的灵活性。然而，对于信贷投资者而言，一些人越来越乐于承担智能合约风险并寻求更长期的固定利率收益。这些投资者的需求可能会通过差异化的、长期的产品得到更好的满足。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">集中行业风险</h3><p>如上所述，大多数 DeFi 信贷借款人在同一部门运营，这使贷方面临其贷款组合之间更高的相关性，也称为更高的联合违约概率。Goldfinch 引入非金融借款人的模式有助于通过多元化的链上借贷弥合这一差距。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">缺乏共识的信用评级框架</h3><p>随着 Credora 等链上信用评级提供商的出现，目前缺乏标准化的 DeFi 信用评级框架的问题可能很快就会得到解决。投资者目前没有简单的方法来评估借款人的信誉：他们要么必须建立双边关系并收集财务报表，要么依赖评级提供商。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">法律和合规影响</h3><p>在涉及 DeFi 信用时，有许多不明确的法律含义。首先，DeFi 信贷发起并不一定像 TradFi 信贷债券发行那样提供招股说明书。缺少招股说明书和法律文件可能会导致包括但不限于非法招揽和不明确的债务优先权在内的问题。贷方如何确定他们的贷款是否与借款人的其他链下无担保负债同等？在违约时，即使 DeFi 信用池按时支付，链下债权人是否有权加速 DeFi 义务？借贷给借款人的链上证明在法庭上是否具有法律约束力？在 DeFi 信贷市场获得更大程度的采用之前，必须解决所有这些微妙的程序必要性。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">资本流动性不足</h3><p>尽管目前大多数 DeFi 信用池没有明确的资金锁定期，但贷方绝不能将其投资本金视为流动性。可提取金额由利用率决定，这意味着如果大部分可用池资金被借入，贷方需要等待偿还或新资金流入才能取出资金。</p><p>尽管一些协议通过允许贷方在公开市场上出售其代币化贷款代币来提供“流动性退出”，但如果贷方大量撤出资金池，出于显而易见的原因，贷方仍将陷入困境。通过区分定期贷款和循环信贷安排可能会更好地解决这个问题，这样贷方就可以确定他们的资金被锁定了多长时间，并可以着手进行相应的计划。</p><p>增加 DeFi 信贷借款流动性的另一种方法是将做市商引入代币化贷款——类似于 TradFi 做市商使用本金资产负债表提供二级流动性的方式。这条路线的明显障碍是缺乏信用工具（信用违约互换、做空代币化贷款等），这降低了做市商对冲风险的能力，从而降低了市场深度。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">未来发展</h2><p>在本节中，我们概述了我们预见 DeFi 信用空间最终将走向某一天的几个方向，使通用 DeFi 信用成为现实。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">零售信贷</h3><p>在 TradFi 中，零售业大量使用信贷来为购买汽车或抵押贷款等大件商品以及支付大学教育费用等更普遍的用例提供资金。DeFi 中零售信贷的可用性将是一个主要的价值主张。</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.gearbox.finance/">Gearbox Protocol</a> 是尝试解决零售 DeFi 信贷市场的一个例子。它通过使用信用账户提供零售信贷，信用账户是具有设置参数的隔离智能合约，仅允许访问白名单代币和协议，以使用信用贷款实施收益或交易策略。这种模式允许在不需要 KYC 的情况下创造信用，因为借入的资金不由用户直接持有，这消除了他们违约和借入资金跑路的风险。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/449b9fa3797e6e0135c8db57d59a90f4863e95fb4b8043d1823cfab9cb6fba02.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>目前，零售 DeFi 信贷仍仅限于金融用例，而由于难以确定链上身份，消费者用例仍然非常有限。我们认为，解决“违约动机”问题的一种可能方法是使用灵魂绑定代币 (SBT)。这些不可替代和不可转让的代币将确保如果用户违约，他将无法获得未来的贷款，因为他的信用记录将与他的链上身份相关联。随着技术堆栈的不断发展，我们预见 SBT 将在确保零售消费信贷合规成为现实方面发挥核心作用。</p><h3 id="h-kyc-zkkyc" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">零知识 KYC (zkKYC)</h3><p>当前的信用协议要求所有借款人和某些贷款人接受 KYC / AML 程序，这些程序目前仍然是集中的并且没有行业范围的标准。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b0e0f146903fce93a0d4e01a484119a1df96fc5e323f3979de53502da51ad17e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>zkKYC 将允许用户证明自己的身份，而无需完全披露所有个人数据，同时仍遵守所有必要的 KYC 义务。这也有助于提供跨不同信用协议的标准化 KYC 程序，可能会增加跨不同协议的去中心化身份识别的可组合性，同时保护用户隐私。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">最后的想法</h2><p>尽管前面有许多障碍，但 DeFi 信贷市场已经展示了其增长势头和培育创新的能力。<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/insights/deconstructing-defi-returns-harvesting-risk-premia#:~:text=Risk%20premia%20stands%20for%20the%20expected%20return%20of%20an%20asset%20in%20excess%20of%20the%20risk%2Dfree%20rate%20of%20return.%20If%20a%20stock%20is%20expected%20to%20return%2010%25%20per%20annum%20(p.a.)%20while%20the%20risk%2Dfree%20rate%20is%202%25%20p.a.%2C%20then%20the%20stock%E2%80%99s%20risk%20premium%20is%208%25%20p.a.">作为 TradFi 中交易最频繁的风险溢价</a>之一，信用风险可能成为“实际收益率”叙述中的下一个重量级人物。</p><p>对 DeFi 信用最有趣的观察也许是这个市场的增长直接反对“DeFi”的去中心化。贷款人和借款人都自愿接受 KYC 和白名单以参与这些协议，将匿名放在较低的优先级。这种经过许可的链上市场可能是一个持久的趋势，这将导致<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/blog/in-the-house-2-alphalab-capital-the-institutionalization-of-blockchain">链上融资和投资活动的制度化程度</a>提高，因为监管机构更深入地研究了他们以前无法触及的交易和回报。这种发展的长期影响很难衡量，因为 DeFi 最初对隐私和分布式治理受到侵蚀的担忧可能会通过允许无许可和算法信用评估的未来创新得到解决。</p><p>抛开一切不谈，我们 Treehouse 对成为 DeFi 信贷市场增长的一部分感到乐观和兴奋，因为我们的工程师正在努力整合<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/learn-defi/how-to-track-your-crypto-assets">信贷风险管理工具</a>。我们认为，DeFi 信贷领域的下一个明星项目可能会涉及工具和市场，这些工具和市场可以更有效地进行信贷交易，并在更多元化的借款人实体上进行交易，或者采用具有各种期限结构的索引包。</p>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/521ebad1759721140fcac1885b750a766cc68dec5f4431bbf278f92bf6cd7429.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[终于 ，ETH 有了足够强大的对手]]></title>
            <link>https://paragraph.com/@w3hitchhiker/eth-2</link>
            <guid>TV4oxGWkEKUt6xFFtXyC</guid>
            <pubDate>Thu, 06 Apr 2023 02:30:06 GMT</pubDate>
            <description><![CDATA[作者：Xiang｜W3.Hitchhiker 编辑：Evelyn｜W3.Hitchhiker主流媒体认为 ETH 未来定将超越 BTC，ETH 的社区强大的无法被击败的观点是作者不能认可的。 指的不是那些所谓的新公链可以替代 ETH，很多同学还是有疑问，尝试用大白话把其中的结构理清楚，毋庸置疑的 ETH 本身是非常非常好的项目。 但 ETH 这次对手是 ETH 的老师们在 BTC 上的组合拳，下面具体说说。链的老师：BTCV神早期也是想在比特币链上实现智能合约，btc core 并不认可这个方案才有了ETH，ETH的区块结构，共识早期也都借鉴了BTC。 但链上去做智能合约的计算真的是好的方向吗？ 链要跑共识机制，计算能力有限，所以ETH也转移了方向，改方向为区块生成是中心化的（链下计算），验证是去信任的和高度去中心化的，这点V神在 「Endgame」中也提到了 。（W3 译文版：「Endgame」）EndgameConsider the average "big block chain" - very high block frequency, very high block s...]]></description>
            <content:encoded><![CDATA[<p><strong><em>作者：Xiang｜W3.Hitchhiker</em></strong></p><p><em>编辑：Evelyn｜W3.Hitchhiker</em></p><hr><p>主流媒体认为 ETH 未来定将超越 BTC，ETH 的社区强大的无法被击败的观点是作者不能认可的。</p><p>指的不是那些所谓的新公链可以替代 ETH，很多同学还是有疑问，尝试用大白话把其中的结构理清楚，毋庸置疑的 ETH 本身是非常非常好的项目。</p><p>但 ETH 这次对手是 ETH 的老师们在 BTC 上的组合拳，下面具体说说。</p><h2 id="h-btc" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">链的老师：BTC</h2><p>V神早期也是想在比特币链上实现智能合约，btc core 并不认可这个方案才有了ETH，ETH的区块结构，共识早期也都借鉴了BTC。</p><p>但链上去做智能合约的计算真的是好的方向吗？</p><p>链要跑共识机制，计算能力有限，所以ETH也转移了方向，改方向为区块生成是中心化的（链下计算），验证是去信任的和高度去中心化的，这点V神在 「Endgame」中也提到了 。（W3 译文版：「<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.mirror.xyz/wcT5y47ofN97BWNcn07ruJRpu6nMP94ClJcUsS3cEtk">Endgame</a>」）</p><div data-type="embedly" src="https://vitalik.eth.limo/general/2021/12/06/endgame.html" data="{&quot;provider_url&quot;:&quot;https://vitalik.eth.limo&quot;,&quot;description&quot;:&quot;Consider the average \&quot;big block chain\&quot; - very high block frequency, very high block size, many thousands of transactions per second, but also highly centralized: because the blocks are so big, only a few dozen or few hundred nodes can afford to run a fully participating node that can create blocks or verify the existing chain.&quot;,&quot;title&quot;:&quot;Endgame&quot;,&quot;url&quot;:&quot;https://vitalik.eth.limo/general/2021/12/06/endgame.html&quot;,&quot;thumbnail_width&quot;:708,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/1f233a39843f09d02467691eb90dc86f45495b91e0b50d4e60f18f3c9f6cb3ac.png&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Eth&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:474,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:708,&quot;height&quot;:474,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/1f233a39843f09d02467691eb90dc86f45495b91e0b50d4e60f18f3c9f6cb3ac.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/1f233a39843f09d02467691eb90dc86f45495b91e0b50d4e60f18f3c9f6cb3ac.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://vitalik.eth.limo/general/2021/12/06/endgame.html" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Endgame</h2><p>Consider the average &quot;big block chain&quot; - very high block frequency, very high block size, many thousands of transactions per second, but also highly centralized: because the blocks are so big, only a few dozen or few hundred nodes can afford to run a fully participating node that can create blocks or verify the existing chain.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://vitalik.eth.limo</span></div><img src="https://storage.googleapis.com/papyrus_images/1f233a39843f09d02467691eb90dc86f45495b91e0b50d4e60f18f3c9f6cb3ac.png"/></div></a></div></div><h2 id="h-celestiarollkit" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">模块化的老师：Celestia、Rollkit</h2><p>ETH 的升级路线其实是很曲折的，V 神也并不是真的神，也有很多错的地方，早期 V 神还认为 Plasma 是未来方向，ETH 要支持分片链让 ETH 实现百万级的 TPS 等说法都被 V 神自身抛弃，最终 ETH 的选择是模块化的路线，去年的 ETH 升级其实就是共识层与执行层分离，未来的 EIP-4844 升级就是实现以太坊的数据可用性层都是这个方向的升级。</p><p>其实这是借鉴的 Celestia 的创始人 Mustafa Al-Bassam 提出数据可用性，模块化区块链的方案，附上 Mustafa Al-Bassam 和 V 神在 18-19 年间写的论文：</p><p>&lt;<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/1809.09044">https://arxiv.org/abs/1809.09044</a> &gt;</p><p>Mustafa Al-Bassam 现在做了自己模块化区块链项目，专门用来做数据可用性层的 celestia，Celestia 团队同时也为 btc 做了数据可用性这个项目就是 Rollkit。</p><p>Celestia 团队为对 Rollkit 的介绍文档：</p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blog.celestia.org/introducing-rollkit-a-modular-rollup-framework/">https://blog.celestia.org/introducing-rollkit-a-modular-rollup-framework/</a></p><p>关于模块化区块链的介绍，这里也再普及一次</p><p>主要分 4 层：</p><ul><li><p>**执行层：**交易的执行，以及状态的更改将在这里发送，交易的排序也由执行层负责。（现有所有 Layer2 本身就是执行层）</p></li><li><p>**数据可用性层：**将验证状态迁移所需的交易数据发布，存储。数据可用性的确认，验证状态迁移所需的交易数据的确认，从而初步确认排序。（ETH 的 danksharding，Celestia，EigenLayer，Rollkit 目前都是做这一块）</p></li><li><p>**结算层：**验证最终执行结果以及解决争议。（ETH 本身链上的验证合约）</p></li><li><p>**共识层：**就状态转换，交易的有效性达成共识，从而提供状态的最终确定性。（ETH 的 POS，BTC 的 POW 共识等）</p></li></ul><p>想深入学习模块化区块链和数据可用性可以研究我们团队翻译的 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3/status/1541272043211345925">Celestia 白皮书</a>和<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/xiangganzi/status/1592800355364253696">合并后 ETH 信标链的文章</a>。</p><h2 id="h-zk-layer2layer3-starkware" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">zk 证明、Layer2、Layer3 的老师：Starkware</h2><p>以太坊未来的另一大主要方向就 zk 化，其实更精准应该是说有效证明，因为 zk 这个词更被大家所接受，就还是用 zk，这里的 zk 并不一定要零知识性，参考 ETH 最新的路线图，数据可用性采样，以太坊的数据结构 Verkle 树，Rollup 通通都在 zk 化。</p><p>Starkware 有诸多产品，比如 Starkex，Starknet，创始人 Eli 本身也是 zk 证明系统 Stark 的发明者，ETH 的 zk 化，Layer3 的布局，很大程度是借鉴了 Starkware 团队的思想。Starkware 团队开发的 Cairo 语言也在扎根 web3 世界，Cairo语言不仅仅可以做为智能合约，Cairo 更是第一个为通用计算创建可证明的图灵完备的语言，切入的市场和 ETH 的 Solidity 并不相同。Stark 本身比较复杂，也是最近研究较多的部分，后续会独立围绕这一块输出更具体的干货。</p><p>比特币的闪电网络 Lightning Labs 团队也尝试用 Stark 和 Cairo 这一套体系去改进 BTC，参考<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://%5Bhttps://twitter.com/xiangganzi/status/1630385503022497800%5D(https://twitter.com/xiangganzi/status/1630385503022497800)">之前推文</a>。</p><p>相关产品有 @ZeroSync_</p><div data-type="embedly" src="https://github.com/lucidLuckylee/zerosync" data="{&quot;provider_url&quot;:&quot;https://github.com&quot;,&quot;description&quot;:&quot;A STARK proof to sync a Bitcoin full node in an instant. - lucidLuckylee/ZeroSync&quot;,&quot;title&quot;:&quot;GitHub - lucidLuckylee/ZeroSync: A STARK proof to sync a Bitcoin full node in an instant.&quot;,&quot;author_name&quot;:&quot;lucidLuckylee&quot;,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://github.com/lucidLuckylee/zerosync&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/2b4b76b91b3a87c52abd26d9c7cd769052451bff98ab00c2366939cfd81f9839.png&quot;,&quot;author_url&quot;:&quot;https://github.com/lucidLuckylee&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;GitHub&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:600,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:600,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/2b4b76b91b3a87c52abd26d9c7cd769052451bff98ab00c2366939cfd81f9839.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/2b4b76b91b3a87c52abd26d9c7cd769052451bff98ab00c2366939cfd81f9839.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://github.com/lucidLuckylee/zerosync" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>GitHub - lucidLuckylee/ZeroSync: A STARK proof to sync a Bitcoin full node in an instant.</h2><p>A STARK proof to sync a Bitcoin full node in an instant. - lucidLuckylee/ZeroSync</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://github.com</span></div><img src="https://storage.googleapis.com/papyrus_images/2b4b76b91b3a87c52abd26d9c7cd769052451bff98ab00c2366939cfd81f9839.png"/></div></a></div></div><p>附上 Layer3 与 Stark 的参考资料：</p><p><em>V 神对 L3 看法的文章：</em></p><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.ca/general/2022/09/17/layer_3.html">https://vitalik.ca/general/2022/09/17/layer_3.html</a></p><p><em>如何实现 Stark 证明的文章</em>：</p><div data-type="embedly" src="https://w3hitchhiker.substack.com/p/stark-python-01" data="{&quot;provider_url&quot;:&quot;https://w3hitchhiker.substack.com&quot;,&quot;description&quot;:&quot;译者：Xiang｜W3.Hitchhiker&quot;,&quot;title&quot;:&quot;stark 证明实操 python 实现 01&quot;,&quot;author_name&quot;:&quot;W3.Hitchhiker&quot;,&quot;url&quot;:&quot;https://w3hitchhiker.substack.com/p/stark-python-01&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/b11be880dff83db59a31b876212775d77d3251d3a594732cfa037ccc462f4a96.jpg&quot;,&quot;thumbnail_width&quot;:1080,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Substack&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:600,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1080,&quot;height&quot;:600,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/b11be880dff83db59a31b876212775d77d3251d3a594732cfa037ccc462f4a96.jpg&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/b11be880dff83db59a31b876212775d77d3251d3a594732cfa037ccc462f4a96.jpg"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://w3hitchhiker.substack.com/p/stark-python-01" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>stark 证明实操 python 实现 01</h2><p>译者：Xiang｜W3.Hitchhiker</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://w3hitchhiker.substack.com</span></div><img src="https://storage.googleapis.com/papyrus_images/b11be880dff83db59a31b876212775d77d3251d3a594732cfa037ccc462f4a96.jpg"/></div></a></div></div><p>还有一点值得提的 ETH 虽然也是模块化，但是ETH是啥都做，而且还想要实现兼容性，所以未来 ETH 升级的技术债务其实会比 BTC 这一套更多，例如 EVM 本身不适合 zk，部分 L2 还得牺牲效率去实现 zkEVM，抽象账户的升级等等，类似的技术债务还非常多，参考分析 ETH 升级路线以及 ETH 存在问题的<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://%5Bhttps://twitter.com/xiangganzi/status/1591089307187818496%5D(https://twitter.com/xiangganzi/status/1591089307187818496)">分析的推文</a>。</p><div data-type="twitter" tweetId="1591089307187818496" tweetData="{&quot;__typename&quot;:&quot;Tweet&quot;,&quot;lang&quot;:&quot;zh&quot;,&quot;favorite_count&quot;:125,&quot;possibly_sensitive&quot;:false,&quot;created_at&quot;:&quot;2022-11-11T15:23:46.000Z&quot;,&quot;display_text_range&quot;:[0,153],&quot;entities&quot;:{&quot;hashtags&quot;:[],&quot;urls&quot;:[],&quot;user_mentions&quot;:[],&quot;symbols&quot;:[],&quot;media&quot;:[{&quot;display_url&quot;:&quot;pic.x.com/ohGRU0O8Rr&quot;,&quot;expanded_url&quot;:&quot;https://x.com/xiangganzi/status/1591089307187818496/photo/1&quot;,&quot;indices&quot;:[154,177],&quot;url&quot;:&quot;https://t.co/ohGRU0O8Rr&quot;}]},&quot;id_str&quot;:&quot;1591089307187818496&quot;,&quot;text&quot;:&quot;升级后的 ETH 路线图已经传遍全网，路线图很清晰，但大部分同学可能也不知道为啥ETH需要升级，以太坊当前存在哪些问题？\n想出个系列说明一下每个方向的升级作用，有说错的地方请留言，轻喷。\n\n第一章 先讲The Merge 升级方向\nThe Merge 方向仍然存在的问题如下,括号里代表对应的升级解决方案： https://t.co/ohGRU0O8Rr&quot;,&quot;user&quot;:{&quot;id_str&quot;:&quot;1461248129181753348&quot;,&quot;name&quot;:&quot;Xiang｜Moss&quot;,&quot;screen_name&quot;:&quot;xiangganzi&quot;,&quot;is_blue_verified&quot;:false,&quot;profile_image_shape&quot;:&quot;Circle&quot;,&quot;verified&quot;:false,&quot;profile_image_url_https&quot;:&quot;https://storage.googleapis.com/papyrus_images/de25f52d7dde13e4abe94f9965690b6127134c10f9c762e17cab26fc7116ebd2.jpg&quot;},&quot;edit_control&quot;:{&quot;edit_tweet_ids&quot;:[&quot;1591089307187818496&quot;],&quot;editable_until_msecs&quot;:&quot;1668182026000&quot;,&quot;is_edit_eligible&quot;:false,&quot;edits_remaining&quot;:&quot;5&quot;},&quot;mediaDetails&quot;:[{&quot;display_url&quot;:&quot;pic.x.com/ohGRU0O8Rr&quot;,&quot;expanded_url&quot;:&quot;https://x.com/xiangganzi/status/1591089307187818496/photo/1&quot;,&quot;ext_media_availability&quot;:{&quot;status&quot;:&quot;Available&quot;},&quot;indices&quot;:[154,177],&quot;media_url_https&quot;:&quot;https://pbs.twimg.com/media/FhSuy_HVIAAvJO1.jpg&quot;,&quot;original_info&quot;:{&quot;height&quot;:315,&quot;width&quot;:1181,&quot;focus_rects&quot;:[{&quot;x&quot;:618,&quot;y&quot;:0,&quot;w&quot;:563,&quot;h&quot;:315},{&quot;x&quot;:866,&quot;y&quot;:0,&quot;w&quot;:315,&quot;h&quot;:315},{&quot;x&quot;:895,&quot;y&quot;:0,&quot;w&quot;:276,&quot;h&quot;:315},{&quot;x&quot;:954,&quot;y&quot;:0,&quot;w&quot;:158,&quot;h&quot;:315},{&quot;x&quot;:0,&quot;y&quot;:0,&quot;w&quot;:1181,&quot;h&quot;:315}]},&quot;sizes&quot;:{&quot;large&quot;:{&quot;h&quot;:315,&quot;resize&quot;:&quot;fit&quot;,&quot;w&quot;:1181},&quot;medium&quot;:{&quot;h&quot;:315,&quot;resize&quot;:&quot;fit&quot;,&quot;w&quot;:1181},&quot;small&quot;:{&quot;h&quot;:181,&quot;resize&quot;:&quot;fit&quot;,&quot;w&quot;:680},&quot;thumb&quot;:{&quot;h&quot;:150,&quot;resize&quot;:&quot;crop&quot;,&quot;w&quot;:150}},&quot;type&quot;:&quot;photo&quot;,&quot;url&quot;:&quot;https://t.co/ohGRU0O8Rr&quot;}],&quot;photos&quot;:[{&quot;backgroundColor&quot;:{&quot;red&quot;:204,&quot;green&quot;:214,&quot;blue&quot;:221},&quot;cropCandidates&quot;:[{&quot;x&quot;:618,&quot;y&quot;:0,&quot;w&quot;:563,&quot;h&quot;:315},{&quot;x&quot;:866,&quot;y&quot;:0,&quot;w&quot;:315,&quot;h&quot;:315},{&quot;x&quot;:895,&quot;y&quot;:0,&quot;w&quot;:276,&quot;h&quot;:315},{&quot;x&quot;:954,&quot;y&quot;:0,&quot;w&quot;:158,&quot;h&quot;:315},{&quot;x&quot;:0,&quot;y&quot;:0,&quot;w&quot;:1181,&quot;h&quot;:315}],&quot;expandedUrl&quot;:&quot;https://x.com/xiangganzi/status/1591089307187818496/photo/1&quot;,&quot;url&quot;:&quot;https://storage.googleapis.com/papyrus_images/ac657ab035c03a25f182b086012731f9a7de94fdce8eb1facf280c787b49cac4.jpg&quot;,&quot;width&quot;:1181,&quot;height&quot;:315}],&quot;conversation_count&quot;:6,&quot;news_action_type&quot;:&quot;conversation&quot;,&quot;isEdited&quot;:false,&quot;isStaleEdit&quot;:false}"> 
  <div class="twitter-embed embed">
    <div class="twitter-header">
        <div style="display:flex">
          <a target="_blank" href="https://twitter.com/xiangganzi">
              <img alt="User Avatar" class="twitter-avatar" src="https://storage.googleapis.com/papyrus_images/de25f52d7dde13e4abe94f9965690b6127134c10f9c762e17cab26fc7116ebd2.jpg" />
            </a>
            <div style="margin-left:4px;margin-right:auto;line-height:1.2;">
              <a target="_blank" href="https://twitter.com/xiangganzi" class="twitter-displayname">Xiang｜Moss</a>
              <p><a target="_blank" href="https://twitter.com/xiangganzi" class="twitter-username">@xiangganzi</a></p>
    
            </div>
            <a href="https://twitter.com/xiangganzi/status/1591089307187818496" target="_blank">
              <img alt="Twitter Logo" class="twitter-logo" src="https://paragraph.com/editor/twitter/logo.png" />
            </a>
          </div>
        </div>
      
    <div class="twitter-body">
      升级后的 ETH 路线图已经传遍全网，路线图很清晰，但大部分同学可能也不知道为啥ETH需要升级，以太坊当前存在哪些问题？<br />想出个系列说明一下每个方向的升级作用，有说错的地方请留言，轻喷。<br /><br />第一章 先讲The Merge 升级方向<br />The Merge 方向仍然存在的问题如下,括号里代表对应的升级解决方案： 
      <div class="twitter-media"><img class="twitter-image" src="https://storage.googleapis.com/papyrus_images/ac657ab035c03a25f182b086012731f9a7de94fdce8eb1facf280c787b49cac4.jpg" /></div>
      
       
    </div>
    
     <div class="twitter-footer">
          <a target="_blank" href="https://twitter.com/xiangganzi/status/1591089307187818496" style="margin-right:16px; display:flex;">
            <img alt="Like Icon" class="twitter-heart" src="https://paragraph.com/editor/twitter/heart.png">
            125
          </a>
          <a target="_blank" href="https://twitter.com/xiangganzi/status/1591089307187818496"><p>9:23 AM • Nov 11, 2022</p></a>
        </div>
    
  </div> 
  </div><h3 id="h-btc" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">为何 BTC 技术债务更少</h3><p>BTC 的共识不需要改，ETH 还得大改； BTC 的数据可用性由 Rollkit 团队负责； BTC + Stark 化由 Lightning Labs 团队搭建； BTC 本身可以计算, 是不支持通用性计算，BTC 作为结算层改进只需要添加支持可验证有效证明脚本就可, 不需要像 ETH 一样要支持通用性计算；</p><p>BTC 执行层链下的计算不限制用 EVM，语言和框架也会多样化起来。类似抽象账户、EOF、zk 友好性等功能，新的执行层在一开始就可以设计好这些。</p><p>引用社区朋友的一句话：</p><p>由于主流媒体和各种自媒体的长期宣传，大部分人眼中的 BTC 已经固化了。一方面大家认为 BTC 只能干财富存储，电子黄金这样的事。形成了习惯性思维。另一方面，你会发现几乎没有币圈媒体大量报道基于 BTC 的技术发展，这可能是因为推广 BTC 没有利益可言。这可能也是一个机会。</p><p>总的来说 ETH 的老师们在 BTC 上的组合，能掀起什么样火花，是挺值得关注的，当然这一套的运行也是像 ETH 升级一样需要几年的时间去一步步迭代。</p><p>实现后未来的 L2，L3 们有两个大选择，选择共识更强，安全更高，组合性强的 BTC，还是选择社区更大，周边工具成熟，生态丰富，也在不断优化进步的 ETH。web3 的用户也是一样，你相信 BTC 还是 ETH 呢？</p><p>终于 ETH 有了足够强大的对手。</p><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="http://mailto:rex@w3hitchhiker.com/"><em>rex@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/f0cb207f83c8168bf4a0c2eb5f99c3cd22892aeab22c1a8ec1265a65571c2b52.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[十亿用户的社交图谱]]></title>
            <link>https://paragraph.com/@w3hitchhiker/ANMGXoVMPmWPPe9fZPel</link>
            <guid>ANMGXoVMPmWPPe9fZPel</guid>
            <pubDate>Wed, 29 Mar 2023 06:34:14 GMT</pubDate>
            <description><![CDATA[原文：The Billion User Social Graph —— Jon Stokes 译者：Dan｜W3.Hitchhiker 编辑：Evelyn随着埃隆-马斯克最近接管了 Twitter，关于从大型社交网络迁移到独立或开放的替代方案的讨论已经越来越多，但是所有那些刚开始幻想在加入繁荣的 Twitter 前居民社区的人，很快就会遇到自 J6 之后的跨平台社交媒体大清洗以来，右派一直在努力解决的问题：网络锁定是真实的。你可以对协调问题、偏好级联、信号和其他游戏理论式的概念进行理论和策略分析--我不否认这些都是理解问题的有用方法--但要理解 Twitter 和 Facebook 对我们数亿人的强大影响，你真正需要知道的是网络时代初期的一个简单启发式方法。梅特卡夫定律指出，电信网络的价值与系统的连接用户数的平方成正比（n2）。梅特卡夫定律最初是由 George Gilder 在 1993 年以这种形式提出的，并归功于 Robert Metcalfe 在以太网方面的工作。大约在 1980 年，梅特卡夫定律最初不是以用户为单位，而是以 "兼容的通信设备"（如传真机、电话）为单位。只...]]></description>
            <content:encoded><![CDATA[<p><strong><em>原文：</em></strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.jonstokes.com/p/the-billion-user-social-graph"><strong><em>The Billion User Social Graph</em></strong></a><strong><em> —— Jon Stokes</em></strong></p><p><em>译者：Dan｜W3.Hitchhiker</em></p><p>编辑：Evelyn</p><hr><p>随着埃隆-马斯克最近接管了 Twitter，关于从大型社交网络迁移到独立或开放的替代方案的讨论已经越来越多，但是所有那些刚开始幻想在加入繁荣的 Twitter 前居民社区的人，很快就会遇到自 J6 之后的跨平台社交媒体大清洗以来，右派一直在努力解决的问题：<strong>网络锁定是真实的。</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6d744a70a4f9a95119e202520751df1b355f19efdfc6ba16ca0ce3ce4fa21ed5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>你可以对协调问题、偏好级联、信号和其他游戏理论式的概念进行理论和策略分析--我不否认这些都是理解问题的有用方法--但要理解 Twitter 和 Facebook 对我们数亿人的强大影响，你真正需要知道的是网络时代初期的一个<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/Metcalfe%27s_law">简单启发式方法</a>。</p><blockquote><p><strong><em>梅特卡夫定律</em></strong><em>指出，电信网络的价值与系统的连接用户数的平方成正比（n2）。梅特卡夫定律最初是由 George Gilder 在 1993 年以这种形式提出的，并归功于 Robert Metcalfe 在以太网方面的工作。大约在 1980 年，梅特卡夫定律最初不是以用户为单位，而是以 &quot;兼容的通信设备&quot;（如传真机、电话）为单位。只是后来随着互联网的全球化，这一定律才延续到了用户和网络，因为它的初衷是描述以太网连接。</em></p></blockquote><p>要让人们放弃一个大的、密集的网络图，而选择一个小的、稀疏的网络图，几乎是不可能的，唯一的原因是前者有价值，而后者没有。</p><p>不过奇怪的是，web3 解决了这个问题。或者至少如果我们使用一些简单的智能合约，将区块链从一个巨大的用户表变成一个巨大的社交图谱，它可以解决这个问题。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">理论依据和以往的工作</h2><p>区块链可以而且确实作为一个巨大的、共享的用户表发挥作用，它是开放的、公开的，不受任何一个实体控制。<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://thenetworkstate.com/the-billion-user-table">正如我在《十亿用户表》中写的那样：</a></p><blockquote><p><em>公共区块链相当于整个互联网的一个单一的、大规模的用户表，下一波分布式应用将建立在它之上。</em></p><p><em>取而代之的是一个由 API 连接的分散的用户数据仓网络，一个通过开放协议和分散的存储节点网络访问的单一分散的用户数据存储。因此，身份托管区块链代表了数据存储实施层的去中心化，以及数据存储访问层的再中心化。</em></p><p><em>想象一下，LinkedIn、Reddit和Github都将他们的用户表（以及他们的许多专有数据，如认可、积分和活动历史）移植到BitClout。马上就会发生以下情况：每个Github用户也是Reddit用户、LinkedIn用户和BitClout用户。同样，每个Reddit用户也是Github用户、LinkedIn用户和BitClout用户。我可以继续说下去，但你会明白这一点。</em></p><p><em>每个建立在同一虚拟用户表上的公司都能立即获得该表上其他每家创业公司的网络效应。每当一个链上公司加入一个新的用户，那么你的服务也有一个新的用户。(从某种程度上说。他们可能还没有积极使用你的服务，但他们实际上在你的服务的潜在用户）。</em></p></blockquote><p>先前的那篇文章用 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://bitclout.com/">Bitclout</a>（该项目中的链现在被称为 DeSo）作为可以支持这种用例的区块链的典型例子。但是，尽管我对 DeSo 的整个事情感到兴奋，但它的结果并不那么好。</p><p>这里不适合做 Bitclout / DeSo 的事后总结，但标出该区块链的一个方面是有意义的，因为它对现在的讨论很重要。Bitclout努力将整个社交网络放在链上，每个帖子都被写在链上，作为一个对象，可以累积收入（通过 Bitclout 钻石）。这很聪明，但任何试图承载实际内容的区块链都会看到其数据需求随着用户和连接的数量而非线性增长。</p><p>Bitclout 团队非常熟悉这种无限制的数据增长问题，并花费了大量的实际工程努力来解决这个问题。但事后看来，我实际上认为他们试图同时做太多的事情。他们应该只专注于社交图的可移植性问题。</p><p>用我之前文章中的数据库术语来描述，Bitclout 试图把以下所有的表都放在链上（另外还有一些是 Bitclout 特有的）：</p><ul><li><p><code>users</code></p></li><li><p><code>user_follows_user</code></p></li><li><p><code>posts</code></p></li><li><p><code>user_likes_post</code></p></li></ul><p>最后两张表总是出现数据爆炸，在用户迅速增长的情况下都会变得不容易操作。</p><p>因此，我认为更好的方法是采用现有的区块链，它基本上已经是那个第一张表（即用户），并在其中添加一个 <code>user_follows_user</code> 连接表。(我们还可以为其他类型的关系扩展连接，如 <code>user_mutes_user</code>，但目前我们还是保持简单的。)</p><p>这个用户对用户的连接表也会随着用户数量的增加而非线性增长，但增长速度会比较慢，更重要的是，为了表示它所需要的额外数据量（=它所消耗的额外块空间量）将远远低于帖子表。</p><p>我这样建议是因为用户和粉丝关系构成了每个大型社交网络平台锁定的主要来源。如果你的整个 Twitter 或 Facebook 的社交图谱都是开放的，并且可以随时提供给其他想要托管帖子和其他更多数据密集型的社交网络体验的社交平台，那么这些平台的锁定性基本上为零。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">链上社交图谱可能是怎样的</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ab5057dc330143e646a8616a556053be81ed3e6bf4513ed645d846fd3f0746f5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>想象一下，我的整个推特图是在链上体现的--包括实际的账户和追随者关系。为了查看该图中的 Twitter 帖子（以及相关的喜欢、转发、引用-转发等），我需要用我的钱包连接到Twitter.com。但是，假设我想跳转到tribel.com，或gab.com，或其他一些有自己特殊倾向和节制政策的社交平台--如果他们能从区块链上读取我的社交图谱，那么我可以在那里连接我的钱包，看到同样的连接，并看到他们在这个其他网站上的任何帖子。</p><p>这听起来可能没那么有吸引力，但考虑到这样一个事实：如果我在 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://tribel.com/">Tribel</a> 上关注一个新的人，那么我现在也在 Twitter 和 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://gab.com/">Gab</a> 上关注这个人--以及在其他所有使用相同链上图的用户和关系的社交平台上。取消关注和屏蔽的工作方式也一样--在一个地方做一次，你的图谱的变化就会立即反映在所有地方。</p><p>现在，那些在阅读时想利用这一点的已经意识到，在一个如上所述的世界中，将不可避免地发生什么：有人会制作一个全能客户端，让你通过一个界面从任何或所有这些网络中阅读和发布信息。那么，拥有独立的服务就没有意义了，他们都会倒闭......或者他们会吗？</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">未来事物的预演：电话号码+联系人+消息应用程序</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/10fd9a0bc38ec2762b8e0e45a6d75ac1dcab02876bd0f22a807b0ff30fa52445.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>我所描述的世界已经以一种原型状态存在，以竞争性信息协议的形式存在，这些协议都与你的电话号码相联系，并从你的联系人数据库中填充自己。<strong>电话号码系统是亿万用户表的原型</strong>，而分布式的联系人应用程序都可以读写标准的 Vcard 格式，构成了建立在该表之上的<strong>关系图</strong>。</p><p>有许多信息传递协议都是借助于这种电话号码+联系人的组合，其结果有点像我在这里描述的社交网络。例如，当你第一次登录 Telegram 时，它会扫描你的联系人，然后你立即在这个新的应用程序中拥有你现有的网络。</p><p>其结果是，你可以选择通过 Signal、Telegram、WhatsApp、iMessage 或传统短信与相同的电话号码交换信息--这一切都在于你和你的网络中的其他人想使用哪种信息协议。</p><p>还有一个永恒的循环，就是消息应用的去中心化和再中心化，这从 ICQ 时代就开始了，在 WhatsApp / Signal / Telegram / Facebook / 等的时代仍然在发生。你可以找到任何数量的<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.makeuseof.com/best-all-in-one-messaging-platforms/">多合一</a>消息客户端，在一个窗口中支持许多这些平台。</p><p>这些信息应用都没有受到损害，因为它们都从同一个开放的电话号码系统和可互操作的联系人应用和服务生态系统中获取身份--它们都共存并带来不同的东西，而且我们中的许多人在它们之间切换，与我们联系人中具有不同需求和偏好的不同子图交谈。如果我们把社交图谱移到链上，我希望这种动态会持续下去。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">关于可组合性和社交关系</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c4f434ba7ae15802e717423c19600b3652dc3fc871ad98dec5c86e8f760c97a2.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>不同的平台有不同类型的社交连接，用户可以相互之间的连接。Facebook 有朋友、关注和屏蔽。Twitter 有关注、静音和屏蔽。这些对于这些平台来说是很好的，但我们可以改进它们，使它们更适合区块链，使它们更具有可组合性。</p><p>可组合性是一个计算机科学术语，大概意思是，你可以混合和匹配这些小的、离散的、明确定义的工具，以获得不同的效果和功能。</p><p>考虑到 Facebook 的 &quot;朋友&quot;--这是它自己的连接类型，但它也意味着 &quot;关注&quot;，因为当你把某人加为好友时，你会自动关注他们。在 Twitter 上，&quot;封杀 &quot;意味着 &quot;静音&quot;，因为当你屏蔽某人时，你基本上是在让他们静音，同时也阻止他们看到你的帖子。</p><p>对于我自己的两个社交图谱的建议，下面，我想建议跟随，更干净和可组合的社交图谱关系集：</p><ul><li><p><strong>关注：</strong> 你可以阅读你所关注的人的帖子。</p></li><li><p><strong>静音：</strong> 你不能阅读你已经静音的人的帖子。</p></li><li><p>**屏蔽：**你屏蔽的人不能阅读你的帖子。</p></li></ul><p>在这个方案下，一个<strong>封杀</strong>是一个<em>静音</em>加一个<em>屏蔽</em>，所以它是对同一个目标地址的两个操作，一起组成的（例如，如果我想封杀annoyinghater.eth，我就把这个地址静音，再把它的屏蔽）。</p><p>如果<strong>我想看到</strong>某人的帖子，但<strong>又不想让他们看到我</strong>自己的帖子，我可以关注他们，再加上屏蔽。或者，如果我想保留通过导航到他们的内容或定期取消他们的静音来阅读，我可以关注加静音。</p><p>我试图以这种方式理清关系，因为它使我们更容易推理接下来的章节中的合约和关系。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">我的两项提案的一些背景</h2><p>在本文的其余部分，我提出了两个将社交图谱分层到十亿用户表中的建议。</p><ul><li><p>第一种，<strong>On-Chain Graph（OCG）</strong>，更加开放和简单，但在费用方面也更加昂贵，所以有些人会喜欢它，有些人不会。</p></li><li><p>第二种，<strong>链式图（CLG）</strong>，更复杂但更便宜，而且提供更多的控制和隐私，所以我预计大多数人会更喜欢它。不过，平台可以同时支持这两种方式。</p></li></ul><p>要真正理解这两个提案，你需要对以下概念有一些基本的熟悉：</p><ul><li><p>不可拆分的代币（NFT）和不可拆分不可转让的代币（NTFT，也叫灵魂绑定的代币）。</p></li><li><p>以太坊域名服务</p></li><li><p>智能合约</p></li></ul><p>了解一点 Solidity（以太坊的智能合约编程语言）也会有所帮助。如果你对上述一项或全部内容模糊不清，我试图以一种你应该仍然能够掌握基本知识的方式来写这篇文章。</p><p>对于这两个提案，我假设我们使用 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ens.domains/">ENS</a> 作为身份的根，并向其添加新的地址记录，其中包含一些相当标准的ERC721 NFT合约的地址，这些合约分别代表我上面概述的三种类型的社交关系（跟随、静音、屏蔽）。这三个合约的作用从一个提案到另一个提案都非常不同，但把它们的地址放入三个特殊的ENS地址记录的基本想法保持不变。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9090c9d4fad1a9c3b15a03caa1c8b9913b73c4f21b5dd5314d79ba02021e1a77.png" alt="ENS记录的例子，在这种情况下是我自己的ENS名称" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">ENS记录的例子，在这种情况下是我自己的ENS名称</figcaption></figure><p>我还想为社交用户数据 URI 提出一个额外的 ENS 记录，这样你就可以更新你的社交数据而不需要消耗 gas。一个拟议的 <code>profileURI</code> 记录将链接到一个藏在某些第三方平台上的JSON对象，看起来像这样：</p><pre data-type="codeBlock" text="curl https://jonstokes.com/jons-profile.json  
    -H &quot;Accept: application/json&quot; 

{
  &quot;name&quot;: &quot;jonstokes.(eth|com)&quot;,
  &quot;bio&quot;: &quot;Writer. Coder. Doomer Techno-Optimist. Cryptography Brother.&quot;,
  &quot;website&quot;: &quot;https://jonstokes.com/&quot;,
  &quot;location&quot;: &quot;Austin, TX&quot;
}
"><code>curl https:<span class="hljs-comment">//jonstokes.com/jons-profile.json  </span>
    <span class="hljs-operator">-</span>H <span class="hljs-string">"Accept: application/json"</span> 

{
  <span class="hljs-string">"name"</span>: <span class="hljs-string">"jonstokes.(eth|com)"</span>,
  <span class="hljs-string">"bio"</span>: <span class="hljs-string">"Writer. Coder. Doomer Techno-Optimist. Cryptography Brother."</span>,
  <span class="hljs-string">"website"</span>: <span class="hljs-string">"https://jonstokes.com/"</span>,
  <span class="hljs-string">"location"</span>: <span class="hljs-string">"Austin, TX"</span>
}
</code></pre><p>档案JSON中的一些内容与现有的ENS字段是多余的，但这没关系；这样做的目的是为了给社交平台提供一些可以显示的东西，并让用户能够对他们的社交档案进行修改，而无需花费gas来更新ENS记录。</p><h2 id="h-1" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">建议1：链上图</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9ea92883ed403e68f301df1099113e2a32afc346a5714636725ccce0c64d7b22.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>On-Chain Graph 的想法使用 NTFT 来表示上述的三种关系。对于以下三个社交合约，持有 ENS NFT 的同一个钱包也应该拥有这些合约，它们的三个对应的 ENS 地址记录应该指向这些合约：</p><ul><li><p><strong>OCG 追随者：</strong> 当你从我的 OCG 追随者合约中存入一个 NTFT 到你的钱包，那么你就跟随了我。我们中的任何一个人都可以销毁这个 NFT，使你取消对我的关注。</p></li><li><p><strong>OCG 屏蔽：</strong> 当我从我的 OCG Ghosted 合约中空投一个 NTFT 到你的钱包中时，我就对你产生了屏蔽。只有我可以销毁这个 NTFT 来解除对你的困扰。</p></li><li><p><strong>OCG 静音：</strong> 当我从我的 OCG 静音合约中空投一个 NTFT 到你的钱包时，我已经把你静音了。只有我可以销毁这个 NTFT 来解除你的静音。</p></li></ul><p>这三种情况的语义基本上都是：&quot;相对于我，即合约所有者，你是X”，其中&quot;X&quot;是追随者、屏蔽、静音的一种。</p><p>这里有一个追随者合约样本：</p><pre data-type="codeBlock" text="// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import &quot;@openzeppelin/contracts/token/ERC721/ERC721.sol&quot;;
import &quot;@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol&quot;;
import &quot;@openzeppelin/contracts/security/Pausable.sol&quot;;
import &quot;@openzeppelin/contracts/access/Ownable.sol&quot;;
import &quot;@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol&quot;;
import &quot;@openzeppelin/contracts/utils/Counters.sol&quot;;

contract OCGFollower is ERC721, ERC721Enumerable, Pausable, Ownable, ERC721Burnable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;

    constructor() ERC721(&quot;OCGFollower&quot;, &quot;OCGF&quot;) {}

    function _baseURI() internal pure override returns (string memory) {
        return &quot;https://jonstokes.com/ocg/follower&quot;;
    }

    function relationship() public {
        return &quot;ocg follower&quot;;
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function safeMint(address to) public {
        //Prevent anyone but the owner from minting
        //a token to an address they don&apos;t own.
        require(isOwner(_msgSender()) || (_msgSender() == to), &quot;Unable to mint to this address&quot;);

        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }

    function _beforeTokenTransfer(address from, address to, uint256) pure override internal {
        //Disable token transfers.
        require(from == address(0) || to == address(0), &quot;Cannot be transferred.&quot;);
    }

    // The following functions are overrides required by Solidity.

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}
"><code><span class="hljs-comment">// SPDX-License-Identifier: MIT</span>
<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.4;</span>

<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/ERC721.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/security/Pausable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/access/Ownable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Counters.sol"</span>;

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">OCGFollower</span> <span class="hljs-keyword">is</span> <span class="hljs-title">ERC721</span>, <span class="hljs-title">ERC721Enumerable</span>, <span class="hljs-title">Pausable</span>, <span class="hljs-title">Ownable</span>, <span class="hljs-title">ERC721Burnable</span> </span>{
    <span class="hljs-keyword">using</span> <span class="hljs-title">Counters</span> <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">Counters</span>.<span class="hljs-title">Counter</span>;

    Counters.Counter <span class="hljs-keyword">private</span> _tokenIdCounter;

    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) <span class="hljs-title">ERC721</span>(<span class="hljs-params"><span class="hljs-string">"OCGFollower"</span>, <span class="hljs-string">"OCGF"</span></span>) </span>{}

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">_baseURI</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">internal</span></span> <span class="hljs-title"><span class="hljs-keyword">pure</span></span> <span class="hljs-title"><span class="hljs-keyword">override</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span></span>) </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">"https://jonstokes.com/ocg/follower"</span>;
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">relationship</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">"ocg follower"</span>;
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pause</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
        _pause();
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">unpause</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
        _unpause();
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">safeMint</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> to</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-comment">//Prevent anyone but the owner from minting</span>
        <span class="hljs-comment">//a token to an address they don't own.</span>
        <span class="hljs-built_in">require</span>(isOwner(_msgSender()) <span class="hljs-operator">|</span><span class="hljs-operator">|</span> (_msgSender() <span class="hljs-operator">=</span><span class="hljs-operator">=</span> to), <span class="hljs-string">"Unable to mint to this address"</span>);

        <span class="hljs-keyword">uint256</span> tokenId <span class="hljs-operator">=</span> _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">_beforeTokenTransfer</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> <span class="hljs-keyword">from</span>, <span class="hljs-keyword">address</span> to, <span class="hljs-keyword">uint256</span></span>) <span class="hljs-title"><span class="hljs-keyword">pure</span></span> <span class="hljs-title"><span class="hljs-keyword">override</span></span> <span class="hljs-title"><span class="hljs-keyword">internal</span></span> </span>{
        <span class="hljs-comment">//Disable token transfers.</span>
        <span class="hljs-built_in">require</span>(<span class="hljs-keyword">from</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">0</span>) <span class="hljs-operator">|</span><span class="hljs-operator">|</span> to <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">0</span>), <span class="hljs-string">"Cannot be transferred."</span>);
    }

    <span class="hljs-comment">// The following functions are overrides required by Solidity.</span>

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">supportsInterface</span>(<span class="hljs-params"><span class="hljs-keyword">bytes4</span> interfaceId</span>)
        <span class="hljs-title"><span class="hljs-keyword">public</span></span>
        <span class="hljs-title"><span class="hljs-keyword">view</span></span>
        <span class="hljs-title"><span class="hljs-keyword">override</span></span>(<span class="hljs-params">ERC721, ERC721Enumerable</span>)
        <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">bool</span></span>)
    </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-built_in">super</span>.supportsInterface(interfaceId);
    }
}
</code></pre><p>如果你熟悉 Solidity，你可以看到这个非常简单（而且未经测试！）的合约试图做什么。</p><p>首先是扩展：</p><ul><li><p><code>ERC721Enumerable</code> 扩展被包括在内，因此代币持有者可以被社交网络客户端列出来，而不必扫描整个链。</p></li><li><p>我使用 <code>Pausable</code> 是因为你应该能够暂停造币，以便基本上锁定你的账户一段时间，即停止接受新的粉丝。</p></li><li><p><code>Ownable</code> 是必不可少的，因为有些事情只有合约所有者应该做。我认为没有必要使用更强大的角色功能。</p></li><li><p><code>ERC721Burnable</code> 在这里，因为你需要能够销毁代币，以便删除关注关系。这里面包含的标准 <code>burn()</code> 函数有我们需要的权限，即只有所有者或令牌所有者可以销毁代币。</p></li><li><p>我包含了<code>Counters</code>，这样 <code>tokenID</code> 就会自动递增，这很方便。</p></li></ul><p>现在对 OpenZeppelin 向导的输出进行修改：</p><ul><li><p><code>safeMint()</code> 被修改后，只有合约的所有者可以将代币铸币到其他人的地址。对于所有非所有者，你只能向你调用合约的地址铸币。</p></li><li><p><code>_beforeTokenTransfer()</code> 被重写，这样它就基本上禁止了转让代币的能力，创造了一个简单的灵魂绑定的代币。</p></li><li><p><code>relationship()</code> 函数是一个方便的方法，确保有一个简单的方法来查询合约并确认 NFT 代表什么样的关系。我并不赞成包括这个，但它似乎很有用。</p></li></ul><p>这一切真的很简单，对于 OCG 的屏蔽和 OCG 的静音变体，你要做以下小改动：</p><ol><li><p>改变合约名称和符号</p></li><li><p>改变 <code>relationship()</code> 和可能的 <code>baseURI()</code> 的返回值，以反映你所代表的关系（即，&quot;muted &quot;或 &quot;ghosted&quot;）。</p></li><li><p>把 <code>safeMint()</code> 和 <code>burn()</code> 都变成 <code>onlyOwner</code> 函数，这样只有合约所有者可以调用这两个函数。</p></li></ol><p>显然，这将取决于平台是否以正确的方式履行这些合约（即关注、屏蔽、静音）。不过，这没有听起来那么有威胁性和不稳定，因为如果一个特定的社交平台不履行你所关心的合约，就不要使用它。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">增加付费关注</h2><p>你可以在 <code>safeMint</code> 中加入 <code>payable</code>，然后使用 <code>setMintRate</code> 来设定人们必须为以下内容向你支付的价格。因此，类似于这样的内容：</p><pre data-type="codeBlock" text="uint256 public mintRate = 0.01 ether;

function setMintRate(uint256 mintRate_) public onlyOwner {
    mintRate = mintRate_;
}

function safeMint(address to) public payable {
    // Require pay-to-follow
    require(msg.value &gt;= mintRate, &quot;Not enough ether to mint&quot;);

    //Prevent anyone but the owner from minting
    //a token to an address they don&apos;t own.
    require(isOwner(_msgSender()) || (_msgSender() == to), &quot;Unable to mint to this address&quot;);

    uint256 tokenId = _tokenIdCounter.current();
    _tokenIdCounter.increment();
    _safeMint(to, tokenId);
}
"><code><span class="hljs-keyword">uint256</span> <span class="hljs-keyword">public</span> mintRate <span class="hljs-operator">=</span> <span class="hljs-number">0</span><span class="hljs-number">.01</span> <span class="hljs-literal">ether</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">setMintRate</span>(<span class="hljs-params"><span class="hljs-keyword">uint256</span> mintRate_</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
    mintRate <span class="hljs-operator">=</span> mintRate_;
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">safeMint</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> to</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">payable</span></span> </span>{
    <span class="hljs-comment">// Require pay-to-follow</span>
    <span class="hljs-built_in">require</span>(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">value</span> <span class="hljs-operator">></span><span class="hljs-operator">=</span> mintRate, <span class="hljs-string">"Not enough ether to mint"</span>);

    <span class="hljs-comment">//Prevent anyone but the owner from minting</span>
    <span class="hljs-comment">//a token to an address they don't own.</span>
    <span class="hljs-built_in">require</span>(isOwner(_msgSender()) <span class="hljs-operator">|</span><span class="hljs-operator">|</span> (_msgSender() <span class="hljs-operator">=</span><span class="hljs-operator">=</span> to), <span class="hljs-string">"Unable to mint to this address"</span>);

    <span class="hljs-keyword">uint256</span> tokenId <span class="hljs-operator">=</span> _tokenIdCounter.current();
    _tokenIdCounter.increment();
    _safeMint(to, tokenId);
}
</code></pre><p>我相信我还能想到许多其他的调整和功能来添加到这个建议中，但最好从简单和容易理解的东西开始。</p><h2 id="h-2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">建议2：链式连接图</h2><p>上面描述的 OCG 合约足够简单，但该方案有一些特质，可能会使很多人产生分歧：</p><ul><li><p>所有的东西都是公开的，在链上的，包括屏蔽和静音。你不能这样做锁定账户，但解决这个问题的办法可能是使用一个替代账户。</p></li><li><p>每一个行动都要花费 gas，这意味着你必须对你关注的人、屏蔽和静音做出真正的选择。但如果 gas 费用足够高，那么这可能会使网络无法使用。</p></li><li><p>对于一个网络或一个特定的账户来说，付费关注可能是也可能不是一个理想的功能，但你会有这样的选择。</p></li></ul><p>鉴于不是每个人都会喜欢这个建议的这些特质，我想提出一套替代的社交合约，给用户和平台更细化的控制，特别是谁能看到什么样的信息，而且使用成本更低。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/16e46f7b950b5adf8be9a95d9b2c93ae65bedd5933a3b39ec325ef0f773c8ef6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>链式链接图（CLG）的基本思想：</strong> 我们不通过 NFT 直接在链上表示社交关系（关注、屏蔽、静音），而是在链下存储这些关系，并使用链上代币来发现和访问这些关系。</p><ul><li><p><strong>发现：</strong> 该合约提供了一个 <code>listURI()</code> 函数，该函数返回一个 JSON 列表的链接，该列表中的 ENS 名称是你打算声明某种社交关系的（即，我关注他们，我让他们静音，或者我屏蔽他们）。</p></li><li><p><strong>访问：</strong> 如果 <code>listURI()</code> 返回的链接是令牌控制的，那么合约的令牌就会授予持有者对元数据中发现的链接的读取权限。</p></li></ul><p>那么该社交关系就不是直接在链上的，而是通过一组合约和 URL 与链相连。</p><p>与 OCG 一样，三种社交关系中的每一种都由智能合约来管理，但 CLG 的语义不同：</p><ul><li><p>**关注：**包含一个链接到你正在关注的 ENS 名字的 JSON 列表，由它发出的令牌授予对该关注列表的读取权限。</p></li><li><p>**静音：**包含一个链接到你正在静音的 ENS 名字的 JSON 列表，由它发出的令牌授予对该静音列表的读取权限。</p></li><li><p>**屏蔽：**包含一个链接到一个你正在屏蔽的 ENS 名字的 JSON 列表，由它发出的令牌授予对该屏蔽列表的读取访问权。</p></li></ul><p>因此，CLG 令牌的语义是：&quot;这是对我 X 账户列表的读取权限”，其中&quot;X&quot;是&quot;关注&quot;、&quot;静音&quot;或 &quot;屏蔽&quot;。</p><p>你可以把我在这一节中提出的建议看作是我为信息应用描述的电话号码+地址簿组合的一个近似物。你的电话号码是（准）公开的，当你把一个新的消息应用程序连接到它时，你可以授予或拒绝该应用程序对你的联系人的读取权限。</p><p>在我的CLG社交令牌计划中，你的ENS名字就像你的电话号码一样是公开的，你发行和撤销令牌，以便授予和拒绝阅读与你有某种关系的人的名单。如果你愿意，你可以把这些令牌授予随机用户，但主要是你要把它们授予社交平台，以便这些平台知道谁的帖子要显示给你，谁的帖子要隐藏（或谁不应该看到你的帖子）。</p><p>(对构成你的社交图的列表的<strong>写入权限</strong>可能由你正常的 ENS NFT 控制--如果你的钱包里有你的 ENS 名字，你就可以对列表进行写入 / 更新 / 删除的修改。一个可能的替代方案是有第四个社交合约，授予 NTFT 持有者列表写入权限，这样你就可以将列表管理外包给一些第三方）</p><p>在链下托管这些列表，同时从链上指向它们，有几个好处：</p><ul><li><p>你可以通过在托管列表的端点上使用认证来锁定你的关系，不让公众查看。或者你可以让它对公众开放，这样任何人都可以阅读它。</p></li><li><p>更新一个链下列表不需要花费 gas。</p></li><li><p>这个方案使得与社交供应商互通的社交图谱托管服务市场得以建立。</p></li><li><p>任何人或服务都可以轻易发现你的列表。</p></li></ul><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">代币访问控制和读取访问</h2><p>实现 CLG 合约的关键创新是代币访问控制。代币访问控制背后的概念是，除非你用含有特定访问代币的钱包连接到主机，否则你不能访问主机上的特定数据。</p><p>例如，你可以对 IPFS 上的内容进行代币访问控制，这样只有用钱包中的特定 NFT 连接到端点的读者才能查看特定的文件。</p><p>CLG 使用令牌门为我们的社交合约增加了一些间接性，因此，社交 NFT 不是代表一种特定类型的关系--关注、静音或屏蔽--而是代表对你的社交图谱的一部分的读取权限。</p><p>很明显，为了使代币门槛发挥作用，平台必须尊重它。据推测，如果平台不尊重代币访问控制，你会把你的关系列表转移到其他平台，并改变你的合约，必要时重新发布任何 NFT。</p><p>另外，要清楚的是，有些人的名单在某些时候会泄露。我们生活在一个个人数据泄露的世界，所以如果数据被托管在某个地方，那么有些数据就会被泄露。我将在后面的章节中讨论一些可能的缓解措施。</p><h2 id="h-clg-follows" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">合约范本：CLG Follows</h2><p>下面的合约将是一个标准的 ERC721 NTFT 合约，与上述 OCG 的合约非常接近：</p><pre data-type="codeBlock" text="// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import &quot;@openzeppelin/contracts/token/ERC721/ERC721.sol&quot;;
import &quot;@openzeppelin/contracts/security/Pausable.sol&quot;;
import &quot;@openzeppelin/contracts/access/Ownable.sol&quot;;
import &quot;@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol&quot;;
import &quot;@openzeppelin/contracts/utils/Counters.sol&quot;;

contract CLGFollows is ERC721, Pausable, Ownable, ERC721Burnable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;

    constructor() ERC721(&quot;CLGFollows&quot;, &quot;CLGF&quot;) {}

    function _baseURI() internal pure override returns (string memory) {
        return &quot;https://jonstokes.com/clgfollows/&quot;;
    }

    function listURI() public {
        return &quot;https://jonstokes.com/clgfollows/list&quot;;
    }

    function relationship() public {
        return &quot;clg follows&quot;;
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function safeMint(address to) public onlyOwner {
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }

    function _beforeTokenTransfer(address from, address to, uint256) pure override internal {
        //Disable token transfers.
        require(from == address(0) || to == address(0), &quot;Cannot be transferred.&quot;);
    }
}
"><code><span class="hljs-comment">// SPDX-License-Identifier: MIT</span>
<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.4;</span>

<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/ERC721.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/security/Pausable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/access/Ownable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Counters.sol"</span>;

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">CLGFollows</span> <span class="hljs-keyword">is</span> <span class="hljs-title">ERC721</span>, <span class="hljs-title">Pausable</span>, <span class="hljs-title">Ownable</span>, <span class="hljs-title">ERC721Burnable</span> </span>{
    <span class="hljs-keyword">using</span> <span class="hljs-title">Counters</span> <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">Counters</span>.<span class="hljs-title">Counter</span>;

    Counters.Counter <span class="hljs-keyword">private</span> _tokenIdCounter;

    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) <span class="hljs-title">ERC721</span>(<span class="hljs-params"><span class="hljs-string">"CLGFollows"</span>, <span class="hljs-string">"CLGF"</span></span>) </span>{}

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">_baseURI</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">internal</span></span> <span class="hljs-title"><span class="hljs-keyword">pure</span></span> <span class="hljs-title"><span class="hljs-keyword">override</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span></span>) </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">"https://jonstokes.com/clgfollows/"</span>;
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">listURI</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">"https://jonstokes.com/clgfollows/list"</span>;
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">relationship</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">"clg follows"</span>;
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">pause</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
        _pause();
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">unpause</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
        _unpause();
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">safeMint</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> to</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title">onlyOwner</span> </span>{
        <span class="hljs-keyword">uint256</span> tokenId <span class="hljs-operator">=</span> _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
    }

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">_beforeTokenTransfer</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> <span class="hljs-keyword">from</span>, <span class="hljs-keyword">address</span> to, <span class="hljs-keyword">uint256</span></span>) <span class="hljs-title"><span class="hljs-keyword">pure</span></span> <span class="hljs-title"><span class="hljs-keyword">override</span></span> <span class="hljs-title"><span class="hljs-keyword">internal</span></span> </span>{
        <span class="hljs-comment">//Disable token transfers.</span>
        <span class="hljs-built_in">require</span>(<span class="hljs-keyword">from</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">0</span>) <span class="hljs-operator">|</span><span class="hljs-operator">|</span> to <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-keyword">address</span>(<span class="hljs-number">0</span>), <span class="hljs-string">"Cannot be transferred."</span>);
    }
}
</code></pre><p>所有的扩展都与 OCG 相同，只是我没有包括 <code>ERC721Enumerable</code>，因为不清楚是否有人想让他们的 CLG Follows 代币被列举出来（另外它提高了铸币的 gas 成本）</p><p>至于函数方面，我对OpenZeppelin向导的输出做了以下修改：</p><ul><li><p><code>relationship()</code>： 与 OLG 一样，它返回社交合约的类型。同样，对于 Solidity 合约来说，这可能没有必要，我也没有见过这样做，但尽管如此，我觉得我想让合约自我报告它的类型。所以我不知道--如果这冒犯了你，请忽略。</p></li><li><p><code>listURI()</code> 返回一个指向 JSON 对象的链接，该对象是你正在关注（或静音或屏蔽，取决于合约类型）的 ENS 名称列表。我们希望这个 URI 能被标记为隐私，但这并不是必须的。</p></li></ul><p>大多数情况下，你会使用 CLG Follows NTFT，把它发布到社交平台拥有的地址。这样，该平台可以读取你的关注列表，并向你展示正确的帖子。</p><p>但你也可以把这些 NTFTs 发给追随者，以便你的追随者可以发现其他追随者。你可以通过空投给追随者，或者通过解禁造币，让任何人造币来实现。</p><p>所有其他合约的工作方式与上述完全相同，但有不同的名称和符号，并从 <code>relationship()</code> 和 <code>listURI()</code> 返回不同的值。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">可能的变数</h2><p>如果你担心你的列表从不同的服务中泄漏，那么把 listURI() 变成更像 <code>tokenURI(uint256 tokenId)</code> 的东西是非常直接的，即签名是 <code>listURI(uint256 tokenId)</code>，它把 <code>tokenID</code> 连接到一个基本URI的末尾，这样每个 token 持有者就可以得到自己的列表URL。这个功能与列表主机上的一些逻辑相结合，可以让你把列表隔离开来，使不同的令牌持有者得到主图的不同子图。这样一来，如果一个平台被拥有，那么只有我的图的那一部分被泄露了。</p><p>和 OCG 一样，你可以把 <code>safemint</code> 变成一个可支付的函数，并向访问你的列表的人收费。请看 OCG 部分的代码，以了解这个例子的情况。</p><p>你可能希望能够更新 <code>tokenURI()</code> 和 / 或 <code>listURI()</code> 返回的 URLs，在这种情况下，你需要将这些 URLs 存储在变量中，在构造函数中初始化它们，并为更新它们提供 <code>onlyOwner</code> setter 函数。这将增加你的铸币成本，但如果你只打算把它们给服务而不是个人，这可能并不重要。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">服务</h2><p>这里概述的两个建议都提供了一些集中式托管服务的地方，即使它只是一个权宜之计，在生态系统过渡到像 IPFS 这样的分布式系统之前。</p><p>最明显的服务类型是托管由 URI 功能之一返回的任何东西--配置文件数据、NTFT 元数据和代币控制的 JSON 列表（在 CLG 的情况下）。</p><p>另一个有用的服务是一种专门的 Infura 版本，通过 API 暴露链上的社交数据。或者，Infura 可以为社交数据提供一个专门的API。</p><p>最后，可以有第三方服务来验证账户，以满足用户和组织的需求。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">总结</h2><p>我不知道我是否期望我的链上社交图谱建议会以我在这里描述的形式被采纳。我提出这些想法，更多的是为了引发对话，讨论我们如何从目前完全锁定平台的状态有效地过渡到更便携的状态，即你拥有你的图谱，并可以轻松地将它随身携带。</p><p>上述内容有一部分看起来有点像 web5 的提议，但关键的区别在于，我的两个想法被设计得更简单，并利用了智能合约和现有的链上身份提供者（ENS，但也包括其他链上的类似提供者）。</p><p>如果你从这篇文章中没有其他收获，我希望我至少已经说明，在一个分布式账本技术和智能合约的世界里，我们任何人都没有必要在 2022 年被锁定在一个社交网络里。解决这个锁定问题的工具是广泛存在的，我们只需要拿起它们并使用它们。</p>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/b3991bd88ae2a875d2e5a03451758ea4f695b317d2c235eb66cf1b41ef058b7b.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[stark 证明实操 python 实现 04]]></title>
            <link>https://paragraph.com/@w3hitchhiker/stark-python-04</link>
            <guid>ft8W0DBKH32NHzvpFxOo</guid>
            <pubDate>Tue, 21 Mar 2023 08:32:51 GMT</pubDate>
            <description><![CDATA[译者：Xiang｜W3.Hitchhiker第四部分：查询阶段视频教程 (youtube)幻灯片(PDF)加载之前的代码运行下面代码块以加载我们将在这部分中使用的变量。由于它会重复前面部分中所做的所有操作 - 运行需要一段时间。from channel import Channel from tutorial_sessions import part1, part3 _, _, _, _, _, _, _, f_eval, f_merkle, _ = part1() fri_polys, fri_domains, fri_layers, fri_merkles, _ = part3() print('Success!') 查询上解承诺（decommit）我们在这部分的目标是生成验证前三个部分的承诺所需的所有信息。 这部分我们写了两个函数：decommit_on_fri_layers - 以特定索引采样时，通过信道发送数据显示每个 FRI 层与其他层一致。decommit_on_query - 发送轨迹上解承诺所需的数据，然后调用 decommit_on_fri_layers。在 ...]]></description>
            <content:encoded><![CDATA[<p><strong><em>译者：Xiang｜W3.Hitchhiker</em></strong></p><hr><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">第四部分：查询阶段</h2><ul><li><p>视频教程<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=CxP28qM4tAc"> (youtube)</a></p></li><li><p>幻灯片<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://starkware.co/wp-content/uploads/2021/12/STARK101-Part4.pdf">(PDF)</a></p></li></ul><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">加载之前的代码</h3><p>运行下面代码块以加载我们将在这部分中使用的变量。由于它会重复前面部分中所做的所有操作 - 运行需要一段时间。</p><pre data-type="codeBlock" text="from channel import Channel
from tutorial_sessions import part1, part3 

_, _, _, _, _, _, _, f_eval, f_merkle, _ = part1()
fri_polys, fri_domains, fri_layers, fri_merkles, _ = part3()

print(&apos;Success!&apos;)
"><code><span class="hljs-keyword">from</span> channel <span class="hljs-keyword">import</span> <span class="hljs-title">Channel</span>
<span class="hljs-title"><span class="hljs-keyword">from</span></span> <span class="hljs-title">tutorial_sessions</span> <span class="hljs-title"><span class="hljs-keyword">import</span></span> <span class="hljs-title">part1</span>, <span class="hljs-title">part3</span> 

<span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span>, <span class="hljs-title">f_eval</span>, <span class="hljs-title">f_merkle</span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span> <span class="hljs-operator">=</span> <span class="hljs-title">part1</span>()
<span class="hljs-title">fri_polys</span>, <span class="hljs-title">fri_domains</span>, <span class="hljs-title">fri_layers</span>, <span class="hljs-title">fri_merkles</span>, <span class="hljs-title"><span class="hljs-keyword">_</span></span> <span class="hljs-operator">=</span> <span class="hljs-title">part3</span>()

<span class="hljs-title">print</span>(<span class="hljs-string">'Success!'</span>)
</code></pre><h2 id="h-decommit" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">查询上解承诺（decommit）</h2><p>我们在这部分的目标是生成验证前三个部分的承诺所需的所有信息。 这部分我们写了两个函数：</p><ol><li><p><code>decommit_on_fri_layers</code> - 以特定索引采样时，通过信道发送数据显示每个 FRI 层与其他层一致。</p></li><li><p><code>decommit_on_query</code> - 发送轨迹上解承诺所需的数据，然后调用 <code>decommit_on_fri_layers</code>。</p></li></ol><h3 id="h-fri" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">在 FRI 层上解承诺</h3><p>实施 <code>decommit_on_fri_layers</code> 函数。 该函数获取索引和信道，并通过信道发送相关数据以验证 FRI 层的正确性。 更具体地说，它迭代 <code>fri_layers</code> 和 <code>fri_merkles</code> 并且在每次迭代中它发送以下数据（按规定的顺序）：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c84c5ed905459049a0b373fe5b7a34f571ee1799dd4f41196ae90f583a67f68a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>请注意，我们<strong>不</strong>发送最后一层元素的身份验证路径。 在最后一层，所有元素都是相等的，无论查询如何，因为它们是常数多项式的评估。</p><p>（请记住在通过信道发送之前将非字符串变量转换为字符串。）</p><pre data-type="codeBlock" text="def decommit_on_fri_layers(idx, channel):
    for layer, merkle in zip(fri_layers[:-1], fri_merkles[:-1]):
        length = len(layer)
        idx = idx % length
        sib_idx = (idx + length // 2) % length        
        channel.send(str(layer[idx]))
        channel.send(str(merkle.get_authentication_path(idx)))
        channel.send(str(layer[sib_idx]))
        channel.send(str(merkle.get_authentication_path(sib_idx)))       
    channel.send(str(fri_layers[-1][0]))
"><code>def decommit_on_fri_layers(idx, channel):
    <span class="hljs-keyword">for</span> layer, merkle in zip(fri_layers[:<span class="hljs-number">-1</span>], fri_merkles[:<span class="hljs-number">-1</span>]):
        length <span class="hljs-operator">=</span> len(layer)
        idx <span class="hljs-operator">=</span> idx <span class="hljs-operator">%</span> length
        sib_idx <span class="hljs-operator">=</span> (idx <span class="hljs-operator">+</span> length <span class="hljs-comment">// 2) % length        </span>
        channel.<span class="hljs-built_in">send</span>(str(layer[idx]))
        channel.<span class="hljs-built_in">send</span>(str(merkle.get_authentication_path(idx)))
        channel.<span class="hljs-built_in">send</span>(str(layer[sib_idx]))
        channel.<span class="hljs-built_in">send</span>(str(merkle.get_authentication_path(sib_idx)))       
    channel.<span class="hljs-built_in">send</span>(str(fri_layers[<span class="hljs-number">-1</span>][<span class="hljs-number">0</span>]))
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="# Test against a precomputed hash.
test_channel = Channel()
for query in [7527, 8168, 1190, 2668, 1262, 1889, 3828, 5798, 396, 2518]:
    decommit_on_fri_layers(query, test_channel)
assert test_channel.state == &apos;ad4fe9aaee0fbbad0130ae0fda896393b879c5078bf57d6c705ec41ce240861b&apos;, &apos;State of channel is wrong.&apos;
print(&apos;Success!&apos;)
"><code><span class="hljs-comment"># Test against a precomputed hash.</span>
<span class="hljs-string">test_channel</span> <span class="hljs-string">=</span> <span class="hljs-string">Channel()</span>
<span class="hljs-string">for</span> <span class="hljs-string">query</span> <span class="hljs-string">in</span> [<span class="hljs-number">7527</span>, <span class="hljs-number">8168</span>, <span class="hljs-number">1190</span>, <span class="hljs-number">2668</span>, <span class="hljs-number">1262</span>, <span class="hljs-number">1889</span>, <span class="hljs-number">3828</span>, <span class="hljs-number">5798</span>, <span class="hljs-number">396</span>, <span class="hljs-number">2518</span>]<span class="hljs-string">:</span>
    <span class="hljs-string">decommit_on_fri_layers(query,</span> <span class="hljs-string">test_channel)</span>
<span class="hljs-string">assert</span> <span class="hljs-string">test_channel.state</span> <span class="hljs-string">==</span> <span class="hljs-string">'ad4fe9aaee0fbbad0130ae0fda896393b879c5078bf57d6c705ec41ce240861b'</span><span class="hljs-string">,</span> <span class="hljs-string">'State of channel is wrong.'</span>
<span class="hljs-string">print('Success!')</span>
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">在轨迹多项式上解承诺</h3><p>为了证明我们解承诺的 FRI 层确实是从组合多项式的评估中生成的，我们还必须发送：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/24cc650af4aa9f79910aa2ecef1b8862c563f72225c68d65265ef7612f298443.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>验证者知道组合多项式的随机系数，可以计算其在 <em>x</em> 处的评估，并将其与第一个 FRI 层发送的第一个元素进行比较。</p><p>因此，函数 <code>decommit_on_query</code> 应该通过信道发送上述（1、2 和 3），然后调用 <code>decommit_on_fri_layers</code>。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f4db930d3de0f9554ee836ded5d3c0e4313f1d9c287f5e320d85c772053fe068.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>提示：<code>f_eval</code>是组合多项式的评估，<code>f_merkle</code>是对应的 Merkle 树。</p><pre data-type="codeBlock" text="def decommit_on_query(idx, channel): 
    assert idx + 16 &lt; len(f_eval), f&apos;query index: {idx} is out of range. Length of layer: {len(f_eval)}.&apos;
    channel.send(str(f_eval[idx])) # f(x).
    channel.send(str(f_merkle.get_authentication_path(idx))) # auth path for f(x).
    channel.send(str(f_eval[idx + 8])) # f(gx).
    channel.send(str(f_merkle.get_authentication_path(idx + 8))) # auth path for f(gx).
    channel.send(str(f_eval[idx + 16])) # f(g^2x).
    channel.send(str(f_merkle.get_authentication_path(idx + 16))) # auth path for f(g^2x).
    decommit_on_fri_layers(idx, channel)   
"><code>def decommit_on_query(idx, channel): 
    <span class="hljs-built_in">assert</span> idx <span class="hljs-operator">+</span> <span class="hljs-number">16</span> <span class="hljs-operator">&#x3C;</span> len(f_eval), f<span class="hljs-string">'query index: {idx} is out of range. Length of layer: {len(f_eval)}.'</span>
    channel.<span class="hljs-built_in">send</span>(str(f_eval[idx])) # f(x).
    channel.<span class="hljs-built_in">send</span>(str(f_merkle.get_authentication_path(idx))) # auth path <span class="hljs-keyword">for</span> f(x).
    channel.<span class="hljs-built_in">send</span>(str(f_eval[idx <span class="hljs-operator">+</span> <span class="hljs-number">8</span>])) # f(gx).
    channel.<span class="hljs-built_in">send</span>(str(f_merkle.get_authentication_path(idx <span class="hljs-operator">+</span> <span class="hljs-number">8</span>))) # auth path <span class="hljs-keyword">for</span> f(gx).
    channel.<span class="hljs-built_in">send</span>(str(f_eval[idx <span class="hljs-operator">+</span> <span class="hljs-number">16</span>])) # f(g<span class="hljs-operator">^</span>2x).
    channel.<span class="hljs-built_in">send</span>(str(f_merkle.get_authentication_path(idx <span class="hljs-operator">+</span> <span class="hljs-number">16</span>))) # auth path <span class="hljs-keyword">for</span> f(g<span class="hljs-operator">^</span>2x).
    decommit_on_fri_layers(idx, channel)   
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">一组查询的解承诺</h3><p>为了完成证明，证明者从信道中获取一组随机查询，即 0 到 8191 之间的索引，并在每个查询上解承诺。</p><p>使用你刚刚实现的函数 <code>decommit_on_query()</code> 和 <code>Channel.receive_random_int</code> 生成 3 个随机查询并在每个查询上解承诺。</p><pre data-type="codeBlock" text="def decommit_fri(channel):
    for query in range(3):
        # Get a random index from the verifier and send the corresponding decommitment.
        decommit_on_query(channel.receive_random_int(0, 8191-16), channel)
"><code><span class="hljs-keyword">def</span> <span class="hljs-title function_">decommit_fri</span>(<span class="hljs-params">channel</span>):
    <span class="hljs-keyword">for</span> query <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">3</span>):
        <span class="hljs-comment"># Get a random index from the verifier and send the corresponding decommitment.</span>
        decommit_on_query(channel.receive_random_int(<span class="hljs-number">0</span>, <span class="hljs-number">8191</span>-<span class="hljs-number">16</span>), channel)
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">证明时间！</h3><p>运行以下将它们联系在一起的代码块，运行所有以前的代码，以及你在这部分中编写的函数，并打印证明。</p><pre data-type="codeBlock" text="import time
from tutorial_sessions import part1, part3 

start = time.time()
start_all = start
print(&quot;Generating the trace...&quot;)
_, _, _, _, _, _, _, f_eval, f_merkle, _ = part1()
print(f&apos;{time.time() - start}s&apos;)
start = time.time()
print(&quot;Generating the composition polynomial and the FRI layers...&quot;)
fri_polys, fri_domains, fri_layers, fri_merkles, channel = part3()
print(f&apos;{time.time() - start}s&apos;)
start = time.time()
print(&quot;Generating queries and decommitments...&quot;)
decommit_fri(channel)
print(f&apos;{time.time() - start}s&apos;)
start = time.time()
print(channel.proof)
print(f&apos;Overall time: {time.time() - start_all}s&apos;)
print(f&apos;Uncompressed proof length in characters: {len(str(channel.proof))}&apos;)
"><code>import <span class="hljs-selector-tag">time</span>
from tutorial_sessions import part1, part3 

start = <span class="hljs-selector-tag">time</span><span class="hljs-selector-class">.time</span>()
start_all = start
<span class="hljs-built_in">print</span>("Generating the trace...")
_, _, _, _, _, _, _, f_eval, f_merkle, _ = <span class="hljs-built_in">part1</span>()
<span class="hljs-built_in">print</span>(f'{time.time() - start}s')
start = <span class="hljs-selector-tag">time</span><span class="hljs-selector-class">.time</span>()
<span class="hljs-built_in">print</span>("Generating the composition polynomial and the FRI layers...")
fri_polys, fri_domains, fri_layers, fri_merkles, channel = <span class="hljs-built_in">part3</span>()
<span class="hljs-built_in">print</span>(f'{time.time() - start}s')
start = <span class="hljs-selector-tag">time</span><span class="hljs-selector-class">.time</span>()
<span class="hljs-built_in">print</span>("Generating queries and decommitments...")
<span class="hljs-built_in">decommit_fri</span>(channel)
<span class="hljs-built_in">print</span>(f'{time.time() - start}s')
start = <span class="hljs-selector-tag">time</span><span class="hljs-selector-class">.time</span>()
<span class="hljs-built_in">print</span>(channel.proof)
<span class="hljs-built_in">print</span>(f'Overall time: {time.time() - start_all}s')
<span class="hljs-built_in">print</span>(f'Uncompressed proof length in characters: {len(str(channel.proof))}')
</code></pre>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/0cf88a93244f48df398efa5caa7e6aba6b435d25d412c5c68073360192b18827.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[以灯塔游戏作为切入点观察 TreasureDao]]></title>
            <link>https://paragraph.com/@w3hitchhiker/treasuredao</link>
            <guid>pnYj3ZLcOJZaIp3v1cau</guid>
            <pubDate>Mon, 06 Mar 2023 03:05:48 GMT</pubDate>
            <description><![CDATA[作者：Tiga｜W3.HitchhikerThe Beacon 游戏简介灯塔游戏玩法简介灯塔游戏是一款PVE游戏，玩家可以使用上下左右四个按键对角色进行异动，使用鼠标左右键进行普通攻击和重击。游戏通常设置 3 个关卡，通过前两关较为容易，此时选择放弃最后关卡可获得一个道具的随机奖励。最后一关较难，通过后可获得三个道具奖励。当前经济模型当前灯塔是弱经济模型模式，玩游戏无法获得代币，只能获得 NFT 道具，如皮肤饰品，装饰饰品等。这些饰品均可以通过 NFT 市场 Trove 市场进行出售。灯塔游戏目前在 Trove 市场有三种类别的 NFT 可买卖，分别是人物，宠物，饰品。人物总共有 45180 个，目前的地板价是 20 个 MAGIC，挂单量为 824（1.82%）；宠物总量 4096 个， 目前地板价 217MAGIC，挂单量 278（6.79%）；物品当前总量 33214，并且随着玩家的不断通关，会不断产出，目前挂单量为 4600（13.7%），且游戏物品种类众多，买卖非常靠缘分，普通物品即便挂地板价成交概率也不高。买卖 NFT 的手续费为作者版权 5%，Trove 手续费 2...]]></description>
            <content:encoded><![CDATA[<p><strong><em>作者：Tiga｜W3.Hitchhiker</em></strong></p><hr><h2 id="h-the-beacon" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The Beacon 游戏简介</h2><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">灯塔游戏玩法简介</h3><p>灯塔游戏是一款PVE游戏，玩家可以使用上下左右四个按键对角色进行异动，使用鼠标左右键进行普通攻击和重击。游戏通常设置 3 个关卡，通过前两关较为容易，此时选择放弃最后关卡可获得一个道具的随机奖励。最后一关较难，通过后可获得三个道具奖励。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">当前经济模型</h3><p>当前灯塔是弱经济模型模式，玩游戏无法获得代币，只能获得 NFT 道具，如皮肤饰品，装饰饰品等。这些饰品均可以通过 NFT 市场 Trove 市场进行出售。灯塔游戏目前在 Trove 市场有三种类别的 NFT 可买卖，分别是人物，宠物，饰品。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6685a16fc15d274a4da1ddc7e5ffeff9a0a8f67009e9b6bbfada74fd45e9f645.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>人物总共有 45180 个，目前的地板价是 20 个 MAGIC，挂单量为 824（1.82%）；宠物总量 4096 个， 目前地板价 217MAGIC，挂单量 278（6.79%）；物品当前总量 33214，并且随着玩家的不断通关，会不断产出，目前挂单量为 4600（13.7%），且游戏物品种类众多，买卖非常靠缘分，普通物品即便挂地板价成交概率也不高。<strong>买卖 NFT 的手续费为作者版权 5%，Trove 手续费 2.5%。</strong></p><p>人物可与皮肤饰品组合出售，也可将各个单品单独出售。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/39f899711cfc057c0ab699ae1e367c106b4626c0c946ae637bfa0f93eec71018.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>房屋装饰物品可装饰自己的房子，也可将每个单品单独出售。将游戏中的道具提取到自己的账户中，游戏方将收取 0.0003 的提取费。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/39121788dc3f29c9c709f718cee6c0ee1fa596f484d5079f6395d0dbed64f4ce.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">未来的发展路线</h3><p>未来灯塔游戏会开放组队战斗 + 社交玩法，不过目前这一部分现在还没有落地，团队还有许多工作需要完成。</p><p>灯塔游戏目前是 TreasureDAO 的钻石合作伙伴（最高级别合作伙伴）未来灯塔游戏极大概率可以 TreasureDAO 顶格 600w 个 MAGIC 代币的收割机（harvester）资助，该收割机资助用于支付玩家打金收益。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">从灯塔游戏看我比较看好的链游模式</h3><ol><li><p>首先一定是游戏同比当前的 gamefi 需要好玩</p><p>灯塔游戏的可玩性在 GameFi 中算能玩，上轮牛市的 GameFi 大部分属于不能玩，纯粹是 DeFi。目前在游戏打金属性约等于 0 的情况下，Discord 不管中文还是英文频道，都有很多人真正的去玩游戏，还有一些玩家真的氪金，去购买稀有的饰品皮肤，上传自己的通关视频。</p></li><li><p>需有一定的赚钱效应</p><p>在 Discord 中文频道，观察到的纯玩家还是少数，目前留存的中文玩家中，大部分是对灯塔游戏开打金模式抱有期待。加上游戏也确实可以玩，人物和宠物的 NFT 地板价并没有蹦，也不需要割肉。忠实玩家依然每天再享受游戏。</p></li><li><p>最好有“大哥”带</p><p>各种生态都有从 0 起步的游戏，不过各方面来看，做出一点成绩的项目很少。背靠大生态或者大 IP，确实成功的概率会高一点，市场表现会好一些。</p></li></ol><h2 id="h-treasuredao" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">TreasureDAO 给灯塔游戏带来的好处</h2><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">宣发支持</h3><p>灯塔最开始作为一个默默无闻的小项目方，凭借自己的能力做宣发难度较大。早期 TreasureDAO 及 Arbitrum 都多次为灯塔游戏进行宣发，举行多次 AMA 活动。TreasureDAO 作为规模还比较大的社区，有一定规模的群众基础，并且 TreasureDAO 占据了 Arbitrum 生态的游戏龙头位置，在整个 Arbitrum 生态有一定的话语权。TreasureDAO 的宣发为灯塔游戏的火爆助力不少。</p><p>从另一个角度，MAGIC 上线 Coinbase 和币安也可以看作是一次广告，币安上线一个新币，感兴趣的人会去了解这个币大概是做什么，业务做得怎么样。MAGIC 代币也有一定的交易量，总会有人看到 MAGIC 代币，也会有人想去了解。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">资金支持</h3><p>目前至少明面上没有看到灯塔游戏收到 Treasure DAO 的资金支持。未来灯塔游戏会收到 TreasureDAO 的资金扶持。TreasureDAO 作为一个已发币的社区，有 15% 代币分配给生态基金，还有 3000w+ 的 MAGIC 代币可以通过游戏“挖矿”的方式产出。</p><p>根据灯塔游戏的公告，打金 Harvester（收割机）从 3 月上线推迟到 5 月。灯塔有很大的概率拿到顶格的 600w 个 MAGIC 代币奖励，配合游戏活动产出代币。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">游戏基建配套支持</h3><p>当前环境下的链游，都需要如下的几种配套服务：</p><ul><li><p>DEX：让游戏代币与 USDC 或 ETH 等代币进行 swap，保证良好的流动性与交易体验。</p><p>目前灯塔没有推出自己的代币，不过灯塔也有意推出自己的 BCN，未来 BCN 推出，上 DEX 必然是上 MagicSwap，并与 MAGIC 组成池子。</p></li><li><p>NFT 市场：让玩家买卖游戏 NFT 装备</p><p>Trove 交易市场体验没啥硬伤，不过交易过程中会有 2.5% 交易市场抽水。</p></li><li><p>流动性：独立运行的游戏方需要努力维持 游戏代币 与 ETH/USDC 的流动性，使用 MAGIC 代币作为游戏代币（通常 MAGIC 作为子币）则无需担忧流动性的问题。</p></li></ul><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">生态内的合作</h3><p>灯塔游戏上周与恐龙（Kaijukingz）进行了合作，灯塔在游戏中开了一个特殊关卡，动画形象是恐龙的，玩家打败 BOSS 后有机会抽奖获得限量版的皇冠头盔饰品，二级市场看到的最高的成交价是 500MAGIC。目前的地板价是 180MAGIC</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a844cec7b6a835d4e099342ab3cd4900968f9d56bd6c9886d987aecdf25c86f1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>恐龙是一个 NFT 项目，目前在 OpenSea 地板价为 0.18ETH</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2b84112878d002e3f961039d8b9aaf6e2fd5bbe95ae5aba9094f7357718f7789.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>3月13日，灯塔将和TreasureDAO生态的Smolverse合作，合作形式也是开个一个特殊关卡，设置一个联名BOSS，产出一个限量版联名道具。Arbitrum PFP头牌Smol Brains（地板价约700个MAGIC）也是Smolverse旗下的NFT系列。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b238c46d72b6d29dfc290b82260fa8cfc4dab0640db99c774b3b37abf7c4cd94.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-treasuredao" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">TreasureDAO 的全方位扶持</h3><p>Treasure 与 Arbitrum合作推出一个 Game Builders Program(GBP) 计划。主要目的是扶持 Arbitrum 生态的游戏开发者，扶持更多有潜力的游戏项目进入 Arbitrum 和 Treasure。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/01516f44c7947a5b3de6c6d4d7c946b10760efa53e23aa01ed15b88e7f5e3b19.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>合作关系分为两级：钻石级和黄金级。钻石级合作关系为最高级别的合作关系，TreasureDAO 将对灯塔游戏进行全方位的资助，包括技术，战略，游戏设计，上市，社区建设，运营和资金。合作公告是 2 月初发布的，具体的合作效果后续需要观察。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">综上</h3><p>TreasureDAO 是目前游戏平台项目的 TOP3（IMX,GALA,MAGIC），在 Arbitrum 生态内有一定地位，在玩家社区中有一定号召力，在 MagicSwap，Trove 配套产业上有一定的用户基础，后续也有多款游戏将会上线，总的来看 TreasureDAO 至少在目前的观察项目中算比较不错的。不过对于游戏板块的项目，依然有许多问题存在，需要长期观察，深入调研：</p><ul><li><p><strong>如何估值，如何正确估值：</strong></p><p>TreasureDAO 目前 FDV 大约 6 亿。这个估值中，有大一部分的数字是给予社区还有未来的预期，这部分也是估值中最难的一点。对于社区的估值需要看 TreasureDAO 的变现能力，而对于市场对于 TreasureDAO 及 GameFi 板块的未来预期则很难量化。</p></li><li><p><strong>护城河：</strong></p><p>目前能想到的护城河就是 TreasureDAO 占据 Arbitrum 的 GameFi 龙头位置，加上目前数量还算庞大的玩家社区。当然这个护城河并不深，如果未来出现一个像当时 Stepn 这样的爆款游戏就能轻松翻转局面。</p></li><li><p><strong>未来天花板有多高：</strong></p><p>GameFi 赛道大趋势：游戏赛道无论是从最近一年的融资端还是观察到的人员流动端，总体呈现都是像游戏板块汇集。游戏和社交也是比较容易出圈的 web3 产品，游戏是符合未来 web3 逐步普及的大趋势。</p><p>平台：Arbitrum 目前是 L2 龙头，生态+社区+TVL 都是龙头，至少中期来看 Arbitrum 都会稳稳占据 L2 龙头的地位。在 Arbitrum 上推出一个游戏，获得的关注度和玩家的参与度会与其他生态有很大差别。</p><p>天时与地利 TreasureDAO 都算占到了一个好位置。关键是人和，生态内能不能出现象级的产品，这个问题目前无法得出答案，需要持续的观察，走一步看一步。</p></li></ul>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/4110783e68f2f77b3d21c044abecf2d1990023f1404b2daa04395a4dd5598608.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[stark 证明实操 python 实现 03]]></title>
            <link>https://paragraph.com/@w3hitchhiker/stark-python-03</link>
            <guid>VRLOpwN3lteIUu4n1QfL</guid>
            <pubDate>Fri, 03 Mar 2023 05:35:42 GMT</pubDate>
            <description><![CDATA[译者：Xiang｜W3.Hitchhiker第三部分：FRI 承诺视频教程 (youtube)幻灯片 (PDF)加载之前代码运行下面代码块以加载相关变量。像往常一样 - 运行需要一段时间。from channel import Channel from field import FieldElement from merkle import MerkleTree from polynomial import interpolate_poly, Polynomial from tutorial_sessions import part1, part2 cp, cp_eval, cp_merkle, channel, eval_domain = part2() print("Success") FRI 折叠（Folding）我们在这部分的目标是构建 FRI 层并在其上提交。要获得每一层，我们需要:为该层生成定义域（来自上一层的定义域）。为该层生成多项式（从前一层的多项式和定义域）。评估所述定义域上的所述多项式——这是下一个 FRI 层。生成定义域（Domain）第一个 FRI 定义域...]]></description>
            <content:encoded><![CDATA[<p>译者：Xiang｜W3.Hitchhiker</p><hr><h2 id="h-fri" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">第三部分：FRI 承诺</h2><ul><li><p>视频教程<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=gd1NbKUOJwA"> (youtube)</a></p></li><li><p>幻灯片<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://starkware.co/wp-content/uploads/2021/12/STARK101-Part3.pdf"> (PDF)</a></p></li></ul><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">加载之前代码</h3><p>运行下面代码块以加载相关变量。像往常一样 - 运行需要一段时间。</p><pre data-type="codeBlock" text="from channel import Channel
from field import FieldElement
from merkle import MerkleTree
from polynomial import interpolate_poly, Polynomial
from tutorial_sessions import part1, part2

cp, cp_eval, cp_merkle, channel, eval_domain = part2()
print(&quot;Success&quot;)
"><code><span class="hljs-keyword">from</span> channel <span class="hljs-keyword">import</span> Channel
<span class="hljs-keyword">from</span> field <span class="hljs-keyword">import</span> FieldElement
<span class="hljs-keyword">from</span> merkle <span class="hljs-keyword">import</span> MerkleTree
<span class="hljs-keyword">from</span> polynomial <span class="hljs-keyword">import</span> interpolate_poly, Polynomial
<span class="hljs-keyword">from</span> tutorial_sessions <span class="hljs-keyword">import</span> part1, part2

cp, cp_eval, cp_merkle, channel, eval_domain = part2()
<span class="hljs-built_in">print</span>(<span class="hljs-string">"Success"</span>)
</code></pre><h2 id="h-fri-folding" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">FRI 折叠（Folding）</h2><p>我们在这部分的目标是构建 FRI 层并在其上提交。要获得每一层，我们需要:</p><ol><li><p>为该层生成定义域（来自上一层的定义域）。</p></li><li><p>为该层生成多项式（从前一层的多项式和定义域）。</p></li><li><p>评估所述定义域上的所述多项式——<strong>这是下一个 FRI 层</strong>。</p></li></ol><h3 id="h-domain" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">生成定义域（Domain）</h3><p>第一个 FRI 定义域只是你在第 1 部分中生成的<code>eval_domain</code>，即一组 8192 阶的陪集(coset)。每个后续 FRI 的定义域都是通过获取前一个 FRI 定义域的前半部分（丢弃后半部分）获得的 , 并对其每个元素进行平方。</p><p>正式地 - 我们通过采取以下方式获得了<code>eval_domain</code>：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/33b2ed810559f4b2f4c24b3cd97c9d420ab8757d30062f8c1d0c8c06eb7c8786.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>因此，下一层将是：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6bd7cfc7d9a9c04f81c7c93ce7173d443f16e26377cfb82f6ad8604481334e75.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>请注意，取 eval_domain 中每个元素的后半部分的平方与取前半部分的平方产生的结果完全相同。 对于下一层也是如此。 例如：</p><pre data-type="codeBlock" text="print(eval_domain[100] ** 2)
half_domain_size = len(eval_domain) // 2
print(eval_domain[half_domain_size + 100] ** 2)
"><code><span class="hljs-built_in">print</span>(eval_domain[<span class="hljs-number">100</span>] ** <span class="hljs-number">2</span>)
half_domain_size = <span class="hljs-built_in">len</span>(eval_domain) <span class="hljs-comment">// 2</span>
<span class="hljs-built_in">print</span>(eval_domain[half_domain_size + <span class="hljs-number">100</span>] ** <span class="hljs-number">2</span>)
</code></pre><p>同样，第三层的定义域将是：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9b3e9ec64250639ea8dc5565bb40b716277de57551ddc409953d1bbf4c19ac68.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>以此类推，等等。</p><p>编写一个函数 <code>next_fri_domain</code> ，它将前一个定义域作为参数，并输出下一个。</p><pre data-type="codeBlock" text="def next_fri_domain(fri_domain):
    return [x ** 2 for x in fri_domain[:len(fri_domain) // 2]]
"><code><span class="hljs-keyword">def</span> <span class="hljs-title function_">next_fri_domain</span>(<span class="hljs-params">fri_domain</span>):
    <span class="hljs-keyword">return</span> [x ** <span class="hljs-number">2</span> <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> fri_domain[:<span class="hljs-built_in">len</span>(fri_domain) // <span class="hljs-number">2</span>]]
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="# Test against a precomputed hash.
from hashlib import sha256
next_domain = next_fri_domain(eval_domain)
assert &apos;5446c90d6ed23ea961513d4ae38fc6585f6614a3d392cb087e837754bfd32797&apos; == sha256(&apos;,&apos;.join([str(i) for i in next_domain]).encode()).hexdigest()
print(&apos;Success!&apos;)
"><code># Test against a precomputed hash.
from hashlib <span class="hljs-keyword">import</span> <span class="hljs-title"><span class="hljs-built_in">sha256</span></span>
<span class="hljs-title">next_domain</span> <span class="hljs-operator">=</span> <span class="hljs-title">next_fri_domain</span>(<span class="hljs-title">eval_domain</span>)
<span class="hljs-title"><span class="hljs-built_in">assert</span></span> <span class="hljs-string">'5446c90d6ed23ea961513d4ae38fc6585f6614a3d392cb087e837754bfd32797'</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-title"><span class="hljs-built_in">sha256</span></span>(<span class="hljs-string">','</span>.<span class="hljs-title">join</span>([<span class="hljs-title">str</span>(<span class="hljs-title">i</span>) <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">i</span> <span class="hljs-title">in</span> <span class="hljs-title">next_domain</span>]).<span class="hljs-title">encode</span>()).<span class="hljs-title">hexdigest</span>()
<span class="hljs-title">print</span>(<span class="hljs-string">'Success!'</span>)
</code></pre><h3 id="h-fri" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">FRI 折叠操作</h3><p>第一个FRI多项式只是组合多项式，即<code>cp</code></p><p>每个后续 FRI 多项式由下式获得：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2597d12d764817b23031c2f6473086f32bd0c07bf1d6345b37cd95c53efb1501.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="def next_fri_polynomial(poly,  beta):
    odd_coefficients = poly.poly[1::2]
    even_coefficients = poly.poly[::2]
    odd = beta * Polynomial(odd_coefficients)
    even = Polynomial(even_coefficients)
    return odd + even
"><code>def next_fri_polynomial(poly,  beta):
    odd_coefficients <span class="hljs-operator">=</span> poly.poly[<span class="hljs-number">1</span>::<span class="hljs-number">2</span>]
    even_coefficients <span class="hljs-operator">=</span> poly.poly[::<span class="hljs-number">2</span>]
    odd <span class="hljs-operator">=</span> beta <span class="hljs-operator">*</span> Polynomial(odd_coefficients)
    even <span class="hljs-operator">=</span> Polynomial(even_coefficients)
    <span class="hljs-keyword">return</span> odd <span class="hljs-operator">+</span> even
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="next_p = next_fri_polynomial(cp, FieldElement(987654321))
assert &apos;6bff4c35e1aa9693f9ceb1599b6a484d7636612be65990e726e52a32452c2154&apos; == sha256(&apos;,&apos;.join([str(i) for i in next_p.poly]).encode()).hexdigest()
print(&apos;Success!&apos;)
"><code>next_p <span class="hljs-operator">=</span> next_fri_polynomial(cp, FieldElement(<span class="hljs-number">987654321</span>))
<span class="hljs-built_in">assert</span> <span class="hljs-string">'6bff4c35e1aa9693f9ceb1599b6a484d7636612be65990e726e52a32452c2154'</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-built_in">sha256</span>(<span class="hljs-string">','</span>.join([str(i) <span class="hljs-keyword">for</span> i in next_p.poly]).encode()).hexdigest()
print(<span class="hljs-string">'Success!'</span>)
</code></pre><h3 id="h-fri" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">将它们放在一起以获得下一个 FRI 层</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/17a7cb21a170c6b3bb410cac5498581419fa03f99658df74bd17d671fd8698b6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="def next_fri_layer(poly, domain, beta):

  next_poly = next_fri_polynomial(poly, beta)

  next_domain = next_fri_domain(domain)

  next_layer = [next_poly(x) for x in next_domain]

  return next_poly, next_domain, next_layer
"><code>def next_fri_layer(poly, domain, beta):

  <span class="hljs-attr">next_poly</span> = next_fri_polynomial(poly, beta)

  <span class="hljs-attr">next_domain</span> = next_fri_domain(domain)

  <span class="hljs-attr">next_layer</span> = [next_poly(x) for x in next_domain]

  return next_poly, next_domain, next_layer
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="test_poly = Polynomial([FieldElement(2), FieldElement(3), FieldElement(0), FieldElement(1)])
test_domain = [FieldElement(3), FieldElement(5)]
beta = FieldElement(7)
next_p, next_d, next_l = next_fri_layer(test_poly, test_domain, beta)
assert next_p.poly == [FieldElement(23), FieldElement(7)]
assert next_d == [FieldElement(9)]
assert next_l == [FieldElement(86)]
print(&apos;Success!&apos;)
"><code>test_poly = <span class="hljs-built_in">Polynomial</span>([FieldElement(<span class="hljs-number">2</span>), <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">3</span>), <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">0</span>), <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">1</span>)])
test_domain = <span class="hljs-selector-attr">[FieldElement(3), FieldElement(5)]</span>
beta = <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">7</span>)
next_p, next_d, next_l = <span class="hljs-built_in">next_fri_layer</span>(test_poly, test_domain, beta)
assert next_p<span class="hljs-selector-class">.poly</span> == <span class="hljs-selector-attr">[FieldElement(23), FieldElement(7)]</span>
assert next_d == <span class="hljs-selector-attr">[FieldElement(9)]</span>
assert next_l == <span class="hljs-selector-attr">[FieldElement(86)]</span>
<span class="hljs-built_in">print</span>('Success!')
</code></pre><h2 id="h-fri" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">生成 FRI 承诺</h2><p>我们现在已经开发了编写 <code>FriCommit</code> 方法的工具，其中包含主要的 FRI 承诺循环。</p><p>它需要以下 5 个参数：</p><ol><li><p>组合多项式，也就是第一个 FRI 多项式，即 - <code>cp</code>。</p></li><li><p>8192 阶的陪集也是第一个 FRI 定义域，即 - <code>eval_domain</code>。</p></li><li><p>前者对后者的评估，这也是第一个 FRI 层，即 - <code>cp_eval</code>。</p></li><li><p>根据这些评估构建的第一棵 Merkle 树（我们将为每个 FRI 层创建一个 Merkle 树），即<code>cp_merkle</code>。</p></li><li><p>一个信道对象，即<code>channel</code>。</p></li></ol><p>该方法相应地返回 4 个列表：</p><ol><li><p>FRI多项式</p></li><li><p>FRI 定义域</p></li><li><p>FRI层</p></li><li><p>FRI Merkle 树</p></li></ol><p>该方法包含一个循环，在每次迭代中我们使用每个列表中的最后一个元素扩展这四个列表。 一旦最后一个 FRI 多项式的次数为 0，即 - 当最后一个 FRI 多项式只是一个常数时，迭代应该停止。 然后它应该通过信道发送这个常数（即 - 多项式的自由项）。 <code>Channel</code> 类仅支持发送字符串，因此请确保在发送之前将你希望通过信道发送的任何内容转换为字符串。</p><pre data-type="codeBlock" text="def FriCommit(cp, domain, cp_eval, cp_merkle, channel):    
    fri_polys = [cp]
    fri_domains = [domain]
    fri_layers = [cp_eval]
    fri_merkles = [cp_merkle]
    while fri_polys[-1].degree() &gt; 0:
        beta = channel.receive_random_field_element()
        next_poly, next_domain, next_layer = next_fri_layer(fri_polys[-1], fri_domains[-1], beta)
        fri_polys.append(next_poly)
        fri_domains.append(next_domain)
        fri_layers.append(next_layer)
        fri_merkles.append(MerkleTree(next_layer))
        channel.send(fri_merkles[-1].root)   
    channel.send(str(fri_polys[-1].poly[0]))
    return fri_polys, fri_domains, fri_layers, fri_merkles
"><code>def FriCommit(cp, domain, cp_eval, cp_merkle, channel):    
    fri_polys <span class="hljs-operator">=</span> [cp]
    fri_domains <span class="hljs-operator">=</span> [domain]
    fri_layers <span class="hljs-operator">=</span> [cp_eval]
    fri_merkles <span class="hljs-operator">=</span> [cp_merkle]
    <span class="hljs-keyword">while</span> fri_polys[<span class="hljs-number">-1</span>].degree() <span class="hljs-operator">></span> <span class="hljs-number">0</span>:
        beta <span class="hljs-operator">=</span> channel.receive_random_field_element()
        next_poly, next_domain, next_layer <span class="hljs-operator">=</span> next_fri_layer(fri_polys[<span class="hljs-number">-1</span>], fri_domains[<span class="hljs-number">-1</span>], beta)
        fri_polys.append(next_poly)
        fri_domains.append(next_domain)
        fri_layers.append(next_layer)
        fri_merkles.append(MerkleTree(next_layer))
        channel.<span class="hljs-built_in">send</span>(fri_merkles[<span class="hljs-number">-1</span>].root)   
    channel.<span class="hljs-built_in">send</span>(str(fri_polys[<span class="hljs-number">-1</span>].poly[<span class="hljs-number">0</span>]))
    <span class="hljs-keyword">return</span> fri_polys, fri_domains, fri_layers, fri_merkles
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="test_channel = Channel()
fri_polys, fri_domains, fri_layers, fri_merkles = FriCommit(cp, eval_domain, cp_eval, cp_merkle, test_channel)
assert len(fri_layers) == 11, f&apos;Expected number of FRI layers is 11, whereas it is actually {len(fri_layers)}.&apos;
assert len(fri_layers[-1]) == 8, f&apos;Expected last layer to contain exactly 8 elements, it contains {len(fri_layers[-1])}.&apos;
assert all([x == FieldElement(-1138734538) for x in fri_layers[-1]]), f&apos;Expected last layer to be constant.&apos;
assert fri_polys[-1].degree() == 0, &apos;Expacted last polynomial to be constant (degree 0).&apos;
assert fri_merkles[-1].root == &apos;1c033312a4df82248bda518b319479c22ea87bd6e15a150db400eeff653ee2ee&apos;, &apos;Last layer Merkle root is wrong.&apos;
assert test_channel.state == &apos;61452c72d8f4279b86fa49e9fb0fdef0246b396a4230a2bfb24e2d5d6bf79c2e&apos;, &apos;The channel state is not as expected.&apos;
print(&apos;Success!&apos;)
"><code>test_channel <span class="hljs-operator">=</span> Channel()
fri_polys, fri_domains, fri_layers, fri_merkles <span class="hljs-operator">=</span> FriCommit(cp, eval_domain, cp_eval, cp_merkle, test_channel)
<span class="hljs-built_in">assert</span> len(fri_layers) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">11</span>, f<span class="hljs-string">'Expected number of FRI layers is 11, whereas it is actually {len(fri_layers)}.'</span>
<span class="hljs-built_in">assert</span> len(fri_layers[<span class="hljs-number">-1</span>]) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">8</span>, f<span class="hljs-string">'Expected last layer to contain exactly 8 elements, it contains {len(fri_layers[-1])}.'</span>
<span class="hljs-built_in">assert</span> all([x <span class="hljs-operator">=</span><span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">-1138734538</span>) <span class="hljs-keyword">for</span> x in fri_layers[<span class="hljs-number">-1</span>]]), f<span class="hljs-string">'Expected last layer to be constant.'</span>
<span class="hljs-built_in">assert</span> fri_polys[<span class="hljs-number">-1</span>].degree() <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">0</span>, <span class="hljs-string">'Expacted last polynomial to be constant (degree 0).'</span>
<span class="hljs-built_in">assert</span> fri_merkles[<span class="hljs-number">-1</span>].root <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'1c033312a4df82248bda518b319479c22ea87bd6e15a150db400eeff653ee2ee'</span>, <span class="hljs-string">'Last layer Merkle root is wrong.'</span>
<span class="hljs-built_in">assert</span> test_channel.state <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'61452c72d8f4279b86fa49e9fb0fdef0246b396a4230a2bfb24e2d5d6bf79c2e'</span>, <span class="hljs-string">'The channel state is not as expected.'</span>
print(<span class="hljs-string">'Success!'</span>)
</code></pre><p>运行以下代码块以使用你的信道对象执行该函数并打印到目前为止的证明：</p><pre data-type="codeBlock" text="fri_polys, fri_domains, fri_layers, fri_merkles = FriCommit(cp, eval_domain, cp_eval, cp_merkle, channel)
print(channel.proof) 
"><code>fri_polys, fri_domains, fri_layers, fri_merkles = <span class="hljs-built_in">FriCommit</span>(cp, eval_domain, cp_eval, cp_merkle, channel)
<span class="hljs-built_in">print</span>(channel.proof) 
</code></pre>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/1b7550d00c006de3d30649b0abeb27f4d8a65dd94dc1da14e76bf22889935a44.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[stark 证明实操 python 实现 02]]></title>
            <link>https://paragraph.com/@w3hitchhiker/stark-python-02</link>
            <guid>ZZWNSlFiP5aVFbK50wZY</guid>
            <pubDate>Thu, 23 Feb 2023 03:32:45 GMT</pubDate>
            <description><![CDATA[译者：Xiang｜W3.Hitchhiker第二部分：约束 幻灯片 (PDF)在这一部分中，我们将在轨迹a 上创建一组约束。 当且仅当轨迹表示 FibonacciSq 的有效计算时，约束将是轨迹单元格中的多项式（而不是有理函数）表达式。 我们将分三步实现：首先指定我们关心的约束（FibonacciSq 约束）。将 FibonacciSq 约束转换为多项式约束。将它们转换为表示多项式的有理函数当且仅当原始约束成立时。步骤 1 - FibonacciSq 约束其计算结果恰好超过 G1，其中 G 是由 g 生成的“小”组。步骤 2 - 多项式约束开始动手首先，由于这是与第 1 部分不同的笔记，让我们运行以下代码，使此处的所有变量都具有正确的值。请注意，它最多可能需要 30 秒，因为它会重新运行多项式插值。from channel import Channel from field import FieldElement from merkle import MerkleTree from polynomial import interpolate_poly, X, prod from ...]]></description>
            <content:encoded><![CDATA[<p>译者：Xiang｜W3.Hitchhiker</p><hr><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">第二部分：约束</h2><ul><li><br></li><li><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://starkware.co/wp-content/uploads/2021/12/STARK101-Part2.pdf">幻灯片 (PDF)</a></p></li></ul><p>在这一部分中，我们将在轨迹a 上创建一组约束。 当且仅当轨迹表示 FibonacciSq 的有效计算时，约束将是轨迹单元格中的多项式（而不是有理函数）表达式。</p><p>我们将分三步实现：</p><ol><li><p>首先指定我们关心的约束（<strong>FibonacciSq 约束</strong>）。</p></li><li><p>将 FibonacciSq 约束转换为<strong>多项式约束</strong>。</p></li><li><p>将它们转换为表示多项式的<strong>有理函数</strong>当且仅当原始约束成立时。</p></li></ol><h2 id="h-1-fibonaccisq" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">步骤 1 - FibonacciSq 约束</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7699ddc8228c69b3649ec0b97077a69cb39ccf7a5db572b237cd6f232f192ba8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>其计算结果恰好超过 G1，其中 G 是由 g 生成的“小”组。</p><h2 id="h-2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">步骤 2 - 多项式约束</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e8e8a382657e570943cf8a7dd35cf8d61838fb7265bf1d13c53dc522237b8056.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">开始动手</h3><p>首先，由于这是与第 1 部分不同的笔记，让我们运行以下代码，使此处的所有变量都具有正确的值。请注意，它最多可能需要 30 秒，因为它会重新运行多项式插值。</p><pre data-type="codeBlock" text="from channel import Channel
from field import FieldElement
from merkle import MerkleTree
from polynomial import interpolate_poly, X, prod
from tutorial_sessions import part1

a, g, G, h, H, eval_domain, f, f_eval, f_merkle, channel = part1()
print(&apos;Success!&apos;)
"><code><span class="hljs-keyword">from</span> channel <span class="hljs-keyword">import</span> Channel
<span class="hljs-keyword">from</span> field <span class="hljs-keyword">import</span> FieldElement
<span class="hljs-keyword">from</span> merkle <span class="hljs-keyword">import</span> MerkleTree
<span class="hljs-keyword">from</span> polynomial <span class="hljs-keyword">import</span> interpolate_poly, X, prod
<span class="hljs-keyword">from</span> tutorial_sessions <span class="hljs-keyword">import</span> part1

a, g, G, h, H, eval_domain, f, f_eval, f_merkle, channel = part1()
<span class="hljs-built_in">print</span>(<span class="hljs-string">'Success!'</span>)
</code></pre><p>你将获得三个约束中的每一个作为两个多项式的商，确保余数是零的多项式。</p><h2 id="h-3" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">步骤3 - 有理函数 (实际的多项式)</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a5465c65a81385dfe2398bc38ebfe352313d2bf382d2e09fd2f89f4259d2a45c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-the-first-constraint" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第一个约束 The First Constraint：</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c717421b7ca38d2b42681890e8224293bfafb76102156d2e8a416a9f69369714.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="numer0 = f - 1
denom0 = X - 1
"><code><span class="hljs-attr">numer0</span> = f - <span class="hljs-number">1</span>
<span class="hljs-attr">denom0</span> = X - <span class="hljs-number">1</span>
</code></pre><p>事实上 f(x)-1 有一个根为 1 在意味着它可被 (x-1) 整除。运行以下代码块以说服自己 numer0 模 denom0 的余数为 0，因此除法确实会产生一个多项式：</p><pre data-type="codeBlock" text="numer0 % denom0
"><code>numer0 <span class="hljs-operator">%</span> denom0
</code></pre><p>运行以下代码块以通过将 <code>numer0</code> 除以 <code>denom0</code> 来构造 p0，即表示第一个约束的多项式。</p><pre data-type="codeBlock" text="p0 = numer0 / denom0
"><code><span class="hljs-attr">p0</span> = numer0 / denom0
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="assert p0(2718) == 2509888982
print(&apos;Success!&apos;)
"><code>assert <span class="hljs-built_in">p0</span>(<span class="hljs-number">2718</span>) == <span class="hljs-number">2509888982</span>
<span class="hljs-built_in">print</span>('Success!')
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第二个约束：</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/404463dbf8f9eb5a163dd9016591b735e5cb476335de2cde58c09ee1e486ffce.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="numer1 = f - 2338775057
denom1 = X - g**1022
p1 = numer1 / denom1
"><code>numer1 <span class="hljs-operator">=</span> f <span class="hljs-operator">-</span> <span class="hljs-number">2338775057</span>
denom1 <span class="hljs-operator">=</span> X <span class="hljs-operator">-</span> g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1022</span>
p1 <span class="hljs-operator">=</span> numer1 <span class="hljs-operator">/</span> denom1
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="assert p1(5772) == 232961446
print(&apos;Success!&apos;)
"><code>assert <span class="hljs-built_in">p1</span>(<span class="hljs-number">5772</span>) == <span class="hljs-number">232961446</span>
<span class="hljs-built_in">print</span>('Success!')
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">第三个约束：</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/383c681822107695604ed11425b048512788c47252556d2ef10247196739708c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="lst = [(X - g**i) for i in range(1024)]
prod(lst)
"><code>lst <span class="hljs-operator">=</span> [(X <span class="hljs-operator">-</span> g<span class="hljs-operator">*</span><span class="hljs-operator">*</span>i) <span class="hljs-keyword">for</span> i in range(<span class="hljs-number">1024</span>)]
prod(lst)
</code></pre><p>有关更多信息，请参阅博客文章 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/starkware/arithmetization-ii-403c3b3f4355">Arithmetization II</a>。</p><p>让我们暂停一下，看一个关于多项式如何组成的简单例子。之后我们将生成第三个约束。</p><h3 id="h-a-detour" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">组合多项式 (a detour)</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0d737d14c6e54d47bf69b0ccf1d66a366805a64d050b57e6d542e7e72d8afed9.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="q = 2*X ** 2 + 1
r = X - 3
"><code>q <span class="hljs-operator">=</span> <span class="hljs-number">2</span><span class="hljs-operator">*</span>X <span class="hljs-operator">*</span><span class="hljs-operator">*</span> <span class="hljs-number">2</span> <span class="hljs-operator">+</span> <span class="hljs-number">1</span>
r <span class="hljs-operator">=</span> X <span class="hljs-operator">-</span> <span class="hljs-number">3</span>
</code></pre><p>把 q r 组合产生一个新的多项式：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6f052ac06f4296ee42f4209fde288822eba76eec90ef8dd349add561f93b1000.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">返回到多项式约束</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/349529802d991a14f2cd5dc6337d7329638f3ca3fe4424f4baefa506792222b4.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="numer2 = f(g**2 * X) - f(g * X)**2 - f**2
print(&quot;Numerator at g^1020 is&quot;, numer2(g**1020))
print(&quot;Numerator at g^1021 is&quot;, numer2(g**1021))
denom2 = (X**1024 - 1) / ((X - g**1021) * (X - g**1022) * (X - g**1023))

p2 = numer2 / denom2
"><code>numer2 <span class="hljs-operator">=</span> f(g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">2</span> <span class="hljs-operator">*</span> X) <span class="hljs-operator">-</span> f(g <span class="hljs-operator">*</span> X)<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">2</span> <span class="hljs-operator">-</span> f<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">2</span>
print(<span class="hljs-string">"Numerator at g^1020 is"</span>, numer2(g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1020</span>))
print(<span class="hljs-string">"Numerator at g^1021 is"</span>, numer2(g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1021</span>))
denom2 <span class="hljs-operator">=</span> (X<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1024</span> <span class="hljs-operator">-</span> <span class="hljs-number">1</span>) <span class="hljs-operator">/</span> ((X <span class="hljs-operator">-</span> g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1021</span>) <span class="hljs-operator">*</span> (X <span class="hljs-operator">-</span> g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1022</span>) <span class="hljs-operator">*</span> (X <span class="hljs-operator">-</span> g<span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">1023</span>))

p2 <span class="hljs-operator">=</span> numer2 <span class="hljs-operator">/</span> denom2
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="assert p2.degree() == 1023, f&apos;The degree of the third constraint is {p2.degree()} when it should be 1023.&apos;
assert p2(31415) == 2090051528
print(&apos;Success!&apos;)
"><code><span class="hljs-built_in">assert</span> p2.degree() <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">1023</span>, f<span class="hljs-string">'The degree of the third constraint is {p2.degree()} when it should be 1023.'</span>
<span class="hljs-built_in">assert</span> p2(<span class="hljs-number">31415</span>) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">2090051528</span>
print(<span class="hljs-string">'Success!'</span>)
</code></pre><p>运行以下代码块观察约束多项式的次数，均小于 1024 。这在下一部分很重要。</p><pre data-type="codeBlock" text="print(&apos;deg p0 =&apos;, p0.degree())
print(&apos;deg p1 =&apos;, p1.degree())
print(&apos;deg p2 =&apos;, p2.degree())
"><code>print(<span class="hljs-string">'deg p0 ='</span>, p0.degree())
print(<span class="hljs-string">'deg p1 ='</span>, p1.degree())
print(<span class="hljs-string">'deg p2 ='</span>, p2.degree())
</code></pre><h2 id="h-4" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">步骤4 - 组合多项式</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/10fd7f9d9a688a7fb849ad7c269cf6c257498b42b2f8b4154cd78dd32dc1a206.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="def get_CP(channel):
    alpha0 = channel.receive_random_field_element()
    alpha1 = channel.receive_random_field_element()
    alpha2 = channel.receive_random_field_element()
    return alpha0*p0 + alpha1*p1 + alpha2*p2
"><code>def get_CP(channel):
    alpha0 <span class="hljs-operator">=</span> channel.receive_random_field_element()
    alpha1 <span class="hljs-operator">=</span> channel.receive_random_field_element()
    alpha2 <span class="hljs-operator">=</span> channel.receive_random_field_element()
    <span class="hljs-keyword">return</span> alpha0<span class="hljs-operator">*</span>p0 <span class="hljs-operator">+</span> alpha1<span class="hljs-operator">*</span>p1 <span class="hljs-operator">+</span> alpha2<span class="hljs-operator">*</span>p2
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="test_channel = Channel()
CP_test = get_CP(test_channel)
assert CP_test.degree() == 1023, f&apos;The degree of cp is {CP_test.degree()} when it should be 1023.&apos;
assert CP_test(2439804) == 838767343, f&apos;cp(2439804) = {CP_test(2439804)}, when it should be 838767343&apos;
print(&apos;Success!&apos;)
"><code>test_channel = <span class="hljs-built_in">Channel</span>()
CP_test = <span class="hljs-built_in">get_CP</span>(test_channel)
assert CP_test<span class="hljs-selector-class">.degree</span>() == <span class="hljs-number">1023</span>, f'The degree of cp is {CP_test<span class="hljs-selector-class">.degree</span>()} when it should be <span class="hljs-number">1023</span>.'
assert <span class="hljs-built_in">CP_test</span>(<span class="hljs-number">2439804</span>) == <span class="hljs-number">838767343</span>, f'<span class="hljs-built_in">cp</span>(<span class="hljs-number">2439804</span>) = {<span class="hljs-built_in">CP_test</span>(<span class="hljs-number">2439804</span>)}, when it should be <span class="hljs-number">838767343</span>'
<span class="hljs-built_in">print</span>('Success!')
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">提交组合多项式</h3><p>最后，我们评估 cp 在评估定义域 (<code>eval_domain</code>) 上，在其上构建一棵 Merkle 树，并通过信道发送其根。 这类似于我们在第 1 部分末尾所做的 LDE 轨迹上的提交。</p><pre data-type="codeBlock" text="def CP_eval(channel):
    CP = get_CP(channel)
    return [CP(d) for d in eval_domain]
"><code>def <span class="hljs-built_in">CP_eval</span>(channel):
    CP = <span class="hljs-built_in">get_CP</span>(channel)
    return [<span class="hljs-built_in">CP</span>(d) for d in eval_domain]
</code></pre><p>在评估上构造一个默克尔树，并通过信道发送其根。</p><pre data-type="codeBlock" text="channel = Channel()
CP_merkle = MerkleTree(CP_eval(channel))
channel.send(CP_merkle.root)
"><code>channel <span class="hljs-operator">=</span> Channel()
CP_merkle <span class="hljs-operator">=</span> MerkleTree(CP_eval(channel))
channel.<span class="hljs-built_in">send</span>(CP_merkle.root)
</code></pre><p>测试代码：</p><pre data-type="codeBlock" text="assert CP_merkle.root == &apos;a8c87ef9764af3fa005a1a2cf3ec8db50e754ccb655be7597ead15ed4a9110f1&apos;, &apos;Merkle tree root is wrong.&apos;
print(&apos;Success!&apos;)
"><code><span class="hljs-built_in">assert</span> CP_merkle.root <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'a8c87ef9764af3fa005a1a2cf3ec8db50e754ccb655be7597ead15ed4a9110f1'</span>, <span class="hljs-string">'Merkle tree root is wrong.'</span>
print(<span class="hljs-string">'Success!'</span>)
</code></pre>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/223de0f97f4b0029d17893e8261b378b47ca8933dce049600d379c00740c8ee6.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[stark 证明实操 python 实现 01]]></title>
            <link>https://paragraph.com/@w3hitchhiker/stark-python-01</link>
            <guid>EaND8vZEaqVtTq7gS1f4</guid>
            <pubDate>Thu, 23 Feb 2023 03:08:05 GMT</pubDate>
            <description><![CDATA[译者：Xiang｜W3.Hitchhiker本教程基于stark101教程翻译，可参考以下链接GitHub - starkware-industries/stark101Contribute to starkware-industries/stark101 development by creating an account on GitHub.https://github.com在线运行https://hub.ovh2.mybinder.org/user/starkware-industries-stark101-25kx5my7/lab/tree/tutorial/NotebookTutorial.ipynb基础FieldElement 类（class）我们用 FieldElement 类代表域元素，你可以从整型构造 FieldElement 的实例，然后进行加减乘除，求逆等操作，这个域大小为，所有操作都是基于模 3221225473 运算的。from field import FieldElement FieldElement(3221225472) + FieldElem...]]></description>
            <content:encoded><![CDATA[<p>译者：Xiang｜W3.Hitchhiker</p><hr><p>本教程基于stark101教程翻译，可参考以下链接</p><div data-type="embedly" src="https://github.com/starkware-industries/stark101" data="{&quot;provider_url&quot;:&quot;https://github.com&quot;,&quot;description&quot;:&quot;Contribute to starkware-industries/stark101 development by creating an account on GitHub.&quot;,&quot;title&quot;:&quot;GitHub - starkware-industries/stark101&quot;,&quot;author_name&quot;:&quot;starkware-industries&quot;,&quot;thumbnail_width&quot;:1200,&quot;url&quot;:&quot;https://github.com/starkware-industries/stark101&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/a5721348fea683b326aacd70cb3693d7804da50eb18530832c30e9154b63fc51.png&quot;,&quot;author_url&quot;:&quot;https://github.com/starkware-industries&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;GitHub&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:600,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:1200,&quot;height&quot;:600,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/a5721348fea683b326aacd70cb3693d7804da50eb18530832c30e9154b63fc51.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/a5721348fea683b326aacd70cb3693d7804da50eb18530832c30e9154b63fc51.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://github.com/starkware-industries/stark101" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>GitHub - starkware-industries/stark101</h2><p>Contribute to starkware-industries/stark101 development by creating an account on GitHub.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://github.com</span></div><img src="https://storage.googleapis.com/papyrus_images/a5721348fea683b326aacd70cb3693d7804da50eb18530832c30e9154b63fc51.png"/></div></a></div></div><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">在线运行</h3><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://hub.ovh2.mybinder.org/user/starkware-industries-stark101-25kx5my7/lab/tree/tutorial/NotebookTutorial.ipynb">https://hub.ovh2.mybinder.org/user/starkware-industries-stark101-25kx5my7/lab/tree/tutorial/NotebookTutorial.ipynb</a></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c5c12598e1449d06da3f29b6769bd5da6af5c008628c3bf572062c871fdce920.jpg" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">基础</h3><h3 id="h-fieldelement-class" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">FieldElement 类（class）</h3><p>我们用 <code>FieldElement</code> 类代表域元素，你可以从整型构造 <code>FieldElement</code> 的实例，然后进行加减乘除，求逆等操作，这个域大小为</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b9ac029cb5199bc409df67c853919517a8f18c29b65d123e916df1ee0901261c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>，所有操作都是基于模 3221225473 运算的。</p><pre data-type="codeBlock" text="from field import FieldElement
FieldElement(3221225472) + FieldElement(10)
"><code>from field import FieldElement
<span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">3221225472</span>) + <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">10</span>)
</code></pre><h2 id="h-fibonaccisq-trace" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">FibonacciSq 轨迹（trace）</h2><p>首先，让我们构造一个长度为 1023 的列表 <code>a</code>，其前两个元素将分别是表示 1 和 3141592 的 FieldElement 对象。接下来的 1021 个元素由前两元素推导得出。<code>a</code>称为FibonacciSq的执行轨迹</p><pre data-type="codeBlock" text="a = [FieldElement(1), FieldElement(3141592)]
while len(a) &lt; 1023:
    a.append(a[-2] * a[-2] + a[-1] * a[-1])
"><code>a <span class="hljs-operator">=</span> [FieldElement(<span class="hljs-number">1</span>), FieldElement(<span class="hljs-number">3141592</span>)]
<span class="hljs-keyword">while</span> len(a) <span class="hljs-operator">&#x3C;</span> <span class="hljs-number">1023</span>:
    a.append(a[<span class="hljs-number">-2</span>] <span class="hljs-operator">*</span> a[<span class="hljs-number">-2</span>] <span class="hljs-operator">+</span> a[<span class="hljs-number">-1</span>] <span class="hljs-operator">*</span> a[<span class="hljs-number">-1</span>])
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">测试你的代码</h3><p>运行下面的代码块测试填充到 a 的元素是否正确，注意这其实是个验证器，尽管非常幼稚与不简洁，因为它是逐个检查元素，从而确保是正确的。</p><pre data-type="codeBlock" text="assert len(a) == 1023, &apos;The trace must consist of exactly 1023 elements.&apos;
assert a[0] == FieldElement(1), &apos;The first element in the trace must be the unit element.&apos;
for i in range(2, 1023):
    assert a[i] == a[i - 1] * a[i - 1] + a[i - 2] * a[i - 2], f&apos;The FibonacciSq recursion rule does not apply for index {i}&apos;
assert a[1022] == FieldElement(2338775057), &apos;Wrong last element!&apos;
print(&apos;Success!&apos;)
"><code><span class="hljs-built_in">assert</span> len(a) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-number">1023</span>, <span class="hljs-string">'The trace must consist of exactly 1023 elements.'</span>
<span class="hljs-built_in">assert</span> a[<span class="hljs-number">0</span>] <span class="hljs-operator">=</span><span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">1</span>), <span class="hljs-string">'The first element in the trace must be the unit element.'</span>
<span class="hljs-keyword">for</span> i in range(<span class="hljs-number">2</span>, <span class="hljs-number">1023</span>):
    <span class="hljs-built_in">assert</span> a[i] <span class="hljs-operator">=</span><span class="hljs-operator">=</span> a[i <span class="hljs-operator">-</span> <span class="hljs-number">1</span>] <span class="hljs-operator">*</span> a[i <span class="hljs-operator">-</span> <span class="hljs-number">1</span>] <span class="hljs-operator">+</span> a[i <span class="hljs-operator">-</span> <span class="hljs-number">2</span>] <span class="hljs-operator">*</span> a[i <span class="hljs-operator">-</span> <span class="hljs-number">2</span>], f<span class="hljs-string">'The FibonacciSq recursion rule does not apply for index {i}'</span>
<span class="hljs-built_in">assert</span> a[<span class="hljs-number">1022</span>] <span class="hljs-operator">=</span><span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">2338775057</span>), <span class="hljs-string">'Wrong last element!'</span>
print(<span class="hljs-string">'Success!'</span>)
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">多项式的思考</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2e1271deda05371b3adccb31472211c996087d99804a58d5cfd368029c93afd0.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-d-1024" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">找一 d 个大小为 1024 的群</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0cf1cecbc06bfc1dfe97094bb63e4118ed8c78f5a9707e453e0a099fddeb7b5d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><pre data-type="codeBlock" text="g = FieldElement.generator() ** (3 * 2 ** 20)
G = [g ** i for i in range(1024)]
"><code>g <span class="hljs-operator">=</span> FieldElement.generator() <span class="hljs-operator">*</span><span class="hljs-operator">*</span> (<span class="hljs-number">3</span> <span class="hljs-operator">*</span> <span class="hljs-number">2</span> <span class="hljs-operator">*</span><span class="hljs-operator">*</span> <span class="hljs-number">20</span>)
G <span class="hljs-operator">=</span> [g <span class="hljs-operator">*</span><span class="hljs-operator">*</span> i <span class="hljs-keyword">for</span> i in range(<span class="hljs-number">1024</span>)]
</code></pre><p>运行下一个代码块测试你的代码</p><pre data-type="codeBlock" text="# Checks that g and G are correct.
assert g.is_order(1024), &apos;The generator g is of wrong order.&apos;
b = FieldElement(1)
for i in range(1023):
    assert b == G[i], &apos;The i-th place in G is not equal to the i-th power of g.&apos;
    b = b * g
    assert b != FieldElement(1), f&apos;g is of order {i + 1}&apos;
    
if b * g == FieldElement(1):
    print(&apos;Success!&apos;)
else:
    print(&apos;g is of order &gt; 1024&apos;)
"><code># Checks that g and G are correct.
assert g.is_order(<span class="hljs-number">1024</span>), <span class="hljs-string">'The generator g is of wrong order.'</span>
b <span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">1</span>)
<span class="hljs-keyword">for</span> i in range(<span class="hljs-number">1023</span>):
    <span class="hljs-built_in">assert</span> b <span class="hljs-operator">=</span><span class="hljs-operator">=</span> G[i], <span class="hljs-string">'The i-th place in G is not equal to the i-th power of g.'</span>
    b <span class="hljs-operator">=</span> b <span class="hljs-operator">*</span> g
    <span class="hljs-built_in">assert</span> b <span class="hljs-operator">!</span><span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">1</span>), f<span class="hljs-string">'g is of order {i + 1}'</span>
    
<span class="hljs-keyword">if</span> b <span class="hljs-operator">*</span> g <span class="hljs-operator">=</span><span class="hljs-operator">=</span> FieldElement(<span class="hljs-number">1</span>):
    print(<span class="hljs-string">'Success!'</span>)
<span class="hljs-keyword">else</span>:
    print(<span class="hljs-string">'g is of order > 1024'</span>)
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">多项式类</h3><p>我们提供一个类叫 <code>Polynomial</code>。 最简单的构建一个 <code>Polynomial</code> 使用变量 <code>X</code> (注意是大写的 <code>X</code>) 代表的正常变量 x：</p><pre data-type="codeBlock" text="from polynomial import X
# The polynomial 2x^2 + 1.
p = 2*X**2 + 1
# Evaluate p at 2:
print(p(2))
# Type a polynomial&apos;s name, on its own, in the last line of a cell to display it
p
"><code><span class="hljs-keyword">from</span> polynomial <span class="hljs-keyword">import</span> X
<span class="hljs-comment"># The polynomial 2x^2 + 1.</span>
p = <span class="hljs-number">2</span>*X**<span class="hljs-number">2</span> + <span class="hljs-number">1</span>
<span class="hljs-comment"># Evaluate p at 2:</span>
<span class="hljs-built_in">print</span>(p(<span class="hljs-number">2</span>))
<span class="hljs-comment"># Type a polynomial's name, on its own, in the last line of a cell to display it</span>
p
</code></pre><h3 id="h-interpolating-a-polynomial" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">多项式插值(Interpolating a Polynomial)</h3><p>我们 <code>polynomial</code> 模块提供了拉格朗日插值功能，它的参数包括：</p><ul><li><p>x_values: G的x值，他们的多项式值是已知的。[列表]</p></li><li><p>y_values: 对应的y值。[列表]</p></li></ul><p>他返回唯一的次数(degree)小于 <code>len(x_values)</code> 对所有i 的<code>x_values[i]</code> 值求值为<code>y_values[i]</code>的多项式实例。</p><p>运行以下代码块以获取有关函数 <code>interpolate_poly</code> 的帮助。</p><pre data-type="codeBlock" text="from polynomial import interpolate_poly
interpolate_poly?
"><code><span class="hljs-keyword">from</span> polynomial <span class="hljs-keyword">import</span> interpolate_poly
interpolate_poly?
</code></pre><p>假设 a 包含一些关于 G（除了G[-1]以外，因为a少一个元素）多项式的值，使用 interpolate_poly() 得到f然后获取它在 FieldElement(2) 的值。</p><pre data-type="codeBlock" text="from polynomial import interpolate_poly

f = interpolate_poly(G[:-1], a)
v = f(2)
"><code><span class="hljs-keyword">from</span> polynomial <span class="hljs-keyword">import</span> <span class="hljs-title">interpolate_poly</span>

<span class="hljs-title">f</span> <span class="hljs-operator">=</span> <span class="hljs-title">interpolate_poly</span>(<span class="hljs-title">G</span>[:<span class="hljs-operator">-</span>1], <span class="hljs-title">a</span>)
<span class="hljs-title">v</span> <span class="hljs-operator">=</span> <span class="hljs-title">f</span>(2)
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="assert v == FieldElement(1302089273)
print(&apos;Success!&apos;)
"><code>assert v == <span class="hljs-built_in">FieldElement</span>(<span class="hljs-number">1302089273</span>)
<span class="hljs-built_in">print</span>('Success!')
</code></pre><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">在更大的定义域上进行评估</h2><p>轨迹(trace)，被视为多项式 f 在G上的评估, 可以在更大的定义域上评估f扩展，从而创建Reed-Solomon 纠错码。</p><h3 id="h-cosets" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">陪集（Cosets）</h3><p>为此，我们必须决定一个更大的定义域来评估 f 。我们将在 8 倍 G 大小的定义域上工作。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/04b5ee3c3b1c1295301174cee445f2708df9527d4f3cad7e9a53e3fe5bc53be5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>提示: 你已经知道如何获取H - 用前面获取G同样的方式。</p><pre data-type="codeBlock" text="w = FieldElement.generator()
h = w ** ((2 ** 30 * 3) // 8192)
H = [h ** i for i in range(8192)]
eval_domain = [w * x for x in H]
"><code>w <span class="hljs-operator">=</span> FieldElement.generator()
h <span class="hljs-operator">=</span> w <span class="hljs-operator">*</span><span class="hljs-operator">*</span> ((<span class="hljs-number">2</span> <span class="hljs-operator">*</span><span class="hljs-operator">*</span> <span class="hljs-number">30</span> <span class="hljs-operator">*</span> <span class="hljs-number">3</span>) <span class="hljs-comment">// 8192)</span>
H <span class="hljs-operator">=</span> [h <span class="hljs-operator">*</span><span class="hljs-operator">*</span> i <span class="hljs-keyword">for</span> i in range(<span class="hljs-number">8192</span>)]
eval_domain <span class="hljs-operator">=</span> [w <span class="hljs-operator">*</span> x <span class="hljs-keyword">for</span> x in H]
</code></pre><p>跑测试：</p><pre data-type="codeBlock" text="from hashlib import sha256
assert len(set(eval_domain)) == len(eval_domain)
w = FieldElement.generator()
w_inv = w.inverse()
assert &apos;55fe9505f35b6d77660537f6541d441ec1bd919d03901210384c6aa1da2682ce&apos; == sha256(str(H[1]).encode()).hexdigest(),\
    &apos;H list is incorrect. H[1] should be h (i.e., the generator of H).&apos;
for i in range(8192):
    assert ((w_inv * eval_domain[1]) ** i) * w == eval_domain[i]
print(&apos;Success!&apos;)
"><code><span class="hljs-keyword">from</span> hashlib <span class="hljs-keyword">import</span> <span class="hljs-title"><span class="hljs-built_in">sha256</span></span>
<span class="hljs-title"><span class="hljs-built_in">assert</span></span> <span class="hljs-title">len</span>(<span class="hljs-title">set</span>(<span class="hljs-title">eval_domain</span>)) <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-title">len</span>(<span class="hljs-title">eval_domain</span>)
<span class="hljs-title">w</span> <span class="hljs-operator">=</span> <span class="hljs-title">FieldElement</span>.<span class="hljs-title">generator</span>()
<span class="hljs-title">w_inv</span> <span class="hljs-operator">=</span> <span class="hljs-title">w</span>.<span class="hljs-title">inverse</span>()
<span class="hljs-title"><span class="hljs-built_in">assert</span></span> <span class="hljs-string">'55fe9505f35b6d77660537f6541d441ec1bd919d03901210384c6aa1da2682ce'</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-title"><span class="hljs-built_in">sha256</span></span>(<span class="hljs-title">str</span>(<span class="hljs-title">H</span>[1]).<span class="hljs-title">encode</span>()).<span class="hljs-title">hexdigest</span>(),\
    <span class="hljs-string">'H list is incorrect. H[1] should be h (i.e., the generator of H).'</span>
<span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">i</span> <span class="hljs-title">in</span> <span class="hljs-title">range</span>(8192):
    <span class="hljs-title"><span class="hljs-built_in">assert</span></span> ((<span class="hljs-title">w_inv</span> <span class="hljs-operator">*</span> <span class="hljs-title">eval_domain</span>[1]) <span class="hljs-operator">*</span><span class="hljs-operator">*</span> <span class="hljs-title">i</span>) <span class="hljs-operator">*</span> <span class="hljs-title">w</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-title">eval_domain</span>[<span class="hljs-title">i</span>]
<span class="hljs-title">print</span>(<span class="hljs-string">'Success!'</span>)
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">在陪集上评估</h3><p>是时候使用 <code>interpolate_poly</code> 和 <code>Polynomial.poly</code> 来评估陪集。请注意，它是在我们的 Python 模块中原生实现的，因此插值可能需要长达一分钟的时间。 事实上，插值和评估多项式轨迹是 STARK 协议中计算量最大的步骤之一，即使使用更有效的方法（例如 FFT，傅里叶变化）也是如此。</p><pre data-type="codeBlock" text="f = interpolate_poly(G[:-1], a)
f_eval = [f(d) for d in eval_domain]
"><code><span class="hljs-attr">f</span> = interpolate_poly(G[:-<span class="hljs-number">1</span>], a)
<span class="hljs-attr">f_eval</span> = [f(d) for d in eval_domain]
</code></pre><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">承诺</h3><p>我们将使用基于 Sha256 的 Merkle 树作为我们的承诺方式。你可以在 MerkleTree 类中获得它的简单实现。运行下一个代码块（为了本教程的目的，这也用于测试到目前为止整个计算的正确性）：</p><pre data-type="codeBlock" text="from merkle import MerkleTree
f_merkle = MerkleTree(f_eval)
assert f_merkle.root == &apos;6c266a104eeaceae93c14ad799ce595ec8c2764359d7ad1b4b7c57a4da52be04&apos;
print(&apos;Success!&apos;)
"><code><span class="hljs-keyword">from</span> merkle <span class="hljs-keyword">import</span> <span class="hljs-title">MerkleTree</span>
<span class="hljs-title">f_merkle</span> <span class="hljs-operator">=</span> <span class="hljs-title">MerkleTree</span>(<span class="hljs-title">f_eval</span>)
<span class="hljs-title"><span class="hljs-built_in">assert</span></span> <span class="hljs-title">f_merkle</span>.<span class="hljs-title">root</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'6c266a104eeaceae93c14ad799ce595ec8c2764359d7ad1b4b7c57a4da52be04'</span>
<span class="hljs-title">print</span>(<span class="hljs-string">'Success!'</span>)
</code></pre><h3 id="h-channel" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">信道(Channel)</h3><p>从理论上讲，STARK 证明系统是双方之间交互的协议 - 证明者和验证者。在实践中，我们使用 Fiat-Shamir Heuristic 式将这种交互式协议转换为非交互式证明。在本教程中，你将使用 Channel 类来实现此转换。在证明者（你正在编写的）将发送数据的意义上来说，此信道取代了验证者，并接收随机数或随机 FieldElement 实例。</p><p>这段简单的代码实例化一个信道对象，将默克尔树的根发送到它。稍后，可以调用信道对象以提供随机数或随机域元素。</p><pre data-type="codeBlock" text="from channel import Channel
channel = Channel()
channel.send(f_merkle.root)
"><code>from channel import Channel
channel = <span class="hljs-built_in">Channel</span>()
channel<span class="hljs-selector-class">.send</span>(f_merkle.root)
</code></pre><p>最后 - 你可以通过打印成员Channel.proof来检索到目前为止的证明（即，在信道中传递到某个点的所有内容）</p><pre data-type="codeBlock" text="print(channel.proof)
"><code><span class="hljs-built_in">print</span>(channel.proof)
</code></pre>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/e9410c54fbc053a650fa2149d06ddd4ce9f6ad4d6745ae6bec0a7d68225caa1a.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[stark 数学基础与翻译名词]]></title>
            <link>https://paragraph.com/@w3hitchhiker/stark</link>
            <guid>RuAjEdKXS7Q8RaOf7s2o</guid>
            <pubDate>Thu, 23 Feb 2023 02:46:05 GMT</pubDate>
            <description><![CDATA[译者：Xiang｜W3.Hitchhikerstark 数学Evaluate 评估比如给定一个函数 f 和一个 x，问你 f(x) 是多少。Domain 定义域是函数自变量所有可取值的集合。Field 域在抽象代数中，域是一种集合，在这个集合中可以对集合的非零元素进行加减乘除，其运算的定义与行为就如同有理数还有实数一样。Coset 陪集陪集是指 H 是群 G 的子群，对于某一 g∈G，{gh| 对于所有 h∈H} 表示 H 的一个左陪集，记作 gH;{hg| 对于所有 h∈H} 表示 H的一个右陪集，只有当 H 是常态的时候，H 的左陪集和 H 的右陪集是重合的。Degree 次数多项式的次数指的是多项式的每一项都有次数,而其中次数最高的项的次数,就是这个多项式的次数。Trace 轨迹Generator 生成元群中元素可以由最小数目个群元的乘积生成，这组群元称为该群的生成元，生成元的数目为有限群的秩。Error Correction Code 纠错码纠错码(error correcting code)，在传输过程中发生错误后能在收端自行发现或纠正的码。Order 阶(群论)在群论...]]></description>
            <content:encoded><![CDATA[<p>译者：Xiang｜W3.Hitchhiker</p><h3 id="h-stark" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">stark 数学</h3><h3 id="h-evaluate" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Evaluate 评估</h3><p>比如给定一个函数 f 和一个 x，问你 f(x) 是多少。</p><h3 id="h-domain" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Domain 定义域</h3><p>是<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zh.wikipedia.org/wiki/%E5%87%BD%E6%95%B0">函数</a>自变量所有可取值的<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zh.wikipedia.org/wiki/%E9%9B%86%E5%90%88_(%E6%95%B0%E5%AD%A6)">集合</a>。</p><h3 id="h-field" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Field 域</h3><p>在<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zh.wikipedia.org/wiki/%E6%8A%BD%E8%B1%A1%E4%BB%A3%E6%95%B0">抽象代数</a>中，<strong>域</strong>是一种集合，在这个集合中可以对集合的<strong>非零元素</strong>进行加减乘除，其运算的定义与行为就如同有理数还有实数一样。</p><h3 id="h-coset" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Coset 陪集</h3><p>陪集是指 H 是群 G 的<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://baike.baidu.com/item/%E5%AD%90%E7%BE%A4/2438170?fromModule=lemma_inlink">子群</a>，对于某一 g∈G，{gh| 对于所有 h∈H} 表示 H 的一个左<strong>陪集，记作 gH;{hg| 对于所有 h∈H} 表示 H的一个右</strong>陪集，只有当 H 是常态的时候，H 的左陪集和 H 的右陪集是重合的。</p><h3 id="h-degree" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Degree 次数</h3><p>多项式的次数指的是多项式的每一项都有次数,而其中次数最高的项的次数,就是这个多项式的次数。</p><h3 id="h-trace" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Trace 轨迹</h3><h3 id="h-generator-yuan" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Generator 生成元</h3><p>群中元素可以由最小数目个群元的乘积生成，这组群元称为该群的生成元，生成元的数目为有限群的秩。</p><h3 id="h-error-correction-code" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Error Correction Code 纠错码</h3><p>纠错码(error correcting code)，在传输过程中发生错误后能在收端自行发现或纠正的码。</p><h3 id="h-order" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Order 阶(群论)</h3><p>在<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zh.wikipedia.org/zh-hans/%E7%BE%A4%E8%AB%96">群论</a>这一<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://zh.wikipedia.org/wiki/%E6%95%B8%E5%AD%B8">数学</a>的分支里，<strong>阶</strong>这一词被使用在两个相关连的意义上：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b825860d0d93afed017aebaf073f62ff13307c45c79b49fcd72c2ccac1d58277.jpg" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-constraint" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Constraint 约束</h3><h3 id="h-channel" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Channel 信道</h3><h3 id="h-rational-function" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Rational function 有理函数</h3><h3 id="h-decommit" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Decommit 解承诺</h3>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/3b89a358f4fde81071925c2c50ff46eb783e861230fe4e73ee7d8160584bdeb4.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[多变的安全数据分片]]></title>
            <link>https://paragraph.com/@w3hitchhiker/hKeonjVVdUBUMbBES39O</link>
            <guid>hKeonjVVdUBUMbBES39O</guid>
            <pubDate>Thu, 03 Nov 2022 09:38:14 GMT</pubDate>
            <description><![CDATA[原文：Variable security data sharding —— polynya 译者：Evelyn｜W3.Hitchhiker免责声明：这里的一切纯粹是猜测性的想法，有许多过度简化的地方，这些都不应该被认真对待，我只是希望有一些能够进行思考的素材。 Danksharding 的美丽想法是这样的：只有构建者（无论如何这是一个诚实的少数假设）将需要运行昂贵的硬件。随着时间的推移，rollups 会扩展到数百万 TPS，验证者、用户和其他所有人都只会产生非常小的成本。 但问题是，这个雄心勃勃的愿景将需要时间来验证。可能是 2 到 5 年之间，当然这也取决于我问的是谁。虽然加密领域一直遭受着极端的规划谬误，但事情肯定在不断改善当中，但我也拒绝相信任何路线图，直到我能看到全功能原型的出现。 EIP-4844 是一个巨大的进步，我相信在可预见的未来，它对所有需要高安全性的应用和有价值的交易来说都是绰绰有余的，并且使rollups在目前的活动基础上扩大 100 倍～ 1000 倍。但是，会有不同类别的数据饥渴型应用可能会需要 "数百万 TPS"，而不需要高安全性。 同时，很明显，开...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://polynya.mirror.xyz/xJUgtU5mArDwz0MXIyxM_wAYDKy5parhUfqb2Z24ErI"><strong><em>Variable security data sharding</em></strong></a><strong><em> —— polynya</em></strong></p><p><em>译者：Evelyn｜W3.Hitchhiker</em></p><hr><p><em>免责声明：这里的一切纯粹是猜测性的想法，有许多过度简化的地方，这些都不应该被认真对待，我只是希望有一些能够进行思考的素材。</em></p><p>Danksharding 的美丽想法是这样的：只有构建者（无论如何这是一个诚实的少数假设）将需要运行昂贵的硬件。随着时间的推移，rollups 会扩展到数百万 TPS，验证者、用户和其他所有人都只会产生非常小的成本。 但问题是，这个雄心勃勃的愿景将需要时间来验证。可能是 2 到 5 年之间，当然这也取决于我问的是谁。虽然加密领域一直遭受着极端的规划谬误，但事情肯定在不断改善当中，但我也拒绝相信任何路线图，直到我能看到全功能原型的出现。</p><p>EIP-4844 是一个巨大的进步，我相信在可预见的未来，它对所有需要高安全性的应用和有价值的交易来说都是绰绰有余的，并且使rollups在目前的活动基础上扩大 100 倍～ 1000 倍。但是，会有不同类别的数据饥渴型应用可能会需要 &quot;数百万 TPS&quot;，而不需要高安全性。</p><p>同时，很明显，开发者并不打算等待完整的 danksharding。今天，在 L2Beat 的前 15 个项目中，有 7 个不是 rollups，而是使用外部数据可用性层的 validiums 和 optimistic 链。(在这里，我假设你对这些结构很熟悉，并且知道为什么它们仍然优于侧链等）StarkEx（现在有 6 个 validiums！）、Arbitrum 和 Metis 已经拥有外部数据可用性层；而 StarkNet、zkSync、Polygon 和其他公司都在建立内部数据可用性层，更不用说 EigenDA 或 Celestia 等。这些混合解决方案既不需要 EIP-4844，也不需要完整的 danksharding 来保持低交易费用，最关键的是它们已经出现了。</p><p>一种方法是让他们做他们的事，用户会在他们需要的时候选择安全性较低的validium选项（但仍然高于 alt-L1s）。Volitions 的神奇之处在于用户可以在每个交易或每个用户的基础上进行选择。</p><p>但是，另一种方法是：我们如何能在外部数据可用性层上进行改进？</p><p>虽然这远不是一个具有代表性的样本，<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/apolynya/status/1579795189493006336">但是在今天，20% 的以太坊验证者超过了常规范围</a>。同时，45% 喜欢拥有非常保守的带宽/流量要求。通过 EIP-4844，我们正在为这 45% 进行优化，但剩下的 55% 将继续运行未得到充分利用的带宽。因此，这个想法是关于通过添加简单的数据分片来利用这个空闲的带宽，其中验证者集将被分割。我对工程知识一窍不通，但我相信 Dankrad 的话，这是 &quot;<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/dankrad/status/1574319928643051520">微不足道的</a>&quot;。</p><p>通过 EIP-4844，我们有了一个新的数据可用性层。我把它叫做 0 号数据分片（DS0）。DS0 是强制性的，由完整的以太坊验证者集来保障。</p><p>在这里，我们可以有更多的数据分片（S1、DS2......等），这些分片可以从验证者那里选择加入。所以，上述 2TB～10TB 阵营中的 30% 可以运行 2 或 3 个数据分片。因此，虽然 DS0 是由 100% 的以太坊验证者集保证的，但 DS1 是 55%，DS2 是 50%，依此类推。现在，我们有那些对 20TB 以上流量或 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/apolynya/status/1577543605560176640">100Mbps 以上带宽感</a>到舒适的超规格验证者（他们显然误以为自己是 Solana 验证者）在运行，那 20% 也能够运行更多的数据分片。所以，你的最后一个数据分片（DS16）只提供 10% 的以太坊安全性。当然，我让它听起来很随意，但根据信标链委员会的结构，可能会有一些明确的划分。但它的要点是 DS0 带有 100% 的安全性（所以所有的 rollups 都将是 HRE）。DS1 有 50% 的安全性，DS10 有 25% 的安全性，DS16 有 10%的 安全性，以此类推，对于一个新的建设类型，它介于完整的 rollup（DS0 / 100% 的安全性）和 validium / optimistic 链之间。</p><p>在现实中，正如我们所看到的，许多 validiums 和数据层正在上线，每个应用程序、用户和用例所需的安全是一个范围。并非所有的东西都需要通过数以千亿美元计的经济安全来保障。</p><p>但问题是，如果我们假设 30% 的 ETH 供应被质押，即使是 &quot;最低安全性 &quot;的 DS16，即使在这个熊市中，仍然有 50 亿美元的经济安全支持，而这仍然是顶级 alt-L1 级别的安全范围。<strong>同样重要的是，要记住，这个安全范围只是为了数据的可用性。有效性证明和欺诈证明仍然以 100% 的安全性进行验证！因此，即使是一个 DS16 的 半 rollup / 半 validium，其安全性能也明显高于顶级 alt-L1。</strong></p><p>与外部数据层选项相比，这可能仍然是一个重大进步。可以肯定的是，高价值的金融交易会选择在 DS0 上结算，但一些中等价值的 NFT 可能只需要 DS8 就可以了，而对于零价值的游戏应用来说，即使是 DS16 也可能是多余的。如上所述，在自愿类型的设置中，每个应用都可以根据自身情况来选择其所需的安全级别。</p><p>那么 rollup 用户呢？他们只需要运行与他们相关的数据分片，所以系统要求不会与 EIP-4844 不同。这就是为什么即使有安全上的妥协，相对于 EIP-4844 来说也没有分散性的妥协。(除非它是一个在多个数据分片上结算的 gigarollup —— 但这是它的用户会很清楚的事情)</p><p>要明确的是，我不期望这些事情发生，这些只是一个疯狂的非技术性业余博主的呓语。最小阻力的路径是在 2023 年到来 EIP-4844，一旦它在几年内饱和，对数据饥渴的用例就会蔓延到许多外部数据层，而数据都将被高度商品化和丰富。最终，多年下来，danksharding 逐渐上线，成为最佳解决方案。但也许有人会读到这篇文章，并找到一个更好主意来填补 4844 和完全分片之间的巨大差距......</p>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/3d5e7a3df54deb13d2fb4d931c5d6ec9ece86103ba08f85bca3e80f256f2efa5.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[多项式承诺，正在重塑整个区块链]]></title>
            <link>https://paragraph.com/@w3hitchhiker/oampmfwsqnGgVozZCyrc</link>
            <guid>oampmfwsqnGgVozZCyrc</guid>
            <pubDate>Thu, 03 Nov 2022 06:42:29 GMT</pubDate>
            <description><![CDATA[作者：Xiang｜W3.Hitchhiker 修订：Evelyn｜W3.Hitchhiker不同多项式承诺方案列表上表中，FRI 是 Starkware 采用的多项式承诺方案，可以实现量子级别的安全，但证明的数据量却是最大；IPA 是 Bulletproof 和 Halo2 零知识算法默认的多项式承诺方案，验证时间相对较长，采用的项目有门罗币，zcash 等，前两者是不需要初始可信设置的。 由上图可以看出在证明大小与验证时间上，KZG 多项式承诺的优势比较大，KZG 承诺也是目前应用最广的一种多项式承诺方式。但 KZG 是基于椭圆曲线，配对函数，需要初始可信设置的。ETH 升级路线与多项式承诺的关联在 ETH 相关生态及其未来升级路线中，都可以看到多项式承诺的踪影。The Merge： 现时的以太坊主链和 Beacon Chain 将会合并，原本的 PoW (工作量证明) 共识将会转变成 PoS (权益证明)。 The Surge： 添加DAS（数据可抽样性功能），极大的提高ETH的扩展性，通过 Danksharding 增强 rollup 性能。 The Verge： 引入 V...]]></description>
            <content:encoded><![CDATA[<p><em>作者：</em><strong><em>Xiang｜W3.Hitchhiker</em></strong></p><p><em>修订：Evelyn｜W3.Hitchhiker</em></p><hr><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">不同多项式承诺方案列表</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d27f58da1d035f9ab3cc3a69c006a5327e9d3753e363b35a63430a45a430e0a1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>上表中，FRI 是 Starkware 采用的多项式承诺方案，可以实现量子级别的安全，但证明的数据量却是最大；IPA 是 Bulletproof 和 Halo2 零知识算法默认的多项式承诺方案，验证时间相对较长，采用的项目有门罗币，zcash 等，前两者是不需要初始可信设置的。</p><p>由上图可以看出在证明大小与验证时间上，KZG 多项式承诺的优势比较大，KZG 承诺也是目前应用最广的一种多项式承诺方式。但 KZG 是基于椭圆曲线，配对函数，需要初始可信设置的。</p><h2 id="h-eth" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">ETH 升级路线与多项式承诺的关联</h2><p>在 ETH 相关生态及其未来升级路线中，都可以看到多项式承诺的踪影。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2fa3f387a09511c7edd62fe979fe6cc0ec5494c915265f4aa9c1c6c188d513fa.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>The Merge：</strong></p><p>现时的以太坊主链和 Beacon Chain 将会合并，原本的 PoW (工作量证明) 共识将会转变成 PoS (权益证明)。</p><p><strong>The Surge：</strong></p><p>添加DAS（数据可抽样性功能），极大的提高ETH的扩展性，通过 Danksharding 增强 rollup 性能。</p><p><strong>The Verge：</strong></p><p>引入 Verkle 树 (Verkle Trees) 的设计来优化以太坊上的数据存储。</p><p><strong>The Purge：</strong></p><p>通过剔除历史数据和消除技术债务，验证者不再需要使用大量硬盘空间去进行验证工作。</p><p><strong>The Splurge：</strong></p><p>四个不同部分升级后的协调，旨在减少错误 (Bugs) 的出现和确保网络能畅顺运作，还有就是 EVM 改进和添加账号抽象模型等。</p><p>其中 The Surge 升级将借鉴多项式承诺技术实现数据可抽样性功能，The Verge 升级将利用多项式承诺来优化其数据结构，ETH L2 的 zkrollup 也都采用了多项式承诺来实现其零知识证明带来的性能拓展。</p><h2 id="h-kzg" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">什么是 KZG 多项式承诺</h2><p>此文这里只介绍较好理解的 KZG 多项式承诺，KZG 多项式承诺（KZG Polynomial Commitment）也被称为卡特多项式承诺方案，是 Kate，Zaverucha 和 Goldberg 一起发表的。在一个多项式方案中，证明者计算一个多项式的承诺，并可以在多项式的任意一点进行打开，该承诺方案能证明多项式在特定位置的值与指定的值一致。</p><p>之所以被称为承诺，是因为当一个承诺值（椭圆曲线上的一个点）发送给某对象(验证者)时，证明者不可以改变当前计算的多项式。他们只能够对一个多项式提供有效的证明；当试图作弊时，它们要不无法提供证明，要不证明被验证者拒绝。</p><h2 id="h-kzg" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">KZG 数学原理</h2><p>详细可参考 Qi Zhou 博士在 Dapp Learning 讲解的关于 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.youtube.com/watch?v=n4eiiCDhTes">KZG 视频</a>。</p><p>在理解 KZG 之前，可以先了解一下多项式、群、环、域、椭圆曲线、生成元、配对公式、朗格朗日插值等数学定义。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d0651fc031dd45b57d85a22af765280d3d35f20fb09ef985d882fbeb40684a80.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">具有可信设置的多项式承诺</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5b9ea70c1ddaef502bdc3e542d4b3bd4ebd21690cc769bd5857eefba40273644.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">单个证明</h3><p>卡特证明单个数据的公式推衍如下，由于椭圆曲线群只支持加法同态，无法支持多项式之间的乘法，这是就需要通过配对函数解决，</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/655d2ddb3a806fb909954a0df71c7e52fd100949d2b9d128b6e086febec2db89.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>由于椭圆曲线群并不支持运算多项式之间的乘法运算，所以此时得采用配对函数去解决</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8aad9fefcdfbc04728dfaffadb63abea0c9065f293ce3760228f18d0f6a22249.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">批量证明</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8c6451d697221d2f08812654ed3232148e2c21dd492d10790efca19076e6f119.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">具体应用场景</h2><p><strong>多项式承诺应用方向总结起来可以分为 3 大类：</strong></p><ol><li><p><strong>数据可用性</strong>（ETH Surge 升级，ETH danksharding，降低 L2 成本，模块化数据可用性项目 Avails）</p></li><li><p><strong>数据结构优化</strong>（MPT 树改为 Verkle 树，ETH Verge 升级，无状态客户端，实现 ETH 的轻量的验证节点）</p></li><li><p><strong>零知识证明系统</strong>（Zksync，Zkswap，Scroll，PSE 给 Zk 提供多项式承诺方案，大大提升链的拓展能力）</p></li></ol><h3 id="h-1" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">1. 数据可用性</h3><h3 id="h-das" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">DAS（数据可用性抽样）</h3><p>核心目的：数据缺失则无法通过大多数节点抽查</p><p>尽力做到：占用带宽小，抽样过程所需计算量小</p><h3 id="h-celestia" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">纠删码（celestia）</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c366ab4d6dbf8fbbc4079be41217ba4eb690576c202efcbca29422b70f7c586c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>纠删码会增加额外数据块，这种情况很容易通过抽样调查发现，从而提升安全性。</p><p>以上图为例，有 4 个数据，一次只能抽样一个，假设一个数据有问题，每个用户抽样发现错误的概率是 1/4，但是加入两数据块后，还是一个数据有问题，用户抽样发现的概率可以高达 1/2（3/6）。这样就能大幅提升安全性。</p><p>KZG 也可实现纠删码，利用拉格朗日公式：</p><p>比如把 (0,3)，(1,6) 带入公式可得，<code>y=3x+3</code></p><p><code>y1，y2 </code>可以理解为要保存的数据，</p><p>对应点（2,8）(3,12) 等等，其中 <code>y</code> 值可以作为纠删码数据，其中任意两个点都可以推出原多项式公式系数。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/21507e95e89969301a04a2c0ae57b768bf9c018b35468628c26eb2e524c30836.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">不同数据可用性项目组成</h3><p><strong>Celestia = Tendermint (cosmos) + 2d 纠删码 + 欺诈证明 + Namespace merkle tree + IPFS 基础设施（数据存储用的 IPFS Blockstore，传输网络用的 IPFS 的 Libp2p 与 bitswap，数据模型用的 IPFS 的 Ipld）</strong></p><p><strong>Polygon Avail = Substrate(Polkadot) + 2d 纠删码 + KZG 多项式承诺 + IPFS 基础设施</strong></p><p><strong>ETHprotoDankSharding = Blobs 数据（数据可用性的存储，替换现有的 calldata）+ 2d 纠删码 + KZG 多项式承诺（未定，</strong><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://ethresear.ch/t/arithmetic-hash-based-alternatives-to-kzg-for-proto-danksharding-eip-4844/13863"><strong>方案</strong></a><strong>目前仍在讨论）+ ETH 基础设施</strong></p><p><strong>EIP-4844 升级将在 The Merge 之后的下一个以太坊分叉升级中引入“proto-danksharding”并添加blob交易类型（EIP-4844），这有望将第 2 层 Rollup 的可扩展性提高，同时为实现完全分片（sharding）铺平道路。</strong></p><h3 id="h-blob-transaction" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Blob Transaction</h3><div data-type="embedly" src="https://notes.ethereum.org/@vbuterin/blob_transactions" data="{&quot;provider_url&quot;:&quot;https://notes.ethereum.org&quot;,&quot;description&quot;:&quot;Simple Summary Introduce a new transaction format for \&quot;blob-carrying transactions\&quot; which conta&quot;,&quot;title&quot;:&quot;Sharding-format blob-carrying transactions - HackMD&quot;,&quot;thumbnail_width&quot;:420,&quot;url&quot;:&quot;https://notes.ethereum.org/@vbuterin/blob_transactions&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/c0ad2cff31ba696f94fe7c69e3620ae023ccce89c3c1f4f16363ddcb58c01235.png&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;HackMD&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:420,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:420,&quot;height&quot;:420,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/c0ad2cff31ba696f94fe7c69e3620ae023ccce89c3c1f4f16363ddcb58c01235.png&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/c0ad2cff31ba696f94fe7c69e3620ae023ccce89c3c1f4f16363ddcb58c01235.png"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://notes.ethereum.org/@vbuterin/blob_transactions" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Sharding-format blob-carrying transactions - HackMD</h2><p>Simple Summary Introduce a new transaction format for &quot;blob-carrying transactions&quot; which conta</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://notes.ethereum.org</span></div><img src="https://storage.googleapis.com/papyrus_images/c0ad2cff31ba696f94fe7c69e3620ae023ccce89c3c1f4f16363ddcb58c01235.png"/></div></a></div></div><ol><li><p>增加一种新的交易类型，这种交易包含额外的存储空间 —— Blobs</p></li><li><p>Blob 开始只有 128 KiB 的存储空间</p><p>（1）一个交易最多包含 2 个 Blob，即 256 KiB</p><p>（2）一个 Block 最多包含 16 个，即 2 MiB；Target 是 8 个，即 1 MiB（可扩大）</p></li><li><p>Blob 以 KZG Commitment Hash 作为 Hash，用于数据验证，作用和 Merkle 类似</p></li><li><p>节点同步链上的 Blob Transaction 后，Blob 部分会在一段时间后过期删除</p></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3356e738cdb6d5fb515c2926b0eef9220a57e30af5920b64dde843ce91f58537.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>L2 需要通过更新目前在 L1 的合约，以支持 DankSharding。</p><p>Celestia 通过欺诈证明实现。当见证人发现数据没有被正确采用删码技术，那么这个人就会将欺诈证明提交从而来提醒其他节点。但是这里需要最少诚实假设（至少连接到一个诚实节点）和同步假设（当有人给我发送欺诈证明的时候，需要确保我能在一定时间内收到通知）。</p><p>protoDanksharding 后的以太坊和 Polygon Avail 则采用了 KZG 多项式承诺（KZG commitments) 的方法。</p><p>KZG 多项式承诺方案，理论上要优于欺诈证明方案，带宽需求更小，抽样所需计算量也更小，也免去了欺诈证明中的包括少数诚实假设和同步假设等的安全假设。 未来 ETH 也有意引入抗后量子密码学(参考 stark，采用哈希，不在使用椭圆曲线作为基础)，避免量子计算机攻击。</p><h3 id="h-2-verkle-tree" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2. 数据结构优化 Verkle Tree</h3><p>Verkle Tree 的概念在 2018 年推出，作为 ETH 升级的一个重要部分，其相比于 Merkle Tree，在 Proof 的大小上，有着很大的提升；对于规模在十亿级别的数据，Merkle Tree 的 proof 大约需要 1kB，而对于 Verkle Tree， 它将小于 150Bytes。</p><p>与 Merkle Tree 一样 Verkle Tree 也能实现 Proof of Inclusion（PoI），而且只需 KZG root 和 Data 就能验证，不需要额外的 Proof，更省<strong>带宽</strong>。</p><ol><li><p>需求：Stateless Client</p><p>（1）节点不存完整的 State Tree，只获取需要的 State 来验证 Block</p><p>（2）<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/ethereum/portal-network-specs">Portal Network</a></p><p>（3）对 State Tree 的 PoI 有更高的性能要求</p></li><li><p>回顾 Data Availability 里的 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.notion.so/caa896aae59d489b98f2448f17b01640">KZG commitment</a></p><ol><li><p>每个 leaf 都是 polynomial 上的点</p></li><li><p>constant size proof，和 leaf 数量无关</p></li></ol></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/45dff6d49971b15625f0aa670f28468268f6e1dadbc48afc24c1a9243d44d4a8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>3. Verkle Tree</p><div data-type="embedly" src="https://blog.ethereum.org/2021/12/02/verkle-tree-structure" data="{&quot;provider_url&quot;:&quot;https://blog.ethereum.org&quot;,&quot;description&quot;:&quot;A Verkle tree is a commitment scheme that works similar to a Merkle tree, but has much smaller witnesses. It works by replacing the hashes in a Merkle tree with a vector commitment, which makes wider branching factors more efficient. Thanks to Kevaundray Wedderburn for feedback on the post.&quot;,&quot;title&quot;:&quot;Verkle tree structure | Ethereum Foundation Blog&quot;,&quot;thumbnail_width&quot;:2100,&quot;url&quot;:&quot;https://blog.ethereum.org/2021/12/02/verkle-tree-structure&quot;,&quot;thumbnail_url&quot;:&quot;https://storage.googleapis.com/papyrus_images/e12f8c24c2711d7c52fa168870610664d68da4a29c1198b1bff2abb4897586f7.jpg&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;provider_name&quot;:&quot;Ethereum Foundation Blog&quot;,&quot;type&quot;:&quot;link&quot;,&quot;thumbnail_height&quot;:900,&quot;image&quot;:{&quot;img&quot;:{&quot;width&quot;:2100,&quot;height&quot;:900,&quot;src&quot;:&quot;https://storage.googleapis.com/papyrus_images/e12f8c24c2711d7c52fa168870610664d68da4a29c1198b1bff2abb4897586f7.jpg&quot;}}}" format="small"><link rel="preload" as="image" href="https://storage.googleapis.com/papyrus_images/e12f8c24c2711d7c52fa168870610664d68da4a29c1198b1bff2abb4897586f7.jpg"/><div class="react-component embed my-5" data-drag-handle="true" data-node-view-wrapper="" style="white-space:normal"><a class="link-embed-link" href="https://blog.ethereum.org/2021/12/02/verkle-tree-structure" target="_blank" rel="noreferrer"><div class="link-embed"><div class="flex-1"><div><h2>Verkle tree structure | Ethereum Foundation Blog</h2><p>A Verkle tree is a commitment scheme that works similar to a Merkle tree, but has much smaller witnesses. It works by replacing the hashes in a Merkle tree with a vector commitment, which makes wider branching factors more efficient. Thanks to Kevaundray Wedderburn for feedback on the post.</p></div><span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-link h-3 w-3 my-auto inline mr-1"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>https://blog.ethereum.org</span></div><img src="https://storage.googleapis.com/papyrus_images/e12f8c24c2711d7c52fa168870610664d68da4a29c1198b1bff2abb4897586f7.jpg"/></div></a></div></div><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5eaefb3b499034f19d42ff6769df7fd5085f3ae616949e99f3de7b45e4c118fc.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ec6593082249a66083752bed1c96df17bbae2dd12e5a169c90a29ff0dce980e1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在不同树结构中构建证明，更新证明，以及证明所需的复杂度：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9f2a999668ddaa85310bfad372be4864a6621a8a17b705b35bff140a37e212c2.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/749cbcb0dcec7d0c365b434620f305e76b64c2b11586e7f203ad9e15eaaac6c7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Verkle 方案不需要以太坊客户端下载完整的状态数据，使得 ETH 验证者轻节点成为可能(甚至可支持手机运行)，多项式承诺（Verkle 树的多项式承诺方案，早期考虑的 KZG，近期还是考虑用 IPA）需要的证明空间复杂度大幅降低，带宽量需求量也大幅减少。</p><h3 id="h-3" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">3. 零知识证明系统</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c4b8784077bfc0178995a700132de8f1131d2976e744d8a21bb7f98296caaf8c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>早期 zk 技术（Groth16）属于线性 PCP 类。 除要求可信设置外，主要缺点是如果需要为不同的计算（不同的电路/多项式）提供证明，都需要一次新的设置。近期 zk 技术 PIOP 类支持通用初始设置和透明设置（不需要信任假设）。</p><p>新的 zk 证明系统通常可以描述为 PIOP（Polynomial Interactive Oracle Proof，多项式交互预言证明）+ PCS（Polynomial Commitment Scheme，多项式承诺方案）。前者可被视为是证明者用来说服验证者的约定程序，而后者使用数学方法确保该程序不会遭到破坏。项目方可以按需修改 PIOP，且可以在不同 PCS 中进行选择。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/169ec615a4405103ef7783e6eec6958b53698eb78cc7692d1a40637175c9db72.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>由 Amber 文章里的图可以看到 zk 系公链项目采用 KZG 方案的最多，有 Ploygon Hermez，Scoll，Zksync2.0，Aztec，Aleo，Manta，以太坊基金会支持的 PSE（隐私与扩展探索团队）也采用的 KZG 方案。而 Starknet，Risc0，Polygon Miden 采用的是 FRI 方案，Ploygon Zkvm(Hermez) 则是 FRI 与 KZG 的结合。</p><p>值得一提是，一些新的零知识证明系统支持多项式承诺方案的切换，KZG 未来也可以切换成其他多项式承诺方案。</p><p>总的来说，多项式承诺正在重塑整个区块链的架构，不论是在链的数据结构优化上，模块化区块链的数据可用性上，还是零知识证明系统上都将大有作为。其他地方是否还存在应用场景也是非常值得探索与跟进的。</p><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:rex@w3hitchhiker.com"><em>rex@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/dfcf63de4c34cdd5486262a47151f71597d34e583f1ba4122f02791848e81584.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[分形扩容]]></title>
            <link>https://paragraph.com/@w3hitchhiker/sH7TudWf002QG0eeh4QH</link>
            <guid>sH7TudWf002QG0eeh4QH</guid>
            <pubDate>Tue, 25 Oct 2022 08:43:34 GMT</pubDate>
            <description><![CDATA[原文：Fractal Scaling —— polynya 译者：Evelyn｜W3.HitchhikerStarkWare 已经很好地介绍了这个话题，最近Vitalik也出了一篇关于 layer 3 的详细文章。那么，在这里，我有什么要补充的吗？我一直认为我没有，这就是为什么我从来没有写过这个话题的原因 —— 自从我第一次与 StarkWare 的人讨论这个话题以来，已经过去了 10 个月。但是今天，我想我也许可以从不同的角度来漫谈这个问题了。 首先要了解的是，"web2 "现在在全世界的 100,000,000 台服务器上运行。而"Web3 "是一个相当愚蠢的 meme，因为它被明确是 "web2 "的一个小众子集。但是，让我们假设这种区块链网络可以创造其小而可持续的（但有利可图的）利基市场（niche），吸引那些严格要求分布式信任模型和相对最小的计算的场景（即没有什么比拥有定制硬件的超级计算机更能实时编码数百万个视频了）。假设我们只需要 "web2 "的 0.1% 的计算能力。那就是需要 100,000 台服务器来建立一个小的利基市场。 现在，让我们考虑一个高 TPS 的单...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://polynya.mirror.xyz/EL69tiTzl05WO8ZvQXR39odgq2GQ9FV1WGSiLA49kSk"><strong><em>Fractal Scaling</em></strong></a><strong><em> —— polynya</em></strong></p><p><em>译者：Evelyn｜W3.Hitchhiker</em></p><hr><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/starkware/fractal-scaling-from-l2-to-l3-7fe238ecfb4f">StarkWare 已经很好地介绍了这个话题</a>，最近Vitalik也出了<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://vitalik.ca/general/2022/09/17/layer_3.html">一篇关于 layer 3 的详细文章</a>。那么，在这里，我有什么要补充的吗？我一直认为我没有，这就是为什么我从来没有写过这个话题的原因 —— 自从我第一次与 StarkWare 的人讨论这个话题以来，已经过去了 10 个月。但是今天，我想我也许可以从不同的角度来漫谈这个问题了。</p><p>首先要了解的是，&quot;web2 &quot;现在在全世界的 100,000,000 台服务器上运行。而&quot;Web3 &quot;是一个相当愚蠢的 meme，因为它被明确是 &quot;web2 &quot;的一个小众子集。但是，让我们假设这种区块链网络可以创造其小而可持续的（但有利可图的）利基市场（niche），吸引那些严格要求分布式信任模型和相对最小的计算的场景（即没有什么比拥有定制硬件的超级计算机更能实时编码数百万个视频了）。假设我们只需要 &quot;web2 &quot;的 0.1% 的计算能力。那就是需要 100,000 台服务器来建立一个小的利基市场。</p><p>现在，让我们考虑一个高 TPS 的单片链，如 BNB Chain 或 Solana。虽然按比特币这样的安全和去中心化优先的链来说，它似乎令人印象深刻，但它必然是一个中端服务器，因为你必须让成百上千的实体保持同步。今天，一个更高端的服务器将是 128 核，而不是 12 核；有 1TB 内存，而不是 128GB，等等。随即，1台普通的服务器就能满足需求，这似乎是很荒谬的。事实上，一款真正的链上游戏要想获得成功，可能需要多个高端服务器，而这些服务器的计算能力则需要是 Solana 的 10 倍。</p><p>下一步是 rollups。虽然专门的执行层的设计空间很广，而且在不断发展，但我说的是具有 1-of-N 信任假设的 rollups。由于 1-of-N 的假设（相对于 51% 的大M而言），不再需要运行成千上万的节点。因此，在其他情况下，rollup 可以升级到更高性能的服务器。ZK rollups 有一个特别的优势，因为许多节点可以简单地验证有效性证明（所以你可以只需要一个拥有少量全节点的高性能服务器）。是的，你需要验证者（prover），但这些证明只需要生成一次，而且随着软件和硬件的进步，证明时间也在不断减少。</p><p>不过，在某些时候，rollup 节点会成为一个瓶颈。目前，最强大的瓶颈是状态增长。让我们假设状态增长的问题得到了解决，那接下来的事情就有点模糊了，根据场景的不同，会有一些带宽/延迟或计算的组合。根据 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/dragonfly-research/the-amm-test-a-no-bs-look-at-l1-performance-4c8c2129d581">Dragonfly 的基准</a>，即使是像 AMM swaps 这样非常温和的计算密集度低的用例，BNB Chain 在 195 TPS 和 Solana 在 273 TPS 时就达到了这个极限。如前所述，由于需要同步的节点少得多，rollup 可以把这个问题推得进一步，以缓解带宽瓶颈，但很快你就会遇到计算瓶颈。这实际上是由 Solana 的 devnet 所证明的，它的运行配置更类似于 rollup，它的 TPS 是 425 而不是 273。</p><p>然后是并行化。像 StarkNet 和 Fuel V2 这样的 rollups 项目都专注于并行执行；而像 Optimism 这样的其他团队的路线图上也计划有这一点。理论上，你可以在多个核心上的不同收费市场上与不同的用户运行多个不同的 dapp，但在实践中，这里所获得的收益预计是相当有限的。MEV 机器人将在任何时候访问所有的状态，而费用将根据链上的金融活动来设定。所以，在现实中，你会有一个核心的瓶颈。这是智能合约链的一个基本限制。这并不是说并行化没有帮助（它会有帮助的）。例如，StarkNet 的 optimistic 并行方法，肯定是一个净正的方法（这是因为，如果交易不能被并行化，它就会返回到主核心）。</p><p>64 核 CPU → 64 倍潜在吞吐量的想法是非常错误的。首先，如上所述，并行执行只在某些情况下有帮助。但更大的问题是，64 核 CPU 运行时的单线程性能大大降低。例如，64 核 EPYC 以 2.20 GHz 或 3.35 GHz（boost）的时钟频率运行；而基于相同架构的 16 核 Ryzen 9 的时钟频率为 3.4 GHz，boost 最高至 4.9 GHz。因此，对于许多交易来说，64核的CPU实际上会明显慢一些。顺便提一下，最新的第七代 Ryzen 9 将在几周后发布，在每个核心的基础上提升到 5.7 GHz ，速度提高了 15% —— 所以，是的，随着时间的推移，每个个体的计算能力确实都有提高。但远没有许多人认为的那么快（<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/apolynya/status/1545807412560465920">如今若想翻一倍，需要 4-5 年的时间</a>）。</p><p>因此，由于快速主核心的重要性，你可以扩展到最大的 16 核，如上图所示。(顺便说一下，这也是为什么你的廉价的 Ryzen 5 在游戏中提供的 FPS 是 64 核 EPYC 的 2 倍）。但是这些核心不太可能被利用到，所以我们最多只能看到 2-5 倍的提升。对于任何计算密集型的东西，我们最多考虑几百个 TPS，以实现最快的执行层。</p><p>一个充满吸引力的解决方案可能是 ASIC VM，所以基本上你有一个巨大的单核，比普通的 CPU 核快 100 倍。一位硬件工程师告诉我，把 EVM 变成一个快如闪电的 ASIC 是非常简单的，但是会花费数亿美元。也许这对于解决像 EVM 一样多的金融活动来说是非常值得的？缺点是我们需要先解决状态管理和有效性证明（即 zkEVM）的僵化规范 —— 但也许是2030年代要考虑的问题。</p><p>回到此时此刻 —— 如果我们将并行的概念提升到一个新的水平会怎样？与其把所有东西都塞进一台服务器，为什么不把事情扩展到多台服务器上呢？这就是我们得到 Layer 3 的地方。对于任何计算密集型应用来说，特定于应用的 rollup 是相当必要的。而这样也有几个好处：</p><ol><li><p>为一个应用程序进行微调，虚拟机成本为零</p></li><li><p>没有 MEV，或有限的 MEV，通过简单的解决方案来减轻有害的 MEV</p></li><li><p>专门的收费市场，也是 2）有很大的帮助。此外，你可以有新的收费模式，以获得最佳的用户体验</p></li><li><p>为特定目的选择微调硬件（而智能合约链总是有一些不适合你的应用的瓶颈）</p></li><li><p>解决交易质量的三难问题 —— 你可以不收取，或是收取忽略不计的费用，但仍然可以通过有针对性的 DDoS 缓解措施来规避垃圾信息。这样做的原因是，用户总是可以退出到结算层（2 或 1），保持抗审查。</p></li></ol><p>那么，为什么不是特定于应用的 L1，如Cosmos zones、Avalanche subnets 或 Polygon supernets？答案很简单：社会经济和安全碎片化。让我们重新审视一下问题陈述：如果我们有 100,000 台服务器，每台都有自己的验证者集（这显然是永远不会成功的）。如果你有重叠的验证者，每个验证者将需要运行多个超级计算机；或者如果每个验证者都有自己的验证者集，那将会变得非常不安全。目前来说，欺诈证明或有效性证明是唯一的方法。为什么不采用类似于 Polkadot 的或 NEAR 的分片？这里存在严格的限制，例如，每个 Polkadot 分片只能做几十 TPS，而且它的分片只会有 100 个。当然，他们有条件转向分形扩容方法，我也希望他们能这样做。</p><p>值得注意的是，欺诈和有效性证明执行层的设计范围非常广泛（所以不是所有的东西都需要 rollup）。对于大多数由一个应用程序或公司运行的低价值交易或商业交易等用例，validium 就是一个很好的解决方案。只有那些需要以太坊完整安全性的高价值去中心化金融产品才需要使用到 rollup，真的。随着像 adamantium 和 eigenDA 这样的诚实少数数据层想法的成熟，从长远来看，它们几乎可以和 rollups 一样安全。</p><p>我将跳过关于它如何工作的部分，因为 StarkWare 的 Gidi 以及 Vitalik 的说明比我更好。但要点是：你可以在一个 L2 上拥有 1000 个 L3、L4 或其他任何东西，而且所有的这些东西都可以用一个简洁的递归有效性证明来解决；只有这个需要在 L1 解决。因此，通过一个简洁的有效性证明进行验证，你就可以实现几百万的 TPS（如上所述，具有不同的属性）。因此，整个 &quot;layer &quot;的术语是相当有局限性的，如果我们达到 100,000 个服务器的目标，就会出现各种疯狂的结构。让我们只把它们看作是 rollups、validiums、volition 或其他什么，并讨论他们各自的安全属性。</p><p>现在则是来到了房间里的大象：可组合性。有趣的是，经过有效性证明的执行层可以与它的结算层单向地进行原子组合。要求是每个区块都生成一个证明（我们显然还没有达到这个要求，但这是可能的），证明生成是简单可并行的。因此，你可以让 L3 与 L2 进行原子组合。但问题是，你需要等待下一个区块的组合回来。对于许多应用程序来说，这根本不是问题，而且这些应用程序对于能够留在智能合约链上而感到愉悦。如果第 L2 提供某种形式的预先确认，这也有可能得到解决，所以 L3 和 L2 之间的交易实际上是可以原子组合的。</p><p>当你可以让多个排序器/节点组成一个统一的状态时，圣杯就成为战场争夺的中心了。我知道至少有 StarkWare、Optimism 和 Polygon Zero 的团队正在研究相关的解决方案。虽然我对实现这一目标所需的技术工程一无所知，但这似乎是在可能范围内的事情。事实上，<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://geometryresearch.xyz/notebook/the-road-to-slush">Geometry 已经通过与 Slush 的合作在这方面取得了进展。</a></p><p>这就是真正的并行。一旦想通了这一点 —— 你实际上可以在对安全性和可组合性的做出最小妥协的情况下进行大规模的分形扩容。让我们回顾一下：你有 1000 个排序器组成一个统一的状态，一个简洁的有效性证明，这就是你需要验证所有这 1000 个排序器的全部东西。所以，你继承了以太坊的信任根，你保留了完全的可组合性，有些继承了完全的安全性，有些继承了部分安全性，但在每一种情况下，在可扩展性、安全性、可组合性和去中心化方面，都比运行 1000 个高度分散的单片 L1 有绝对巨大的净收益。</p><p>我预计今年晚些时候，第一批特定于应用的 L3 将通过 L2 StarkNet 上线。当然，我们将首先看到现有的 L2 会采取些行动。但是，真正的潜力将通过我们以前没有见过的新应用来释放，这些应用只有在分形扩容的情况下才真正可能实现。链上游戏或类似的项目，如 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/topology_gg/status/1560698456229961728">Topology 的 Isaac</a> 或 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/briqNFT">Briq</a>，可能会成为第一批部署自己的 L3 的项目。</p><p>我们在这里谈论的是分形容，目前 rollup 费用是亚美分级别（实际上，Immutable X、Sorare 的费用更是低至 0.00 美元），但直到现在，它们也鲜少被利用。这也让我重回到了开始，重新来认识区块链领域的真正瓶颈 —— 新型应用。这不再是先有鸡还是先有蛋的问题了 —— 不管是昨天还是今天，我们都有大量的空区块空间，但是却没有需求。现在是我们应该专注于建立新颖的应用，独特地利用区块链的优势，并建立一些真正的消费者和企业需求的时候了。我还没有看到来自行业或投资者的足够承诺 —— 自 2020 年以来，应用层的创新几乎不存在。(将现有的 web2 概念克隆过来也毫无意义）不用说，没有这些应用，任何类型的扩容（分形或其他）都是资源浪费。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ce5b04aad5ab0f086c684d0b151bf0f2139c2be7ad2a3580ea84a53c013b9cec.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/f256e2348f893a8f5a3480b2355ef37997f41e640954900609a67045c9c8b2a3.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[SLAMM：跨链流动性的统一模型]]></title>
            <link>https://paragraph.com/@w3hitchhiker/slamm</link>
            <guid>W2u8qlBSwgGZeUtjcKNy</guid>
            <pubDate>Tue, 25 Oct 2022 08:39:36 GMT</pubDate>
            <description><![CDATA[原文：SLAMM: A Unified Model for Cross-Chain Liquidity —— Delphi 译者：Evelyn｜W3.Hitchhiker1、愿景通过实现去中心化、可组合和 24/7 的流动性，自动做市商（AMMs）是任何 DeFi 生态系统的生命线。随着新的链和二层扩容解决方案的迅速扩散，他们相互竞争引导流动性从而吸引新的用户和开发者。具有讽刺意味的是，他们的成功却使流动性被分散在各个链上。 这种流动性分散是不可避免的，因为领先的 AMMs 通常局限于以下两种方法之一：部署独立的 AMM 实例，这些实例在链之间互不沟通（如 Uniswap、Sushi、Curve）。这导致了流动性分散和糟糕的用户体验，因为交易者收到了非最优化的执行（suboptimal execution），LPs 必须手动移动资本以优化利用率。部署一个统一的应用链，它持有所有的流动性（例如 Thorchain，Osmosis）。这使得它无法与原生链上的其他 dApps 实现同步可组合（具体而言，它们只能通过跨链合约调用来访问流动性，这是一个非最优化的用户体验）。在本文中，我们提...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://members.delphidigital.io/reports/slamm-unified-model-cross-chain-liquidity/"><strong><em>SLAMM: A Unified Model for Cross-Chain Liquidity</em></strong></a><strong><em> —— Delphi</em></strong></p><p><em>译者：Evelyn｜W3.Hitchhiker</em></p><hr><h2 id="h-1" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1、愿景</h2><p>通过实现去中心化、可组合和 24/7 的流动性，自动做市商（AMMs）是任何 DeFi 生态系统的生命线。随着新的链和二层扩容解决方案的迅速扩散，他们相互竞争引导流动性从而吸引新的用户和开发者。具有讽刺意味的是，他们的成功却使流动性被分散在各个链上。</p><p>这种流动性分散是不可避免的，因为领先的 AMMs 通常局限于以下两种方法之一：</p><ul><li><p>部署独立的 AMM 实例，这些实例在链之间互不沟通（如 Uniswap、Sushi、Curve）。这导致了流动性分散和糟糕的用户体验，因为交易者收到了非最优化的执行（suboptimal execution），LPs 必须手动移动资本以优化利用率。</p></li><li><p>部署一个统一的应用链，它持有所有的流动性（例如 Thorchain，Osmosis）。这使得它无法与原生链上的其他 dApps 实现同步可组合（具体而言，它们只能通过跨链合约调用来访问流动性，这是一个非最优化的用户体验）。</p></li></ul><p>在本文中，我们提出并探讨了第三种方法，即使用新型机制来减轻流动性分散的影响。共享流动性 AMM（Shared Liquidity AMM: SLAMM）。使用一个协调应用链 &quot;Hub&quot;，虚拟流动性池和在其他链上的 &quot;卫星 &quot;部署，SLAMMs 理论上可以优化孤立的跨链池的流动性。</p><p>通过这种方法，理论上 LPs 可以 &quot;一次入金，遍地 LP&quot;，并被动地跨链收取费用。这将为终端用户提供更好的用户体验（UX）和卓越的交易执行，并为 LPs 提供更平稳的回报。</p><p>下面的章节探讨了 SLAMMs 如何在 Cosmos 应用链之间转移流动性。然而，正如在最后一节所探讨的，这种模式绝不局限于任何特定的生态系统。在对该机制进行总体描述后，我们将提出一个新的蓝图，说明现有的去中心化交易所（DEX）应该如何升级其逻辑，以便从共享流动性中获益，以及对当前 SLAMM 逻辑的可能改进，这些都值得进一步研究。</p><h2 id="h-2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2、背景</h2><p>解决跨链流动性分散的一种方法是向每个链提供所有流动性的总和，而不考虑任何特定链上的 &quot;真实 &quot;流动性。这种方法是由 StarkNet 和 Loopring 描述的（见 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/starkware/damm-decentralized-amm-59b329fb4cc3">dAMM（分布式 AMM）</a>）。在这个模型中，流动性最初存放在一个 L1 中，并进一步划分并分配到多个 L2 里。 L2 使用 &quot;虚拟 &quot;流动性为价格交易，就好像它们各自都包含了存入 L1 的全部流动性一样。这种真实储备和虚拟定价状态的解耦允许每个 L2 独立运作，而不需要在每笔交易后进行昂贵的、耗时的同步。</p><p>虽然这种模式确实为 L2 卫星上的交易者带来了更好的定价，但它有一个主要的缺点：分散损失（又称无常损失）被放大了，并随着共享流动性的卫星数量而呈线性增长。这个结果源于这样一个事实：由于 L2 卫星没有同步通信，同样的流动性可以被多个链上的交易者同时 &quot;拿走&quot;，导致 &quot;真实 &quot;储备越来越不平衡（见附录 1）。</p><p>另一个解决分散的方法是 &quot;流动性黑洞 &quot;：吸引足够数量的交易者和 LP 到一个单一的场所，从而发生自然合并。虽然这确实有它的好处，但它牺牲了可组合性；特别是同步可组合性是不可能的，除非其他 DeFi 原语运行在同一执行环境中。跨链合同调用与其他应用程序进行通信是可能的，但它们需要异步机制，这大大降低了交易者的用户体验，并引入了巨大的复杂性和风险。</p><h2 id="h-3slamm" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3、SLAMM 机制</h2><p>SLAMM 旨在通过在多个链上的共享流动性来改善交易执行和 LP 回报，同时减轻早期方法的缺点。SLAMM 的设计考虑到了以下目标：</p><ol><li><p><em>在 SLAMM 卫星上进行的交易应能与其他 DeFi 原语同步合成</em></p><p>AMM 是许多 DeFi 协议必须与之整合的核心依赖。同步可组合性大大降低了这些互动的复杂性，改善了用户体验。</p></li><li><p><em>LPs 不应该承担额外的不必要的库存或价格风险</em></p><p>像 dAMM 这样的解决方案大大增加了 LPs 面临无常损失（或在稳定币的情况下，库存风险）的风险。虽然 LPs 确实受益于来自多个链的订单流，但额外的风险很难预测或量化，特别是当卫星的数量增加或减少时。</p></li><li><p><em>交易者和 LPs 应该只需要与卫星交互</em></p><p>虽然 hub 是一个关键的基础设施，但大多数交易者和 LPs 应该不需要担心与一个新链的交互，获得新的软件，或管理新的私钥。SLAMM 试图通过将大多数用户交互推到在用户已经熟悉的链上的卫星上，尽量减少额外的用户体验复杂性。</p></li></ol><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">组成部分</h3><p>SLAMM 由一个中央 &quot;hub &quot;和许多卫星部署组成，每个卫星在不同的链上。Hub 可以作为主链上的智能合约来实现，也可以作为自己的应用链来实现。对 hub 和卫星位置的考虑包括以下几点：</p><ul><li><p>hub和每个卫星的活跃性和安全性</p></li><li><p>hub和每个卫星之间强大的跨链信息传递可用性</p></li><li><p>卫星间的跨链资产桥接</p></li></ul><p>LPs 将其资产直接存入卫星。Hub 在各卫星之间分配这些流动性，以尽量减少对交易者的价格影响，并使其最佳地暴露在他们的订单流中（见下文流动性分配）。一般来说，hub 应该寻求在预计有高交易量的卫星上增加流动性，而在预计流动性将保持闲置或利用率低的地方减少流动性。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">定价</h3><p>SLAMM 卫星上的定价使用虚拟流动性（以类似于 dAMM 的方式）。当 hub 希望增加卫星上的流动性时，它不需要移动真实资产；相反，它可以向卫星发送一个消息，通过给定数量来增加其虚拟流动性。只有当卫星耗尽需要偿还撤回的LP的流动性时，或者当流动性在先前的增加后减少时，真实资产才需要移动（另见下文LP记账）。</p><p><em>注意：卫星的定价公式所使用的粘合曲线可以是资产对的任何适当的曲线（例如*恒定乘积</em>，稳定互换，或集中流动性），只要 LP 代币是可替换的。*</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">流动性分配</h3><p>与 dAMM 不同，SLAMM 的一个关键原则是，整个系统的流动性是零和的；任何时候一个卫星上的虚拟流动性增加，它必须在另一个卫星上相应减少。因此，系统的总流动性不会被放大，LP 也不会因为价格的变动而遭受增加库存或价格风险。一个虚拟流动性增加的卫星将为交易者提供较低的滑点，而一个虚拟流动性减少的卫星将为交易者提供较高的滑点。</p><p>SLAMM 的一个关键见解是，即使这两种效应是相互抵消的，**如果虚拟流动性增加的卫星比虚拟流动性减少的卫星达到更高的利用率，交易者平均会遭受更低的滑点。**因此，hub 的主要责任是分配流动性，使虚拟流动性增加的卫星比相应减少的卫星获得更多的订单流量。图1探讨了 dAMMs 和 SLAMMs 如何处理虚拟流动性。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b16723e562bc1a76ff5b84a1e25c7283573b8fa99d052bd318cc570fad0c61df.png" alt="（图 1：dAMMs 和 SLAMMs 上的虚拟流动性之间的差异。）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 1：dAMMs 和 SLAMMs 上的虚拟流动性之间的差异。）</figcaption></figure><p>使交易员滑点最小化的最佳流动性分布与 &quot;交易量份额 &quot;成正比，即一个卫星所实现的相对交易量成正比。直观地讲，我们寻求使每个 LP 接触到的订单流最大化，无论他们的资产最初存放在哪个卫星上。</p><p><em>给定卫星 s_0 ... s_n，一个时期 P 的流动性 L_0 ... L_n 的最佳分配与 v_0 ... v_n 成正比，其中 v_i 是 P 期间卫星 s_i 预计占全系统总交易量的比例。</em></p><p>LPs 已经有能力以这种方式分配自己的流动性，但这样做往往不切实际。频繁的再平衡会导致桥接成本对利润的侵蚀，这就要求 LPs 积极管理他们的资本。此外，LPs 可能希望用他们的头寸作为单一卫星链上其他 DeFi 协议的抵押品。最终，SLAMMs 通过保持可组合性和消除在链间主动移动资本的需求来改善LP的用户体验。</p><p><em>注：虽然增加的无常损失风险能通过 SLAMM 得到缓解，但 LPs 确实承担了一些额外的风险，如 hub 的安全以及他们的流动性被实际分配到的链的安全。</em></p><h3 id="h-lp" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">LP 记账</h3><p>为了跟踪一个链上减少的流动性和另一个链上增加的流动性，SLAMM 使用由卫星发行的虚拟 LP 代币（VLP）。终端用户永远不会与 VLP 代币互动；相反，它们是一种机制，记录卫星和 hub 之间的债务和信贷。</p><p>当 hub 要求增加卫星上的流动性时，卫星将向 hub 提供一定数量的 VLP，代表这一资产的增加。在这样做的时候，虚拟流动性的总量相当于用户拥有的未偿还的真实LP份额加上 hub 拥有的 VLP 份额之和。</p><p>同样，当 hub 要求减少卫星上的流动性时，卫星要么燃烧相应数量 hub 的 VLP 份额，要么向卫星发行自己的 VLP 份额，如图 2 所示。当价格在铸造或燃烧 VLP 行动之间发生变化时，真实资产可能需要被桥接，以适当解决卫星之间的未偿债务或信用。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8fff4c675d5ae1abf0e386afa7e6b7f671c3ac2886dcc2667ebe3df804f9eeaa.png" alt="（图 2：重新平衡各卫星的虚拟流动性。）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 2：重新平衡各卫星的虚拟流动性。）</figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">交易量份额预测</h3><p>为了使 hub 的流动性分配产生上述的积极效果，hub 必须能够使用统计模型在一定程度上准确预测交易量份额。为了测试这是否可行，我们研究了 3 个流动性分散的池子。Uniswap 主网上的 ETH-USDC，SushiSwap 主网上的 ETH-USDC，以及 polygon SushiSwap 上的 ETH-USDC。</p><p>利用 24 小时内池子的利用率，我们计算了它们的最小、最大和平均增量。大的增量表明有机会在三个池子中重新分配流动性。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e4f7e3a5c93a8d9054586399c12fa21025587e2c61c383101a67443c6423a80f.png" alt="（图 3: 分散的池子在利用率方面的差异。）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 3: 分散的池子在利用率方面的差异。）</figcaption></figure><p>考虑到这些利用率上的差异，可以计算出与交易量份额成比例的最佳流动性分配：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/94760c8409cd1385e9d6ec49a9dc7a6b43c770471be47cfdaed7c970b8263c2b.png" alt="（图 4：交易量份额为最佳流动性分配提供信息依据。）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 4：交易量份额为最佳流动性分配提供信息依据。）</figcaption></figure><p>更仔细地检查 Uniswap 池，我们可以看到这种流动性分配对其深度的影响。当 Uniswap 的交易量份额高于其实际流动性份额时，它就会增加深度（减少滑点）：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8110024ff3e12eaced4b3b5ade4f4d2a61fc74ab603ea263b00e4fa4729ad333.png" alt="（图 5：交易量份额增加时，池子深度增加。）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 5：交易量份额增加时，池子深度增加。）</figcaption></figure><p>在现实世界中，我们不可能提前知道交易量份额，必须预测未来一段时间的交易量份额。使用 ARIMA 模型，我们能够以大约 10% 的平均百分比误差预测交易量份额。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5bbb6579a3a2992d72ee0e004ae5f97eae1d514f1cb6d168922e65708e5a071c.png" alt="（图 6：ARIMA 模型结果）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 6：ARIMA 模型结果）</figcaption></figure><p>交易量份额预测的改进将对 SLAMM 产生相应的积极影响，因此对预测更准确的验证者应给予奖励（见下文验证者）。</p><h2 id="h-4hub" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">4、Hub 和池子结构</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c201998735ab2cc037dee1768defdb12e0d65b6e66c2ed03aa1525bb99a60184.png" alt="（图 7：Hub 和池子的通信）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 7：Hub 和池子的通信）</figcaption></figure><p>在高层次上，hub 作为一个协调者，协调所有 AMM 卫星之间的流动性。它的工作是检测和潜在地预测哪个 AMM 部署将在不久的将来有最多的交易量，并在不同链上的池子之间 &quot;转移 &quot;虚拟流动性。如果某个 LP 的流动性（真实的或虚拟的）在特定的交易中被使用，该LP将以交易费的形式得到补偿。Hub 负责在链之间转移 &quot;真实 &quot;代币，以结算其卫星上的实际流动性。它还决定哪些跨链池应该是同一捆绑或池控制器的一部分（下文解释）。最后，Hub 管辖每个卫星上的所有参数，并管理和升级自己的逻辑。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">池子控制器</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d751da5d7f8b00e5f561784984aeacbc8c8cfd7597c930eb81e0b27e2d6e30a5.png" alt="（图 8：池子控制器架构）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 8：池子控制器架构）</figcaption></figure><p>池子控制器管理拥有相同资产的跨链池之间的流动性分配（如 A、B、C 链上的 USDC-axlUSDC 池）。一个控制器是一个有多个杠杆的盒子。每个杠杆象征着有多少虚拟流动性被分配到不同链上的池子（即 USDC-axlUSDC 池）。Hub 可以随意从 &quot;盒子 &quot;中添加或删除杠杆，并改变每个杠杆的位置。盒子的一个重要属性是，当一个杠杆向上移动时（更多的流动性流向特定链上的特定池），一个或多个杠杆必须向下移动，总的来说，移动的距离是相同的（虚拟流动性在链之间 &quot;转移&quot;，是零和）。</p><p>每个控制器将有四个主要参数：</p><ul><li><p><code>token0：字符串</code>：token 0 标识符</p></li><li><p><code>token1：字符串</code>：token 1 标识符</p></li><li><p><code>nextPoolID：uint</code>：递增的池子标识符</p></li><li><p><code>pools：mapping(int -&gt; PoolInfo)</code>：最后已知的池子元数据</p></li></ul><p>PoolInfo 是对特定池的元数据的封装，其中包含：</p><ul><li><p><code>pool：地址</code>：池子的地址（链间账户）</p></li><li><p><code>token0：字符串</code>：token 0 标识符</p></li><li><p><code>token1：字符串</code>：token 1 标识符</p></li><li><p><code>reserve0：uint</code>：池子中实际存在的 token0 的数量</p></li><li><p><code>reserve1：uint</code>：池子中实际存在的 token1 的数量</p></li><li><p><code>virtualReserve0：int</code>：token0 的虚拟储备；可以是负数</p></li><li><p><code>virtualReserve1：int</code>：代币 1 的虚拟储备；可以是负数</p></li><li><p><code>totalSupply: uint</code>：未偿付的 LP 代币的数量</p></li><li><p><code>virtualTotalSupply：uint</code>：未偿付的 VLP 代币的数量</p></li></ul><p>Hub 将能够从一个特定的控制器中添加和删除池子，并分配 VLP 代币。</p><p>除了创建新的控制器，Hub 还有权通过烧毁所有相关池子的所有虚拟流动性以及结算这些池中的任何真实流动性来关闭一个控制器。该控制器将在清盘后被删除。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">卫星池</h3><p>卫星池为连接到 Hub 的每个 DEX 实例上的交换提供便利。它们与其他 AMM 上的任何其他池子一样（例如恒定乘积，集中流动性池），但也有特殊功能，允许 Hub 铸造和燃烧虚拟 LP 代币，以跟踪链间记账。具体来说，这种功能可以在具有相同代币的链和池之间分配虚拟流动性。</p><p>Hub 使用一个包含以下信息的包装器来跟踪真实和虚拟的流动性：</p><ul><li><p><code>pool：地址</code>：池子的地址（链间账户）。</p></li><li><p><code>token0：字符串</code>：池子部署所在链上的 token0 标识符。</p></li><li><p><code>token1：字符串</code>：部署的池子的链上的 token1 标识符。</p></li><li><p><code>reserve0：uint</code>：池子中实际存在的 token0 数量</p></li><li><p><code>reserve1：uint</code>：池子中实际存在的 token1 的数量</p></li><li><p><code>virtualReserve0：int</code>：token0 的虚拟储备，可以是负数</p></li><li><p><code>virtualReserve1：int</code>：代币 1 的虚拟储备；可以是负数</p></li><li><p><code>totalSupply: uint</code>：LP 代币的总数量</p></li><li><p><code>virtualTotalSupply：uint</code>：未偿付的 VLP（虚拟 LP）代币数量</p></li></ul><p>每个包装器都是一个特定的控制器的一部分（在 Hub 层面），并以 Hub 的治理预先确定的特定节奏来进行更新。在流动性再平衡期间，虚拟储备和供应数据在 Hub 层面和池子层面都会被更新。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">跨链代币桥</h3><p>在跨链环境中，特别是在 Cosmos 中，一个常见的挑战是确定在不同链之间桥接代币的最佳方式。</p><p>作为一个例子：</p><ul><li><p>假设有人在 C 链上有提供 axlUSDC 的流动性，该 axlUSDC 从 A→B→C 被桥接</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/770aa23d8382aa7a5ef612c9e972355bece3250f685826ea7950a26fc00a2119.png" alt="（图 9：A 链到 C 链的流动性路径）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 9：A 链到 C 链的流动性路径）</figcaption></figure><ul><li><p>Hub 需要将流动性从 C 链转移到 D 链。到 D 链的最短路径是 C→D，但大多数 axlUSDC 的流动性是从 A→D 桥接的</p></li><li><p>根据链下共识（社区批准的预定 IBC 路径，在 C 链和 D 链之间桥接代币），axlUSDC 从 C 链到 D 链的最佳桥接方式是 C→B→A→D</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/59dfbd4190f7956e232869e44f303ed471903e3ba50cd2add8c0d33afc003014.png" alt="（图 10：从 C 链到 D 链移动流动性）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 10：从 C 链到 D 链移动流动性）</figcaption></figure><p>对于每一个代币来说，在任何两个链之间都必须有一个正式的路径来连接它。这确保了每个链对其处理的所有代币都有规范的版本，以避免流动性分散。为此，Hub 将维护和更新一个 IBC 路径的注册表，可用于在任何链之间结算真实的流动性。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">交易量预测者和验证者</h3><p>为了正确地分配流动性，hub 需要从外部来源获得对交易量份额的预测。独立行动的交易量预测者可以向 hub 提交他们对某一特定时期的预测，Hub 负责将这些值合成为一个单一的权重（类似于 L1 预言机如何从许多输入中得出一个单一的价格）。</p><p>预测者可以根据他们的预测与现实的接近程度得到 hub 的奖励或惩罚，正如卫星事后报告的那样。每个预测者都可以自由地实施他们自己的模型来竞争这些奖励。这种公开的预测竞争比在协议层面上的单一模型更可取，因为它可能会导致更复杂的模型，并需要更少的管理监督。</p><p>如果 hub 被实现为一个应用链，那么交易量预测者的一个自然候选者就是 hub 链本身的验证者。另外，如果 hub 被实现为主链上的智能合约，预测可能是无权限的，只需要一些赌注值。</p><p>我们自己的 ARIMA 模型在回测真实世界的数据时，对交易量份额的预测平均百分比误差约为 10%（见交易量份额预测部分）。进一步的研究将需要分析可能玩弄这个奖励系统的攻击载体，如洗盘交易，目的是使特定验证者的（建议）权重分布与随后的真实成交量分布相匹配。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">风险</h3><p>Hub 和卫星模式有两个主要风险。首先，一个拥有卫星的 AMM 链可能会停止。这将暂停卫星上的提款和互换。第二，Hub 本身也可能停止。下面的章节详细介绍了这些风险和可能的后果。由于停止会对交易者和 LP 产生负面影响，在纳入任何有连锁停顿历史或预期的连锁之前，治理需要仔细考虑这些风险。值得一提的是，这一节并不意味着包括所有的风险，而是在实施 SLAMM 时提出了更显著的风险。</p><h3 id="h-cosmos" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Cosmos 链停止</h3><p>虽然很罕见，但链上的停止会对交易者和 LP 产生负面影响。某条链上的停顿不仅会影响发生停顿的链上的资产，而且会影响通过停顿链的任何流动性。有三种情况可能发生：</p><ol><li><p>源链停止</p></li><li><p>接收链停止</p></li><li><p>两个其他 Cosmos 链之间的一个中介链停止。</p></li></ol><p>在数字 1 和 2 的情况下，假设有三条链，A，B 和 D，它们使用第四条链，C 链，作为中介链。代币定期从 A→B→C→D 转移，反之亦然。</p><p>如果 A 链停止，在停止期间，所有没有被桥接到 B 或 D 的流动性必须从这些链的全局计算中移除。全局流动性将只包括 B 和 D 上的资产的总和，因为之前存放在 A 链上的流动性不能再被提取了。</p><p>如果 C 链停止，流动性不能从 D 链桥接回到 A 链或 B 链，所以 D 链的虚拟和真实流动性必须从 A 链和 B 链的全局计算中减去，D 链的真实流动性仍可用于交易。</p><p>如果 D 链停止了，所有从 A 链或 B 链桥接的流动性都不能撤回，并从这些剩余链的全局计算中删除。</p><p>在第三个链停止的情况下，假设用于在 A 链和 C 链之间桥接代币的 B 链停止了。在这种情况下，中心必须从其全球流动性的计算中减去被卡住的流动性。此外，LPs 在停止期间可能无法提款，或可能收到比他们存入的更少的代币，因为他们的全部或部分资金不再可以提取。</p><p>如果以及当任何停止的链恢复时，虚拟流动性的计算应该重新纳入以前被减去的流动性。然后，没有提取其初始存款的 LPs 将有资格按比例提取其先前无法获得的剩余流动性的份额。</p><h3 id="h-hub" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Hub 停止</h3><p>Hub 负责管理虚拟流动性和跨链移动实际流动性。如果 Hub 停止，虚拟流动性就不能再被更新，实际流动性也不能再在卫星之间移动。这可能使一些卫星几乎没有实际的流动性。因此，LPs 可能无法从存放资产的卫星或任何其他卫星提取他们的资产（因为虚拟流动性的计算将被停止）。如果以及当 Hub 恢复区块生产时，虚拟流动性的更新将恢复，流动性将根据需要在链之间移动。停止的时长和 LPs 的行动可能会导致重大损失。因此，当务之急是对 Hub 的验证者进行适当的激励，以确保一个健康、强大的网络，愿意并能够仔细协调更新。</p><h2 id="h-5" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">5、治理</h2><p>作为一个独立的 Cosmos-SDK 应用链，需要一个去中心化的验证者运营商网络来保持 Hub 的运作。作为基础的利益相关者，验证者将有权力对智能合约参数的改变、智能合约的升级和库房的支付提出建议并进行有约束力的投票。</p><p>这些决定将由验证者和质押者组成的 &quot;去中心化自治组织&quot;（DAO）来进行协调。该协议的 CosmWasm 智能合约将只能由合约的所有者地址来升级。而所有者地址将是 Hub 治理合同本身。经批准后，任何升级或支付都将被自主地执行。由于这个过程将是公开和透明的，所以批准恶意或不安全的升级应该是非常困难的。</p><p>SLAMM 治理的具体决定包括：</p><ul><li><p>批准 CosmWasm 的部署，在其他链上建立卫星 DEXs</p></li><li><p>将单个池子添加到共享的跨链池控制器中</p></li><li><p>确定可接受的 IBC 代币路径</p></li><li><p>为一般池子和特定池子设置价格曲线</p></li><li><p>根据需要调整优化算法（即确保特定卫星上的特定对有最低限度的流动性）。</p></li><li><p>修改参数更新的界限（即每个池子的参数在 X 秒内可以改变多少）。</p></li></ul><p>参数界限对于包括放大参数在内的具体调整尤其重要，因为这些参数可能需要经常改变。要求对每个池子的放大参数进行投票将是非常繁琐的。相反，治理可以选择在特定范围内改变参数，随着预定目标的实现而分阶段实施。</p><p>一个 SLAMM 的复杂结构需要有丰富知识并且积极的治理者。理想的情况是，设计一个开源的、强大的风险管理框架来指导决策过程。这个框架可以用来客观和公开地对任何具体的修改或卫星部署的风险进行评分。池子的上限和其他分阶段的推出可以帮助限制任何重大升级的风险。</p><p>最终，一个 SLAMM 为多个主人服务：验证者、质押者、LP 和交易者，治理的每一个决定都对每个利益相关者产生影响。一个安全的 SLAMM 可以确保其长期生存能力。因此，当对升级的安全性或谨慎性有疑问时，应以保守的、渐进式的升级为主。</p><h2 id="h-6" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">6、未来</h2><p>一个 AMM 只有在其流动性池的深度上才有用。因此，利用已建立的 DEX 来建立 SLAMM 是有利的。任何推广都可以分阶段进行：</p><ol><li><p>在已建立的 DEX（DEX 1）上创建一个提案，将其架构从独立的 AMM 模式修改为 SLAMM 模式</p></li><li><p>假设提案通过，启动一个独立的应用链 Hub。验证者将被要求以 DEX 1 的治理代币作为质押，从而操作一个全节点并参与共识。这些验证者将在区块链中提交新的区块，并收到 DEX 交换费以换取他们的工作。验证者还必须通过对提案进行投票来参与治理，他们的投票将根据他们的总质押额进行加权计算。</p></li><li><p>整合 DEX 1 作为 SLAMM 的第一颗卫星，并将 DEX 1 的合同所有者地址的控制权移交给 Hub</p></li><li><p>创建在其他链上发射卫星的提案</p></li><li><p>通过在池子控制器中添加在不同 SLAMM 卫星部署上持有相同资产的池子来连接它们</p></li><li><p>为分配给控制器的所有池子中持有的代币建立跨链桥接路径</p></li><li><p>Hub 验证者定期循环每个控制器，为所有共享流动性的资金池重新平衡（虚拟）流动性</p></li></ol><p>SLAMM 架构目前是概念性的，但它提出了有趣的挑战，并且值得进一步研究。最直接的是，应该探索黑天鹅 Hub 链停止的缓解措施。如果这样的停止真的发生，LPs 必须能够在一系列的卫星上撤回他们的流动性，而不需要来自 Hub 的任何协调。已经提出了一些缓解策略，但没有几个能满足所有的要求 —— 特别是由于治理将随着Hub 链的停止而停止。任何解决方案都应该是自动化的，并且可以立即行动。</p><p>第二，可以改进建议的跨链补充流动性的方法，特别是对于波动性大的资产池。一个潜在的方法是让每个卫星 DEX 与信贷协议（或 &quot;货币市场&quot;）整合，并在短期内借入流动性（直到 Hub 设法偿还贷款）。</p><p>最后，应该探索一种整合非 Cosmos 链的模式。其他区块链生态系统，正在努力实现 IBC 兼容性，包括以太坊、Polkadot、Avalanche 和 Fantom，都是明显的候选人。除了这些，SLAMM 有可能利用桥或异步消息来整合非 IBC 链的流动性，包括比特币。</p><p>虽然 SLAMM&apos;s 目前还是理论上的，但我们相信它们代表了 AMMs 的最终目标。随着交易者和 LPs 的用户体验的极大改善，它们可以帮助 DEXs 与中心化交易所的性能和资产种类相媲美。</p><p>最终，LPs 应该能够 &quot;一次入金，偏地LP&quot;，而交易者应该能够在他们想交易的地方获得他们想交易的资产。由于它们能够提供即时的最终结果，SLAMM 流动性有可能被用于专注于借贷、稳定币等的非交换 DApps，以提供一个真正的跨链 DeFi 生态系统。我们相信这个独特的架构代表了迈向这个未来的最有效和最可能的一步，我们欢迎反馈和建议来改进它。</p><hr><h3 id="h-1-damm-slamm" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">附录 1: dAMM 和 SLAMM 中的无常损失</h3><p>考虑一个以 120,000 USDC 和 120 WETH代币开始的 dAMM，而 WETH 的市场价值为 1,000 美元。真正的 &quot;流动资金 &quot;在两个卫星之间平均分配。尽管每个卫星只拥有一半的流动性，但它们各自保持着与存入的流动性总量相等的 &quot;虚拟储备&quot;。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0b381f5746f15f4092c39b1ad2b15d94ea6f8b1a5f4e710f3aba6b6f7e8e8c0d.png" alt="（图 11：dAMM 卫星共享虚拟流动性）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 11：dAMM 卫星共享虚拟流动性）</figcaption></figure><p>当 WETH 的价格移动到 2000 美元时，交易者和套利者将移动池子的余额以匹配每个卫星。考虑一个假设的 120,000 USDC 和 120 WETH 的单一池子。忽略费用，在这个价格下的新储备可以计算为：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/33afe5194cda94103711a1f5125f80ff7fa9f7d7717a0f2ca1ee0cf76541681c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>或〜169,705 USDC 和 84.85 WETH。为了实现这些储备，交易者已经存入了 49,705 USDC 的净值，并取出了 35.15 WETH 的净值。在这个假设的单一池子中，剩余代币的总价值约为 339,411 美元。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5771422813390c8536d5c7e3a72ed4e14a6ec86bee8660b58c74c4ae7018b065.png" alt="（图表 1）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图表 1）</figcaption></figure><p>即使每条链上只有 60,000 USDC 和 60 WETH，dAMM 为交易者提供的定价与 120,000 USDC 和 120 WETH 的虚拟流动性一致。由于两个卫星都为交易者提供相同深度的流动性，上面的例子中的金额将从两个卫星中存入/取出，从而导致以下状态：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9d6dfcd962d37b5d0fb89e5ae6794d2597cfd6e7a419f826bf6d353af51b728c.png" alt="（图 12：dAMM 中的无常损失）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 12：dAMM 中的无常损失）</figcaption></figure><p>当我们将每个卫星的实际流动性相加时，我们得出上面的红色总数，与假设的单一池子相比，不平衡程度更大，分歧损失也更大，达到 11.4%。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/85d4f7d2c58179c0d6c6ff01f497f774fb889a2627f64002666535cbacc411be.png" alt="（图表 2）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图表 2）</figcaption></figure><p>为了与 SLAMM 对比，考虑一个类似的 SLAMM 部署，向两个卫星提供 120,000 USDC 和 120 ETH，使用一个恒定乘积定价曲线（为了更容易与 dAMM 对比）。Hub 预测 B 池的利用率将提高 2 倍，并相应调整虚拟流动性。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8fff4c675d5ae1abf0e386afa7e6b7f671c3ac2886dcc2667ebe3df804f9eeaa.png" alt="（图 13：SLAMM 流动性分配）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 13：SLAMM 流动性分配）</figcaption></figure><p>当 WETH 的价格移动到 2,000 美元时，交易者将套利卫星余额来匹配，同样，我们最终有虚拟储备，使用公式匹配价格：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/33afe5194cda94103711a1f5125f80ff7fa9f7d7717a0f2ca1ee0cf76541681c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>然而，这一次，每个卫星的 K 值不同，因此对交易的定价也不同；B 池的价格交易会有较低影响。只要 B 池取得的交易量份额比 A 池高，交易者就会平均取得较低的滑点。在这些交易之后，池子最终处于以下状态：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c20d1e024d0dd8ba12cdfe011b239da8e38823959ce3bddf2a8eeb1921fae997.png" alt="（图 14：SLAMM 中的无常损失）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图 14：SLAMM 中的无常损失）</figcaption></figure><p>当我们把这次的流动性相加时，我们最终的无常损失相当于单个池子的损失：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e19de8186ea3e9d3022466f15e490ae7f696da5215eeb7e34ed10d70acdee7c0.png" alt="（图表 3）" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">（图表 3）</figcaption></figure><p>值得注意的是，虽然 A 池和 B 池中的真实资产看起来价值不同，但 LP 对这些资产的要求与虚拟流动性成正比；从 B 池提款不会遭受额外的无常损失。由于相对于 LP 在提款时的欠款而言，真实的流动性可能很低，因此 LP 提款可能需要在 hub 结算内部 VLP 会计时进行异步调用。</p>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/c5c62b680c23c347b6999789088c3e5c1a0ab6aa28d5959387cbd6c4bbffe606.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Lyra - Option AMM Pioneer]]></title>
            <link>https://paragraph.com/@w3hitchhiker/lyra-option-amm-pioneer</link>
            <guid>JvrIsIJUaGFqCcVk6i4e</guid>
            <pubDate>Tue, 18 Oct 2022 05:23:02 GMT</pubDate>
            <description><![CDATA[Created by Jack Ding｜W3.HitchhikerAn Overview of On-chain OptionsAt present, there are three main types of on-chain options:OrderbookDeFi Option Vaults(structured products)Auto-market Marker（resource：https://www.panewslab.com/zh/articledetails/1644045861942159.html）Orderbooke.x.：Zeta，Psyoption，Opyn Option order books also require high tps blockchain to guarantee cheap and fast execution. Opyn used the Orderbook model on ETH main chain, but due to the lack of liquidity and high gas costs，trade...]]></description>
            <content:encoded><![CDATA[<p><strong><em>Created by Jack Ding｜W3.Hitchhiker</em></strong></p><hr><h2 id="h-an-overview-of-on-chain-options" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">An Overview of On-chain Options</h2><p>At present, there are three main types of on-chain options:</p><ul><li><p>Orderbook</p></li><li><p>DeFi Option Vaults(structured products)</p></li><li><p>Auto-market Marker</p></li></ul><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0e8d888fa7a7c78130696f2ab93a00a2a6477960d433e1491b7e40afeb03739d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><em>（resource：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.panewslab.com/zh/articledetails/1644045861942159.html"><em>https://www.panewslab.com/zh/articledetails/1644045861942159.html</em></a><em>）</em></p><h3 id="h-orderbook" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Orderbook</h3><p>e.x.：<strong>Zeta，Psyoption，Opyn</strong></p><p>Option order books also require high tps blockchain to guarantee cheap and fast execution. Opyn used the Orderbook model on ETH main chain, but due to the lack of liquidity and high gas costs，trade volume is very low. Opyn changed its product to develop structured products on January.</p><p>On Solana, there are some Orderbook option products such as Zeta Markets and Psyoptions, but due to the lack of enough traders and professional market makers, the bid-ask spread is wide and some prices are priced without market.</p><h3 id="h-defi-option-vaults" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">DeFi Option Vaults</h3><p>e.x.：<strong>Robbin，Opyn，Thetanuts，StakeDAO，Katana</strong></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e7cca27736eabd2fbaee8670baf587b6fedd16d9d3c9664d30f9cfa49cb038cd.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><em>「</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/insights/defi-option-vaults-options-democratized"><em>DeFi Option Vaults: Options Democratized - Treehouse Insights</em></a><em>」</em></p><p>Option strategies are complex and not everyone has the time or knowledge to execute them in a timely manner, so we need DeFi Options Vaults (DOV).</p><p>DOV provide users with a way to easily deposit money into predefined options strategies to earn revenue.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2c95958c1f9ce9af35a050b88ce250df63e4a407908e15b396fad4a72238f1ff.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><em>「</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.treehouse.finance/insights/defi-option-vaults-options-democratized"><em>DeFi Option Vaults: Options Democratized - Treehouse Insights</em></a><em>」</em></p><p>It exploded in December 2021, when it grew much faster than the DeFi industry as a whole. In three months TVL managed to quadruple its size and is still up 1.5 times from October in a bear market</p><p>Now, the main strategy of DOV are covered call and put selling.</p><h3 id="h-covered-call-on-robbin" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Covered call on Robbin</h3><p>When user deposit one eth, the pool will generate a call option with a strike price of 2050, which will be sold in an auction. if eth price below 2050 when it expires in a week, the users in the pool will earn the option premiums.</p><p>In short, it is the possibility of giving up the underlying asset to rise sharply, which is a relatively simple strategy in the option.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7097922ff0e896989698876fcd6eafefd47b609d80047c6e9e6aafcf69cf7e24.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-auto-market-maker" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Auto-market Maker</h3><p>e.x.：<strong>Lyra，Primitive，Pods，Premia</strong></p><p>These products are worth more than DOV, but they are at a disadvantage in terms of market performance. According to defilama data the top two options on TVL right now are OPYN and Robbin. But I believe that as more and more professional investors come to blockchain, the value of these products will grow rapidly.</p><p><strong>This article focuses on Lyra which is an options automated market maker (AMM) that allows traders to buy and sell options on cryptocurrencies against a pool of liquidity.</strong></p><h2 id="h-team" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Team</h2><ul><li><p><strong>Michael Spain</strong></p></li></ul><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.crunchbase.com/person/michael-spain-ffa3"><em>Michael Spain - Co-Founder @ Lyra Finance - Crunchbase Person Profile</em></a></p><p>In 2017, Michael joined SNX as an engineer,one of the core members of SNX.</p><p>Michael graduated from the University of Sydney with a double degree in Computer Science and Finance</p><ul><li><p><strong>Nick Foster</strong></p></li></ul><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.crunchbase.com/person/nick-foster-043f"><em>Nick Foster - Co-Founder @ Lyra Finance - Crunchbase Person Profile</em></a></p><p>Bachelor of Mathematics in Finance, University of Sydney</p><p>From 2018 to February 2021 he was an equity trader at Susquehanna International Group, LLP (SIG)</p><h2 id="h-mechanism-introduced" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Mechanism Introduced</h2><h3 id="h-basic-concept-of-option" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Basic Concept of Option</h3><p><strong>Delta</strong></p><p>Delta is the price sensitivity of the option <strong>to changes in the underlying asset price</strong>. If a call option has a delta of 0.5 and the asset rises by $1, the value of the option will increase by $0.50. If you go long 1 delta, you go long one of the underlying assets.</p><p>Another way to use delta is to make a rough estimate of the probability that an option will be in the money option at maturity. A 0.5 delta call option means that the asset has approximately a 50% chance of trading above our strike price at expiration.</p><p><strong>Vega</strong></p><p>Vega is the price sensitivity of an option to changes in asset implied volatility (IV).</p><p><strong>Gamma</strong></p><p>The second derivative of Delta, which is the sensitivity of the option to changes in the price of the asset underlying delta.</p><p><strong>Theta</strong></p><p>The theta of an option measures how much value it will lose as a result of the passage of time. The theta is typically quoted as the <strong>dollar amount which an option will lose if time is fast-forwarded one day</strong>. For example, if the theta of an option is $5.00, the option will be worth $5.00 less in one day&apos;s time, assuming all else equal.</p><p><strong>Rho</strong></p><p>Rho is the <strong>rate at which the price of an option changes relative to the risk-free interest rate</strong>.</p><p>Delta and Vega are the two most important parameters in Lyra, because by managing delta and vega risk, you balance gamma and theta risk. Rho risks are generally much smaller than other risks because the risk-free rate tends to be relatively constant.</p><h3 id="h-pricing-black-scholes-model" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Pricing: Black Scholes Model</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/1d8230e89a7a9341eeb54611c64a0d0bac4b17baff1b96c426d2bf8db118de70.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The key parameter for pricing under BSM is <strong>volatility</strong></p><p>Lyro calculates the fair value (W) of the option by inputting IV.</p><h3 id="h-iv" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">IV</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cf2562b2072caf9541bf2e4014a6937ebaa4a4d3d9ddbc81fd034581c750f3fe.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>There are two parts of IV: baseline and skew ratio</p><p><strong>Baseline IV</strong></p><p>We can easily know the volatility of underlying asset.</p><p>Just like the AMM of DEX, the price will shift when a transaction occurs, and the IV will also shift. At this point, LYRA introduces another parameter, standard size.The <em>standardSize</em> parameter is defined as the number of contracts a trader would have to buy (sell) for the AMM to increase (decrease) the baseline IV level for an expiry by one percentage point. This is the mechanism that allows the AMM to converge to a market-clearing level for IV.</p><p><strong>Skew Ratio</strong></p><p>Lyra&apos;s AMM accounts for volatility smiles by including a strike-specific adjustment to the implied volatility parameter that is used to price options, called the <em>skewRatio</em>.</p><p>Skew Ratio includes Strike Volatility Ratios and skew impact parameter</p><p>The final implied volatility value that is fed into the Black Scholes pricing model is a combination of the <em>baseIV</em> of the relevant expiry, and the <em>skewRatio</em> of the relevant strike. That is:</p><p><em>tradeVol = baseIV × skewRatio</em></p><p><em>tradeVol = (IV +- 1%（vol/standard size）) ×（Strike Volatility Ratios +- skew impact parameter ×（vol/standard size））</em></p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3b312a081baf8e014acd5741dff270e0a4ed511d1110452f64840efa1cde1e0b.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>In my opinion, the first part of the equation is a shift , and the second part is a shift in the slope of the AMM curve</p><h3 id="h-hedge-lp-risk" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Hedge LP Risk</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/11f95ef3d2357a5295446d03a6e9c54a1f657c1f62be0938fc7e8f8727ddcf0d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><strong>Vega risk</strong></p><p>Vega risk is the risk of option price change caused by the change of underlying asset volatility.</p><p>The adjustment is to balance this risk by charging traders a portion of the price around Fair Value</p><p>This fee is determined by the VEGA of the pool as a whole, which simply means that the goal of the spread is to charge more for trades that increase the pool&apos;s Vega risk and less for trades that hedge its exposure.</p><p>Suppose Black Scholes pricing a call option at $100 with a net short of 500 vega in the pool. In this case, AMM might be willing to pay $95 for the call option ($5 fee) but sell it for $110 ($10 fee).</p><p><strong>Delta Risk (enabled in V2 version 6.28)</strong></p><p>When the trader buys 10 eth call options on lyra, the pool position will be short 10 eth call options. If the delta of this option is 0.5, then the overall delta of the pool will be -5, that is to say, when the spot eth increases by $1, the pool value will decrease by $5</p><p>In this case, the pool would have to go to the spot market and go long 0.5*10= 5ETH, changing its delta to 0 to hedge the risk.</p><p>Prior to May 27, delta risk was not hedged</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c93321ef48ad92e923c626fba018e2857fbedc911a0cdcc69bb0904942404b62.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>In the absence of delta hedges, liquidity providers in option AMMs almost always have exposure to call the underlying asset when the market is weak, which results in large losses for liquidity providers in a market slump.</p><p>In the 8th round, for example, liquidity providers lost $1.58 million, including $1.8 million due to a decline in the value of collateral held (delta risk). So if timely hedging is enabled, Lrya does well against Vega risk in extreme markets, removing 1.8 million delta unhedged losses and maintaining a profit of $220,000.</p><p>Officials have tested delta hedging for the past eight rounds</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ad4e1f1ce443d7756cdee016d68189f25db10610780c1e6b75143c14fcd758e8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>We find that if delta hedging is turned on, the majority of the rounds are profitable, and the frequency of hedging depends on how we choose between reducing risk (increasing the number of hedges) and reducing costs (reducing the number of hedges).</p><p><strong>Ways to hedge:</strong></p><p>The pool is periodically hedged by keeper</p><p>Now due to low market activities, officials as keepers internally, but anyone can technically call poolhedge-.hedgedelta ().</p><p>All delta hedge calculations are done on-chain.</p><h3 id="h-transaction-fee" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Transaction fee</h3><p>Lyra&apos;s fee function is made up of three distinct components:</p><ul><li><p>A flat fee based on the option price</p></li><li><p>A flat fee for exchanging costs</p></li><li><p>A dynamic fee based on the pool&apos;s vega risk</p></li><li><p>A dynamic fee based on the difference between the expiry&apos;s baseIV and its GWAV, as well as the traded strike&apos;s skew ratio and vega.</p></li></ul><h3 id="h-summary-of-trading-mechanism" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Summary of trading mechanism</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3f3d6d9700cf1fc0585bae8a1a81d31c4f65e8cf3d731290139299a12ca40d8b.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>The trader initiates a trade - calculates the change in IV - plugs into the BSM model to calculate the option price - charges the trade based on the pool&apos;s Vega risk - adds the fee and spot fee to get the final price - the trade completes the pool to recalculate the Vega and delta</p><h3 id="h-disadvantages-of-on-chain-options-market" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Disadvantages of On-chain Options Market</h3><ol><li><p>Liquidity segmentation problem: Options in traditional financial markets have different strike prices and strike dates under different underlying assets. Making a pool of each product will obviously split liquidity, so it is necessary to reduce the diversity of parameters (strike price or strike date) when the options market is niche.</p></li><li><p>Decentralized market makers must have hedges. For a pool of liquidity to underwrite options and be able to sell them both ways, you have to hedge. ** Because the pool acts as a counterparty to the net position ** of the entire market, most of the time, especially in a one-sided bull/bear situation, the market have a high degree of consensus on the expectations of the rise and fall, as can be seen from the capital rate of perpetual futures. So how to hedge the lp in the pool is one of the most difficult problems to solve in all option protocols. Because not only does it have to dynamically calculate the risk for its LP and price the options accordingly, it also has to find a way to hedge the risk through spot or futures.</p></li><li><p>High gas charges. Many options are cheap for investors and are particularly sensitive to gas fees. For the project side, it must continuously calculate the option price according to the change of the net position and the underlying asset price, and then hedge the risk exposure of lp.</p></li></ol><h3 id="h-lyra-solution" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Lyra solution</h3><ol><li><p>By setting the range of delta (0.1-0.9), the strike price available to investors is also limited to a range to further reduce the difficulty of pricing calculation</p></li><li><p>Choose to deploy in Optimism, which has lower cost and faster speed for project parties and traders</p></li><li><p>Backed by SNX, there are mature derivatives supporting, which is convenient for lyra to hedge delta risk</p></li></ol><h2 id="h-ecological-composability" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ecological composability</h2><p>Upstream is the SNX, which provides a hedge pool for a period of time to easily hedge delta risk</p><p>Downstream is structured products, such as Robbin&apos;s previous strategy, are bound to face the problem of insufficient liquidity in part of the time. LYRA adopts AMM mode to make such structured products directly connect to each other and ensure liquidity</p><p>Now Polynomial which is one of DOV on Optimism,is migrating vaults to lyra.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b5e5da4c5fd4c0d26f8e4a314ec6eac9dbe25d62143aa92f1bd5a9aada56cedf.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/3d2c6902a6d2f422ff981e6caef5ad3d10cba12125f50e24ead99845e741ba19.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-token-allocation" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Token Allocation</h2><p>A total of 1,000,000,000 LYRA have been minted, and will begin to become accessible starting on December 14th, 2021 at 00:00:00 UTC</p><ul><li><p><strong>50%</strong> (500,000,000 LYRA) to the community as follows:</p><ul><li><p><strong>15%</strong> (150,000,000 LYRA**) allocated to Traders**. Trading rewards provide a direct incentive to use Lyra and if implemented effectively, can minimise the fees paid by traders as well as the risks incurred by LPs.</p></li><li><p><strong>15%</strong> (150,000,000 LYRA) allocated to <strong>Liquidity Providers</strong>. Lyra needs liquidity to facilitate options trading. When options are purchased by traders, collateral must be locked to ensure that the option can be paid out if it expires in the money.</p></li><li><p><strong>10%</strong> (100,000,000 LYRA) allocated to <strong>Security Module stakers</strong>. The Security Module is designed to secure Lyra&apos;s traders and liquidity providers in the event that the protocol becomes insolvent and cannot fulfil its obligations. This will become especially important in V2 when positions are not fully collateralised.</p></li><li><p><strong>5%</strong> (50,000,000 LYRA) allocated to <strong>incentivise liquidity in the LYRA token</strong>, which will help create a healthy market.</p></li><li><p><strong>3%</strong> (30,000,000 LYRA) allocated to <strong>Community Incentives</strong>. These incentives are as yet unspecified, and are to be allocated by the Council via the LEAP framework.</p></li><li><p><strong>2%</strong> (20,000,000 LYRA) allocated to <strong>SNX stakers</strong>. Specifically, those who stake SNX on Optimism. This provides a strong incentive for stakers to move over and increase the sUSD supply, which Lyra relies on for trading/LP functionality.</p></li></ul></li><li><p><strong>20%</strong> (200,000,000 LYRA) allocated to the LyraDAO. The DAO aims to ensure the ongoing development of the Lyra Protocol and the general growth of the Lyra ecosystem.</p></li><li><p><strong>20%</strong> (200,000,000 LYRA) allocated to the core team. This is enough to ensure long-term incentive alignment whilst allowing the community to own the majority of the project. In almost all cases, tokens are locked for six months from the contributors start date and then vest linearly over two years. The vast majority of team tokens (&gt;19%) unlock between January 1 2022 and January 1 2024.</p></li><li><p><strong>10%</strong> (100,000,000 LYRA) were sold to private investors.</p></li><li><p>Private Investment Disclosures:</p><ul><li><p>Pre-seed: In February, 3.4% of the supply was sold at a $15M FDV, implying a token price of $0.015. These tokens were sold from the investor allocation.</p></li><li><p>Seed: In May, 6.6% of the supply was sold at a $50M FDV, implying a token price of $0.05. These tokens were sold from the investor allocation.</p></li><li><p>OTC: In September, 0.5% of the supply was sold at a $100M FDV, implying a token price of $0.10. These tokens were sold from the DAO allocation.</p></li><li><p>All private investor tokens are locked until January 1 2022 and then vest linearly over two years, with the final tokens unlocking on January 1 2024.</p></li></ul></li></ul><h2 id="h-financing" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Financing</h2><p>2021.7.26, Lyra announces the completion of a $3.3 million funding round. The round was co-led by Framework Ventures and ParaFi Capital.</p><p>DeFi Alliance, Divergence, Orthogonal, Robot Ventures, Apollo Capital, Magnet Capital, and Kain, founder of individual investor Synthetix Warwick and co-founders Jordan Momtazi and Jinglan Wang, Aave founder Stani Kulechov, Bankless founder Ryan Sean Adams and others participated in the investment.</p><p>The financing will be used to hire staff and expand the engineering team.</p><p>The investment institutions are all leading institutions in the field of defi, but the amount of financing is relatively low</p><p>Two founders of SNX, Jordan and Kain, are involved in the investment</p><p>Jinlan Wang, founder and CEO of Modernism, participates in investing</p><h2 id="h-summary" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Summary</h2><h3 id="h-advantage" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Advantage：</h3><ol><li><p>From the perspective of market positioning, the option trading volume in the traditional financial market has been greater than the spot trading volume, while the crypto option market is currently in the early stage, and the on-chain option is currently in the early exploration stage, with huge space for imagination</p></li><li><p>From the perspective of mechanism design, its option AMM mechanism is a great attempt, which provides the possibility of option trading for long-tail assets in the future.</p></li></ol><h3 id="h-disadvantage" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Disadvantage：</h3><ol><li><p>Can only do delta 0.1-0.9 option, limited choice</p></li><li><p>At present, due to the lack of liquidity, we can only do eth options, and it has just been transferred to V2. The current liquidity is only 10 + million, and the bid-ask spread reaches $4-8</p></li><li><p>The newly added delta hedge has not been tested by the market.</p></li><li><p>At present, the project itself plays the role of keeper (balance delta risk), and the overall market participation is low</p></li></ol><hr><blockquote><p><strong><em>Disclaimer:</em></strong>* The content of this article is for information and communication purposes only and does not constitute any investment advice. If there are obvious errors of understanding or data, welcome feedback. The content of this article was originally created by W3.Hitchhiker, please indicate the source if you need to reproduce.*</p><p><strong><em>Business cooperation:</em></strong>* <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:rex@w3hitchhiker.com">rex@w3hitchhiker.com</a>*</p><p><strong><em>Official website:</em></strong>* <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/">https://w3hitchhiker.com/</a>*</p><p><strong><em>W3.Hitchhiker official Twitter:</em></strong>* <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3">https://twitter.com/HitchhikerW3</a>*</p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/9e36bf5384a998f065310edf371a124406c4cfdd3e1f65bbf3aef1c1ea1a6cb2.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[联储最大噩梦来临：另一些离转向越来越近的因素]]></title>
            <link>https://paragraph.com/@w3hitchhiker/yw15j8TJXpj3SWOpI1hI</link>
            <guid>yw15j8TJXpj3SWOpI1hI</guid>
            <pubDate>Fri, 14 Oct 2022 05:43:12 GMT</pubDate>
            <description><![CDATA[作者：David｜W3.Hitchhiker按：进入九月以来，地缘政治、金融市场的风险次第展开，全球市场在美联储超级鹰派政策的带领下走向越来越未知的领域。通过分析三个局部市场的最新动向，我们可能离联储的转向越来越近。1、美国流动性紧张局面来到 2020 年 3 月水平10 月初，美国国债市场的流动性问题来到新的阶段：彭博测量美债流动性的指标显示，市场流动性紧张程度已经来到 2020 年 3 月份的水平。 2020 年 3 月，当美国国债市场因恐慌性抛售而崩溃时，美联储作为最后的买家介入购债。而目前的流动性水平可能都指向美联储随时准备介入购债的可能性 —— 即使目前联储在进行所谓的量化紧缩。 纽约联邦储备银行的副行长杜菲说：“美国国债市场是世界上最重要的证券市场，是我们国家经济安全的命脉。你不能只说‘我们希望它会变得更好’，你必须采取行动让它变得更好。” 美国财长 10 月 11 号发文指其没有看到金融市场任何需要担心的情况。一天后改口，称“国债市场不足的流动性让人担忧。”2、联储收益开始变负在多次加息之后，联储的利息支出已经超过其通过 QE 持有的债券组合产生的利息收入。过去十年...]]></description>
            <content:encoded><![CDATA[<p><strong><em>作者：David｜W3.Hitchhiker</em></strong></p><hr><p><em>按：进入九月以来，地缘政治、金融市场的风险次第展开，全球市场在美联储超级鹰派政策的带领下走向越来越未知的领域。通过分析三个局部市场的最新动向，我们可能离联储的转向越来越近。</em></p><hr><h2 id="h-1-2020-3" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1、美国流动性紧张局面来到 2020 年 3 月水平</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c2295a0b1e333a3bb33996b4dd8a192bc118690701c52d2d6901751132b115f7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>10 月初，美国国债市场的流动性问题来到新的阶段：彭博测量美债流动性的指标显示，市场流动性紧张程度已经来到 2020 年 3 月份的水平。</p><p>2020 年 3 月，当美国国债市场因恐慌性抛售而崩溃时，美联储作为最后的买家介入购债。而目前的流动性水平可能都指向美联储随时准备介入购债的可能性 —— 即使目前联储在进行所谓的量化紧缩。</p><p>纽约联邦储备银行的副行长杜菲说：“美国国债市场是世界上最重要的证券市场，是我们国家经济安全的命脉。你不能只说‘我们希望它会变得更好’，你必须采取行动让它变得更好。”</p><p>美国财长 10 月 11 号发文指其没有看到金融市场任何需要担心的情况。一天后改口，称“国债市场不足的流动性让人担忧。”</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/20a4abee83fa81107c51ccc28c9af6cd36482456ecf2949600ed1e1e772f5692.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2、联储收益开始变负</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4cd69932464198f99fcefac33e6ccc4ea921ddc84c51c73bacaac4dfee92135e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>在多次加息之后，联储的利息支出已经超过其通过 QE 持有的债券组合产生的利息收入。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9b40221a8b8d8a3553a0caa07569076899cf951be9c9e10cf5882af70cedaa39.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>过去十年联储的收入基本都在 1000 亿美元左右，都直接转给了美国财政部。有测算称今年因为加息导致的亏空可能高达 3000 亿美元（去年美国的军费开支 8000 亿美元左右）。同时，由于 QT，债券价格暴跌，导致美联储在出售债券时可能不得不接受比购买价格低得多的价格，从而成为减记开支（unrealized loss,non-cash item).</p><p>联储不会破产，面对巨额的窟窿，要么其完全可以无视；要么其可以重启印钞。</p><p>总之，更高的利率只会增加美联储和财政部内部各处的现金消耗。他们会很快意识到完全被困住了。如果不能有效地使自己破产，他们就无法驯服通货膨胀。当然中央银行不会破产 —— 相反，他们可能在加息和通货膨胀的风暴中转向。</p><h2 id="h-3-20" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3、“雷曼时刻 2.0”越来越近</h2><p>最近市场不太平，瑞士信贷、英国养老金相继发生危险。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cc4955539a47e26c0314bb62745cff939a41d5da94dae352cc859cb9508f907a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>08 年金融危机，这种机构间风险的传导类似于下图这样：08 年金融危机，这种机构间风险的传导类似于下图这样：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6b8aa6f756fad725a14026bac0f0a14ea31d04b4687cada19496aaaeddbafc8f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>那么在 08 年金融危机之后，新的银行危机有没有可能重新发生?</p><p>国庆前，多家新闻媒体质疑瑞士信贷是否预示着另一个“雷曼时刻”。“雷曼时刻”指的是拥有 158 年历史的前华尔街投资银行雷曼兄弟，在华尔街不断扩大的金融危机期间于 2008 年 9 月 15 日破产。 雷曼兄弟是美联储允许破产的唯一一家主要华尔街银行。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/39bd4614d0ee11be565093ea5197706d719555299998c856b368762cffd8aa7e.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>根据金融危机调查委员会的文件，在雷曼兄弟破产时，它有超过 900,000 份未平仓的衍生品合约，并使用华尔街最大的银行作为其中许多交易的对手方。数据显示，雷曼与摩根大通的衍生品合约超过 53,000份；摩根士丹利超过 40,000 ；花旗超过 24,000 ；美国银行超过 23,000 ；高盛的近 19,000 。</p><p>根据该机构出具的对危机分析结论性的报告，08 年的金融危机主要是因为如下原因：</p><p>“场外交易衍生品在三个重要方面促成了这场危机。首先，一种衍生品 —— 信用违约掉期（CDS）—— 推动了抵押贷款证券化的发展。CDS 被出售给投资者，以防止由风险贷款支持的抵押相关证券的违约或价值下降……</p><p>“其次，CDS 对于合成 CDO 的创建至关重要。这些合成 CDO 只是押注于与抵押贷款相关的真实证券的表现。他们通过允许对同一证券进行多次押注，扩大了房地产泡沫破裂造成的损失，并帮助将它们分散到整个金融系统……</p><p>“最后，当房地产泡沫破灭、危机接踵而至时，衍生品就处于风暴的中心。AIG 没有被要求留出资本储备作为其出售保护的缓冲，但在无法履行其义务时获得了救助。**由于担心 AIG 的倒闭将引发整个全球金融体系的连锁损失，政府最终承诺投入超过 1800 亿美元。**此外，具有系统重要性的金融机构之间存在数以百万计的各种类型的衍生品合约 —— 在这个不受监管的市场中是看不见和不为人知的 —— 增加了不确定性并加剧了恐慌，有助于促使政府向这些机构提供援助。”</p><p>危机之后的 15 年，我们有没有出现类似的金融系统风险？</p><p>在 9 月 29 日联储下属机构 OFR（OFFICE OF FINANCIAL RESEARCH）分析银行在场外交易 (OTC) 衍生品市场中选择谁作为交易对手方的<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.financialresearch.gov/the-ofr-blog/2022/09/29/when-choosing-counterparties-banks-tend-to-pick-riskier-ones/">工作论文</a>中，作者发现银行更有可能选择已经与其他银行密切联系并暴露于其他银行的风险较高的非银行交易对手方，这导致连接到更密集的网络。此外，银行不会对冲这些风险，而是通过出售而不是购买与这些交易对手的 CDS 来增加风险。最后，作者发现，尽管 2008 年金融危机后监管力度加大，但常见的交易对手风险敞口仍与系统性风险措施相关。</p><p>简单来说，就是一旦一家系统性重要的银行出现问题，金融体系还是会像 08 年一样出现系统性的连锁反应。</p><p>那么，美联储是否需要像日本央行、英国央行一样，转向呢？</p><p>我们拭目以待。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/cd93a056c2258f7019d21b2e981fa23a5a044f4442827c9639b227531886f7b5.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:rex@w3hitchhiker.com"><em>rex@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/1e5cba91a0100db90ecca90727ff4d8dd3297345260b6ec854ded07d2f3ccfb6.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Real yield 背景下，DeFi 商业模式可持续性初探]]></title>
            <link>https://paragraph.com/@w3hitchhiker/real-yield-defi</link>
            <guid>108G1MK9ZVpArDctpHAB</guid>
            <pubDate>Thu, 13 Oct 2022 09:05:39 GMT</pubDate>
            <description><![CDATA[作者：David｜W3.Hitchhiker2020 年的 DeFi summer, 众多项目通过提供流动性挖矿及代币奖励带来的短期 TVL 的暴涨，但随着其他项目通过代币的无底线增发提供更多的 APY，资金又疯狂涌向其他项目，造成短期 TVL 的暴跌。这样价格战带来的大涨大跌，成为 DeFi 短期吸引市场关注的重大热点，但实际造成的结果却是资金过于投机，无法持续沉淀在项目上进行长期的生态建设与提升。上一轮 DeFi 的热潮在今年年中 Terra 及 Celsuis 等项目的崩盘声中戛然而止。随着熊市到来，币圈行情的泥沙俱下，市场开始质疑 DeFi 的实际作用，很多人甚至认为可能除了旁氏资金盘、套娃以及暴富传说等短期炒作之外，DeFi 并无太多实际价值。 熊市的到来使得投机资金退潮，市场也将注意力转向了能够真正长期创造盈利的 DeFi 项目。由此诞生了此轮熊市DEFI的核心叙事逻辑：Real yield。 Real yield 不再基于协议原生代币的过度增发，而是鼓励分享协议利润来激励代币持有及流动性提供。资金利用效率之前的 DeFi 增长策略过于侧重 TVL 的增长，在通过无限...]]></description>
            <content:encoded><![CDATA[<p><strong><em>作者：David｜W3.Hitchhiker</em></strong></p><hr><p>2020 年的 DeFi summer, 众多项目通过提供流动性挖矿及代币奖励带来的短期 TVL 的暴涨，但随着其他项目通过代币的无底线增发提供更多的 APY，资金又疯狂涌向其他项目，造成短期 TVL 的暴跌。这样价格战带来的大涨大跌，成为 DeFi 短期吸引市场关注的重大热点，但实际造成的结果却是资金过于投机，无法持续沉淀在项目上进行长期的生态建设与提升。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0d9149b8d0302c61ccde57774d8c9492da60aba590cf3662c649c1e02b909f60.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>上一轮 DeFi 的热潮在今年年中 Terra 及 Celsuis 等项目的崩盘声中戛然而止。随着熊市到来，币圈行情的泥沙俱下，市场开始质疑 DeFi 的实际作用，很多人甚至认为可能除了旁氏资金盘、套娃以及暴富传说等短期炒作之外，DeFi 并无太多实际价值。</p><p>熊市的到来使得投机资金退潮，市场也将注意力转向了能够真正长期创造盈利的 DeFi 项目。由此诞生了此轮熊市DEFI的核心叙事逻辑：Real yield。 Real yield 不再基于协议原生代币的过度增发，而是鼓励分享协议利润来激励代币持有及流动性提供。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">资金利用效率</h2><p>之前的 DeFi 增长策略过于侧重 TVL 的增长，在通过无限增发代币吸引 TVL 后，再利用 TVL 来产生相关收益（以钱生钱，金融业的核心商业逻辑）。虽然 TVL 的获取是行业发展的前提，但 TVL 的规模及增速并不是评价协议商业模式的最好指标。</p><p>TVL 并不是协议本身拥有的资金，而更是第三方资金，用传统金融机构资产负债表的角度来看，则更像是一笔负债。TVL 只有结合更好的代币经济学,专注于如何利用 TVL 增加盈利收入以及协议拥有的资产（类似净资产）之后，才能作为评估协议商业模式优劣的考量指标。</p><p>在本文中，我们主要引入总收入/TVL（fee/TVL）指标来评估协议的单位资金利用效率。这个指标类似于传统金融框架下的 ROA，是评估商业模式效率的核心指标。 TVL 与总收入的结合，时刻提醒不要单方面地专注于 TVL，毕竟，资产过大但不太挣钱的话，意味着商业模式的某些核心方面缺乏效率。</p><p>我们关注到上一轮 DeFi 项目中由于过于专注 TVL 的历史遗留原因，在资金效率方面往往不如新的项目。同时，龙头项目如UNISWAP 在资金效率的表现上大大高于同业，主要是由于其 V3 上的 USDC/ETH 池，用极小的 TVL 创造了巨大的交易量。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/c505aebafd675c1de8e473760cb31b2d531e0962598db847254b53af0920117f.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/7523603696b4e1cacf00f77c3aaf72915bc55e0134cebdd10e492769c32cfea8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">协议留存比例</h2><p>同时，在上一轮 DeFi 中，一般的 DeFi 协议一般通过引入流动性挖矿的方式来获取 TVL，导致大部分收入都无法留存在协议上。其中，以 UNISWAP 与 MAKERDAO 为两个极端：前者基本将所有的交易费收入都分给了参与流动性挖矿的 LP，而后者没有采用流动性挖矿，所有的利息收入收留在了协议上。</p><p>Maker 虽为借贷协议，但其实质是稳定币发行，考虑到其实际上并不需要特别增加流动性挖矿，Maker 实际上可能将所有收入都留存在了协议中，引出了协议真实的净资产的概念，为未来协议增加一层风控安全垫，类似于 TOKEMAK 提出的协议控制资产（PCA）的概念。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/2040d3941ed77fd8ea248896547decf9b0f3a802b9cce4e6c74c51e6f5c33e78.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>大部分项目，为了吸引流动性，都将一部分收入以奖励的形式发给了 LP，很多主流项目甚至基本将收入的 90% 以上都发给了 LP。考虑到很多项目在支付给 LP 之后还需要自留一部分利润以应付其他费用如团队开支、营销费用等，但实际上大部分协议似乎都没有为这部分预留足够的预算。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/311dbcfa8ed642118e39b5a63408a0cd0118fea9e8528f85100f41f3553f2f1c.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>做为最近的明星项目，GMX 在白皮书中明确 LP（GLP 代币持有者）除了获取 GMX 代币奖励之外，还获得以 ETH 计价的 70% 的平台费用收益（实际 LP 费用分成只有 49%）。这种安排为后期协议建设费用，协议自身的 PCA 积累等都奠定了良好的基础。</p><p>另外，GMX 在自身代币释放上也十分保守。一个好的项目的标志是收益是否以 USDC、USDT 或任何稳定币的形式分配，或者以区块链的原生代币（如 ETH 或 AVAX）的形式分配。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">代币赋能</h2><p>代币赋能是一个老生常谈的话题。牛市背景下，代币赋能的要求被束之高阁，市场更容易被新鲜的故事及时髦的名词打动，至于协议是否捕捉了价值，代币持有人是否可以分享增长的故事，往往不是炒作者关心的话题。忽视代币赋能，可能让我们面临 TCP/IP 协议类似的问题 —— 是的，TCP/IP 协议是一个不可或缺的基础设施，但并未让利益相关者获得任何价值；类似目前的众多 DeFi 协议，也是未来去中心化金融体系的“原语”，忽视代币赋能也会让其面临 TCP/IP 类似的命运？</p><p>在支付 LP 激励，收入终于沉淀到协议层面后，协议还需要面临流动性代币增发激励、团队及营销等多种费用开支，实际留存的最终利润更少。出于分析上的便利，我们此处只假设代币增发为最大的成本项。每年的增发规模可以从一定程度上反映协议本身对待代币赋能的态度。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/da674293881945b29545cf6efe4dc8337bdfe9fecad766184550ab9ca0e68a36.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">协议利润估算</h2><p>此处我们引入协议利润的概念，即协议留存收入— 代币增发费用。成本项为在当年新增代币量乘以当前币价，这个计算不一定反映实际情况，但可以在一定程度上向我们展示哪些 DeFi 协议在资金效率、协议留存以及代币赋能等方面，展现出了真实的盈利前景。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/4a9b53096a6ed736d5e0193608d9a0a775f9cf95bb87f8724bf7b9e84af14513.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-defi" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">DeFi 不同赛道的商业持续性</h2><h3 id="h-dex" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">Dex：</h3><p>主要是通过提供交易服务获取交易费用收入的协议。交易费用收入分配给了 LP 以及代币持有者，LP 收入可以视作主要的成本。</p><p>由于费率的原因，期货（永续）交易的收入一般来说远远优于现货交易的收入。这主要体现在资金利用效率上，因为衍生品交易都是按照名义交易额（杠杆后）来收取的。单位 TVL 创造的收入，UNISWAP（最有效率的现货交易所）只有 GMX 的三分之一。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/938e00e0be8ce665ff70f6f300c6e1d0619d4a072c85f7467fc9454d6926a292.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>其次，现货交易所费用倾向于长期下降，例如为了扩大交易受众，UNISWAP 就部署到更便宜的 POLYGON，同时为了跟 CURVE 竞争，引入了针对稳定币对 0.01% 费用 TIER，这些都导致其整体的资本利用效率降低。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9a9d1f46d8434774113bc04f47ee552429d833a263370634d6c7c4900d4afa35.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">借贷：</h3><p>提供借贷服务的协议，主要是通过利息费用抽成，或者抵押不足贷款的发起费来赚取收入。</p><p>成本项主要是想存款方支付的利息费用以及 GRANTS。</p><p>贷款平台从其贷款业务中赚取利息收入。为了最大限度地提高贷款收入和盈利能力，除了简单地提高费用之外，它还可以调整三个关键杠杆：资本效率、新客户和提高利润率。例如，Aave 推出了核心产品增强版（Aave V3，提高资本利用率）和一些补充产品（GHO 稳定币和 Lens Protocol），所有这些都旨在调整这三个关键战略杠杆中的一个或多个。</p><p>而今年虽然市场进入熊市，Aave 的资金利用效率却在逆势上升，说明了其新策略在某种程度上说明了其新产品策略的成功。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f616bdff2821972862c27ad34e403cfd849f750d9d74c5b9c6dc04d585cb79b8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>抵押不足的贷款产品，甚至不需要抵押物的贷款产品如闪电贷等，具有更强的定价能力，因为它们专注于合规和机构客户（<em>对冲基金、风险投资和做市商</em>），从而受益于竞争对手更高的进入壁垒。</p><p>同时，借贷赛道仍然面临价格战的压力，例如近期有宣称提供免息贷款的平台获得融资，说明了借贷模式整体在未来面临的价格压力。</p><h3 id="h-asset-management" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">ASSET MANAGEMENT 及流动质押平台：</h3><p>资产管理公司从基于 AUM 的管理费、业绩费和/或结构化产品的铸造和赎回费中获得收入。长期来看，这模式的盈利质量更强，更不容易受到价格战的影响。</p><h3 id="h-defi" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">问题：哪些 DeFi 模式更有前景？</h3><p>虽然“real yield”可能更为靠谱的评估方式，这种流动性采购模式并不完美。一方面，协议需要盈利才能为利益相关者提供价值，因此对于用户很少的新项目来说，并没有多大作用。新项目大多数时候仍需要诉诸流动性挖矿来吸引 TVL 以及交易员。此外，如果协议需要其收入分给代币持有者，这意味着他们用于营销、社区建设及研发的资金更少。从长远来看，单纯看协议利润来评估项目发展前景可能起到反效果。</p><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:rex@w3hitchhiker.com"><em>rex@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/3ea936e16c5aeda4f292e5c074f8fe803be2730e27e93ab75f9f30cda9bb6890.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[zkSync L3“Pathfinder”将于 2023 年第一季度发布测试网]]></title>
            <link>https://paragraph.com/@w3hitchhiker/zksync-l3-pathfinder-2023</link>
            <guid>T90NXwwHhffAexDL36cr</guid>
            <pubDate>Wed, 12 Oct 2022 06:13:37 GMT</pubDate>
            <description><![CDATA[原文：zkSync L3 ‘Pathfinder’ to Hit Testnet in Q1 2023 —— zkSync 译者：Xiang｜W3.Hitchhiker 修订：Evelyn｜W3.Hitchhiker 这是一条在去信任化链接的 HyperChains 生态系统中解锁无限可扩展性和定制化的途径距离第一个可生产的、EVM 兼容的 L2 ZK Rollup 发布到主网还有不到 18 天的时间，我们很高兴地宣布即将到来的另一个激动人心的里程碑：zkSync 的 EVM 兼容的 L3 “Pathfinder”原型将在 2023 年第一季度公开部署测试网。L2 搭建舞台在搭建舞台方面，没有人能比 Vitalik Buterin 做的更好了，他说：“我认为以太坊可以做的事情没有一个愿景，我认为有很多不同的愿景。一旦以太坊成功解决其扩容问题，它将处于一个更好的位置，来帮助成为允许所有这些愿景发生的基础。” ——Vitalik Buterin，以太坊联合创始人 “从中长期来看，ZK Rollup 将在所有用例中胜出。” ——Vitalik Buterin，以太坊联合创始人本月晚些时...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://blog.matter-labs.io/zksync-l3-pathfinder-to-hit-testnet-in-q1-2023-367a425592db"><strong><em>zkSync L3 ‘Pathfinder’ to Hit Testnet in Q1 2023</em></strong></a><strong><em> —— zkSync</em></strong></p><p><em>译者：Xiang｜W3.Hitchhiker</em></p><p><em>修订：Evelyn｜W3.Hitchhiker</em></p><p><strong><em>这是一条在去信任化链接的 HyperChains 生态系统中解锁无限可扩展性和定制化的途径</em></strong></p><hr><p>距离第一个可生产的、EVM 兼容的 L2 ZK Rollup 发布到主网还有不到 <strong>18 天</strong>的时间，我们很高兴地宣布即将到来的另一个激动人心的里程碑：zkSync 的 EVM 兼容的 L3 “Pathfinder”原型将在 2023 年第一季度公开部署测试网。</p><h2 id="h-l2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">L2 搭建舞台</h2><p>在搭建舞台方面，没有人能比 Vitalik Buterin 做的更好了，他说：</p><blockquote><p><em>“我认为以太坊可以做的事情没有一个愿景，我认为有很多不同的愿景。一旦以太坊成功解决其扩容问题，它将处于一个更好的位置，来帮助成为允许所有这些愿景发生的基础。” ——Vitalik Buterin，以太坊联合创始人</em></p><p><em>“从中长期来看，ZK Rollup 将在所有用例中胜出。” ——Vitalik Buterin，以太坊联合创始人</em></p></blockquote><p>本月晚些时候将推出 zkSync 2.0 —— 一个通用的、与 EVM 兼容的、以太坊区块链的 ZK Rollup ——将是以太坊期待已久的关键改进。zkSync 的 L2 解决方案将具有扩展以太坊的五个神奇要素：</p><ol><li><p><strong>General-Purpose ZK rollup</strong> —— 支持通用应用程序</p></li><li><p><strong>EVM 兼容</strong> —— 实现轻松移植</p></li><li><p><strong>Solidity Support</strong> —— 支持智能合约开发人员最常用的语言</p></li><li><p><strong>开源</strong> —— 保护查看、更改或分叉代码的自由</p></li><li><p><strong>Ethereum Ethos Compatible</strong> —— 用去中心化模型代表生态系统的价值</p></li></ol><p>我们的 L2 解决方案将提供必要的基础，生态系统可以在此基础上扩展以太坊，而不会降低其安全性或去中心化。除此之外，我们的愿景是在 L3 及更高层实现无限的可扩展性，从而实现大规模采用。</p><h2 id="h-zksync-l3" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">zkSync 的 L3 是下一个前沿</h2><p>我们对第 L3 的愿景是，它将成为一个由 zkEVM 提供支持的可定制和无信任链接的区块链生态系统，我们将其称为“HyperChains”。L3 将实现无限扩展和无限定制，从而产生 10 倍的空间。这些空间跨越五个向量：</p><ol><li><p><strong>安全性</strong> —— 我们知道许多黑客攻击是由于非本地网桥的固有弱点而发生的。在 zkSync 的 L3 中，HyperChains 之间的所有交互都通过本地桥接发生，从而获得 10 倍以上的安全性。</p></li><li><p><strong>性能</strong> —— 我们预计L2的性能会提高 10-100 倍，但在 L3 的性能是无限的。</p></li><li><p><strong>成本</strong> —— 鉴于围绕数据可用性解决方案的选择，L3 的数据成本呈指数级降低。</p></li><li><p><strong>易用性</strong> —— 我们希望看到对生态系统中每种类型用例的 SDK、CLI 甚至低代码/无代码解决方案的许多改进，从而使应用程序的创建变得容易 10 倍。</p></li><li><p><strong>可组合性</strong> —— 使用我们的 LLVM 编译器，我们不仅支持 Solidity 编程语言，还支持任何现代语言，这为专注于 Rust、C++、Swift 等的开发人员创造了 10 倍的可访问性。</p></li></ol><p>借助 zkSync 的 L3 解决方案，开发人员将能够从 3 个数据可用性选项中进行选择，所有这些选项都为其项目使用相同的验证基础设施。开发人员可以在价格、性能和安全性之间做出自己的权衡。</p><ol><li><p><strong>ZK Rollup</strong> —— 如果你想拥有以太坊的完整安全性（适合 DeFi），请选择此选项。</p></li><li><p><strong>zkPorter</strong> —— 如果你希望将数据混合在链上和链下来优化便宜、快速和安全（适合游戏），请选择此选项。</p></li><li><p><strong>Validium</strong> —— 如果你想要终极性能，但安全性比以太坊（无限用例）略低，请选择此选项。</p></li></ol><p>除了 3 个数据可用性选项外，开发人员还可以针对以下内容进一步自定义分形 HyperChain：</p><ol><li><p><strong>隐私将完全可自定义</strong> —— 我们将使生态系统合作伙伴能够将他们的数据设为私有（通过将数据存储在链下）。</p></li><li><p><strong>代币经济学，调整激励机制</strong> —— 我们将使生态系统合作伙伴拥有自己的代币，从而保护排序器、证明者和 DA 提供者。</p></li><li><p><strong>HyperBridges</strong> —— 我们的 L3 解决方案将使用<strong>原生桥</strong>（或“HyperBridges”）替换非原生桥。这将对安全性产生 10 倍的影响，并有可能增加大众对加密货币的信任。</p></li></ol><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/5f6e2c9860fe40d97a8da2f4d410319c16ee70e3e24ddc2eddbf6c89d5c5cb04.png" alt="通过解决以太坊的扩容问题，zkSync 为我们的生态系统开启了无限的未来。" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">通过解决以太坊的扩容问题，zkSync 为我们的生态系统开启了无限的未来。</figcaption></figure><h2 id="h-pathfinder" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">什么是 Pathfinder？</h2><p>在 2023 年第一季度，我们将发布 L3 Pathfinder ，这是 zkSync 将在测试网上推出的第一个 L3 原型。以下是关于Pathfinder 启动的详细信息：</p><ol><li><p>Pathfinder 将于 2023 年第一季度发布。</p></li><li><p>Pathfinder 将是一个原型，将 ZK Rollup 作为 L3 中的 Pathfinder 来演示。</p></li><li><p>该解决方案将部署在测试网上。</p></li><li><p>测试网将是公开的。</p></li><li><p>它将作为 L3 进行公共实验、研究和开发的基础。</p></li></ol><p>Pathfinder 将是一种以实质性方式更好地进行这项研究的工具，对此我们毫不怀疑。在接下来的几个月里，这个工具将帮助我们能够积极地进行试验，以便我们能够继续构建这个生态系统的未来。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">展望未来</h2><p>我们为我们的工程团队感到非常自豪，他们一直在为将 zkSync 的 L2 解决方案引入主网而不懈努力，同时已经通过为 L3 及更高层的以太坊生态系统的下一个前沿设置构建块来展望未来。</p><p>随着我们接近 2023 年第一季度，我们将分享更多关于我们的进展以及与 L3 解决方案的发展方向有关的技术细节。</p><p>对于 zkSync 团队和整个以太坊生态系统来说，这是一个激动人心的时刻。如果您是研究人员或开发人员，如果您有兴趣与我们合作或加入团队，请与我们联系。</p>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/8c74d592867cb1a8afd4b7b30a030625e07ac04f20fe81995474191c2e9e7b98.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[数据可用性采样：从基础知识到未决问题]]></title>
            <link>https://paragraph.com/@w3hitchhiker/IFZw8bnIJZTeG6ZeXNVT</link>
            <guid>IFZw8bnIJZTeG6ZeXNVT</guid>
            <pubDate>Tue, 11 Oct 2022 08:16:58 GMT</pubDate>
            <description><![CDATA[原文：Data Availability Sampling: From Basics to Open Problems —— joachimneu 译者：Evelyn｜W3.Hitchhiker介绍任何 layer 1 区块链的核心责任都是保证数据可用性。这一保证对于客户能够解释 layer 1 区块链本身是至关重要的，同时也是更高层应用（如rollups）的基础。为此，一种经常被讨论的技术是用于数据可用性验证的随机采样，出现于由 Mustafa Al-Bassam、Alberto Sonnino 和 Vitalik Buterin 在 2018 年的一篇论文中，并被推广。该技术是 Celestia 区块链的核心，并被提议与“Danksharding”一起纳入以太坊权益证明（PoS）中。 这篇博文的目的是解释数据可用性采样（DAS）的基本原理，它所依赖的模型，以及在实践中实施该技术时的挑战和未解决问题。我们希望这篇文章能给研究人员 "吃下一剂药丸"，吸引他们关注这个问题，并激发新的想法来解决一些悬而未决的挑战（参考最近以太坊基金会的提案请求）。问题有人（如 L1 区块提议者或 L...]]></description>
            <content:encoded><![CDATA[<p><em>原文：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.paradigm.xyz/2022/08/das"><strong><em>Data Availability Sampling: From Basics to Open Problems</em></strong></a><strong><em> —— joachimneu</em></strong></p><p><em>译者：Evelyn｜W3.Hitchhiker</em></p><hr><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">介绍</h3><p>任何 layer 1 区块链的核心责任都是保证<em>数据可用性</em>。这一保证对于客户能够解释 layer 1 区块链本身是至关重要的，同时也是更高层应用（如rollups）的基础。为此，一种经常被讨论的技术是用于数据可用性验证的随机采样，出现于<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/1809.09044">由 Mustafa Al-Bassam、Alberto Sonnino 和 Vitalik Buterin 在 2018 年的一篇论文中</a>，并被推广。该技术是 Celestia 区块链的核心，并被提议与“Danksharding”一起纳入以太坊权益证明（PoS）中。</p><p>这篇博文的目的是解释数据可用性采样（DAS）的基本原理，它所依赖的模型，以及在实践中实施该技术时的挑战和未解决问题。我们希望这篇文章能给研究人员 &quot;吃下一剂药丸&quot;，吸引他们关注这个问题，并激发新的想法来解决一些悬而未决的挑战（参考<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/ethereum/requests-for-proposals/blob/master/open-rfps/das.md">最近以太坊基金会的提案请求</a>）。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">问题</h2><p>有人（如 L1 区块提议者或 L2 排序者）产生了一个数据块。他们声称已经向 &quot;公众 &quot;证明了该数据是可用的。你的目标是检查可用性的说法，也就是说，如果你需要，你是否真的能够获得这些数据？</p><p>数据的可用性是至关重要的。基于 Optimistic 的欺诈证明系统，如 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.paradigm.xyz/2021/01/how-does-optimisms-rollup-really-work">Optimism</a>，需要数据可用性来进行验证，甚至基于有效性证明的系统，如 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://starkware.co/starknet/">StarkNet</a> 或 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://aztec.network/">Aztec</a>，也需要数据的可用性来确保其的活跃性（例如，证明资产所有权以用于 rollup 的逃生舱口或强制交易包含机制）。</p><p>对于到目前为止的问题表述，有一个简单的 &quot;幼稚&quot;测试程序，像比特币这样的早期系统也隐含地采用：只需要下载整个数据块便能进行验证。如果你成功了，你就知道它是可用的；如果你没有成功，你就认为它不可用。然而现在，我们想在不用自己下载过多数据的情况下测试数据的可用性，例如，因为数据大到我们无法处理，或者因为 &quot;仅仅 &quot;为了验证数据的可用性而在我们并不真正感兴趣的数据上花费大量带宽似乎十分浪费。在这一点上，我们需要一个模型来阐明只下载或保留 &quot;部分数据 &quot;的 &quot;含义&quot;。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">模型</h2><p>计算机科学中一个常见的方法是，首先在一个具有相当丰富的设施的模型中描述一项新技术；然后解释该模型如何实现。我们对 DAS 采取了类似的方法，但正如我们将看到的，当我们试图将模型实例化时，就会突然出现有趣的开放式研发问题。</p><p>在我们的模型中，在一个黑暗的房间里有一个公告板（见下面的漫画）。首先，区块生产者进入房间，并获得在公告板上写下一些信息的机会。当区块生产者退出时，它可以给你（验证者）一小段的信息（其大小与原始数据不呈线性比例）。你带着手电筒进入房间，手电筒的光束很窄，而且电池电量不足，所以你只能读取到公告板上很少的几个明显位置的文字。而你的目标是让自己相信，区块链生产者确实在公告板上留下了充足的信息，所以如果你打开灯，阅读完整的公告板，你将能够恢复文件。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/059f0b14d1feb533be877034571481037c5306486dfd5b4fbba1ac094274089b.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>起初，这似乎很棘手：我们可以要求区块生产者在公告板上写下完整的文件。现在考虑两种可能性：要么生产者行为诚实，写下完整的文件，要么生产者行为不端，遗漏了一些小块的信息，使整个文件无法使用。通过只在几个地方检查公告板，你无法可靠地区分这两种情况 —— 因此，你无法准确地检查数据可用性。我们需要一种新的方法!</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">（理论）解决方案</h2><p>这就是 Reed-Solomon 码发挥作用的地方。让我们简单地回顾一下这些内容。在高层次上，纠删码的工作原理是这样的：一个由 k 个信息块组成的向量被编码成一个由 n 个编码块组成的（更长的！）向量。编码的比率 R = k/n 衡量了编码所引入的冗余。随后，我们可以从编码块的某些子集中解码出原始信息块。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0a1f87a7fdd6493f471ab60a51936441f9101afda07ffce67f97eb8f779d872d.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>如果编码是最大距离可分的（MDS），那么原始的 k 个信息块可以从任何大小为 k 的编码块子集中恢复出来，这是一个有用的效率和鲁棒性保证。Reed-Solomon 码是一个流行的 MDS 编码系列，其工作原理如下。记得在学校里，你可能学过两点唯一决定一条线。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9351feb5c5fca8c60431d77390893c9f6caca423b89b9e07aa5207e66216a1e3.gif" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>这是因为一条直线可以被描述为一个有两个系数的1次多项式：y = a1x+a0（现在我们假设各点有不同的 x 坐标）。事实上，这一见解可以被概括为：任何次数为t-1的多项式，对应于描述多项式</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ed3d74f20feec1ec0eba8482a8769eabd44c7c5c9fe7214d12ac54300d2edae4.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>的一组系数</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/83497662b158e589c4fbd527d7873f60ad31e21586cf52c2ab6992abd552e6a7.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>，由该多项式经过的任何 t 个点（有不同的 x 坐标）唯一决定。换句话说：一旦你知道多项式在 t 个不同位置的求值，你就可以得到它在任何其他位置的求值（首先恢复多项式，然后求值）。</p><p>Reed-Solomon 码就是根据这一观点建立的。对于编码，我们从 k 个信息块</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/75632a4a4a28c291be33546c829d7855c379819444da1cdbd2649369a7a4fc50.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>开始，构建相关的多项式</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/996dffedae13570986ce91413818fcfec775e5fcd5934d46458a540644cb5942.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>，并在 n 个不同的 x 坐标上对其进行求值，从而得到编码的信息块。现在，由于上述见解，这些编码块中的任何 k 都允许我们唯一地恢复 k-1 次的多项式，并读出系数以获得原始信息块。Voilà!</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6d4ef2f1bee1efb62de1ac7924e81a75d98777bb1b06668eff201340e0f1aebb.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>回到我们的数据可用性问题：我们现在不再要求区块生产者在公告板上写下原始文件，而是要求它将文件切分成 k 个小块，用比率为 R=1/2 的 Reed-Solomon 码对它们进行编码，并将 n=2k 编码块写到公告板上。现在我们假设区块生产者至少诚实地遵循编码（我们将在后面看到如何解除这一假设）。再考虑一下这两种情况：要么生产者行为很诚实，写下了所有的块，要么生产者行为不端，想保持文件不可用。回顾一下，我们可以从 n=2k 个编码块中的任何 k 个来恢复原始文件。因此，为了保持文件不可用，区块生产者最多可以写入 k-1 个块。换句话说，现在至少有 k+1 个，也就是 n=2k 个编码块中的一半以上，将被丢失！</p><p>但是现在这两种情况，一个完全写满的公告板，和一个半空的公告板，是很容易区分的。你在少量 r 个随机采样的位置检查公告板，如果每个采样的位置都有各自的块，则认为文件是可用的，如果任何一个采样的位置是空的，就认为是不可用的。请注意，如果该文件不可用，因此（超过）一半的公告板是空的，你错误地认为该文件可用的概率小于</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/09185b1e6d769568a9f66437ea24f02a524a9f3c0df03095b6884d3157be83fd.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>，即在 r 中呈指数级减小。</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">（实际）挑战</h2><p>这是非常简单的（在给定的 &quot;黑房间中的公告板 &quot;模式中）。让我们思考一下这个模型。这些组件代表什么？我们能在一个真正的计算机系统中实现它们吗，如何实现？</p><p>事实上，为了帮助各位发现理论与实践之间的差距，我们用那种 &quot;奇怪的&quot;&quot;黑房间里的公告板 &quot;的模型来解释问题和解决方案，其隐喻与真实的计算系统几乎没有任何相似之处。这是为了鼓励你思考真实世界和模型世界的各个方面是如何相对应的，以及它们可能（无法）是如何实现的。如果你剩下的模型碎片还不能转化为计算机/网络/协议的等价物，你就知道还有一些事情要做（这可能是你理解上的差距，或者是开放的研究问题！;)</p><p>这里收集了一些非详尽的挑战，对于其中一些挑战，多年来社区已经找到了合理的答案，而其他的挑战仍然是开放的研究问题。</p><p>**挑战 A：如何确保公告板上的块确实是由提议者写的？**思考一下被采样的块在网络上以任何形式传送到采样节点时会发生的改变。这就是一小块信息的来历，当生产者离开并且采样节点进入黑房子时，区块生产者可以将其传递给采样节点。 在实践中，这被实现为对写在公告板上的原始内容的绑定向量承诺（想想 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://en.wikipedia.org/wiki/Merkle_tree">Merkle 树</a>），并且它被作为块头的一部分进行共享。给定这个承诺后，区块生产者可以在公告板上留下每个编码块的证明，以表明该块确实是由区块生产者写的。区块在运输过程中不能被第三方改变，因为承诺方案是不允许为一个被修改过的区块伪造有效的证明。请注意，这本身并不排除区块生产者在公告板上写入无效/不一致的块，这一点我们在接下来会讨论。</p><p>**挑战 B：确保区块生产者正确地进行纠删码编码。**在上述方案中，我们假设区块生产者对信息块进行了正确的编码，所以纠删码的保证是成立的，因此，我们实际上是可以从足够多的编码块中恢复信息块的。换句话说，区块生产者所能做的就是保留信息块，而不是用无效的信息块来混淆我们。在实践中，有三种常见的方法来排除无效的编码：</p><ul><li><p>**欺诈证明。**这种方法依赖于这样一个事实，即一些采样节点足够强大，可以采样很多的块，以至于它们可以发现块的编码不一致，并发出无效的编码欺诈证明，将有关文件标记为不可用。这方面的工作旨在最大限度地减少节点必须检查的块的数量（并作为欺诈证明的一部分转发），以检测欺诈（参见 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/1809.09044">Al-Bassam/Sonnino/Buterin 的原论文为此使用二维 Reed-Solomon 码</a>）。</p></li><li><p>**多项式承诺。**这种方法使用 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf">KZG 多项式承诺</a>作为块头中包含的绑定向量承诺来解决挑战 A。多项式承诺允许根据对未编码信息块的承诺直接验证Reed-Solomon 编码块，因此没有为无效编码留下空间。可以认为：向量承诺和 Reed-Solomon 码在多项式承诺中是不可分割的。</p></li><li><p>**有效性证明。**一个可以用来证明向量承诺提交的编码块是正确纠删码的加密证明系统。这种方法是一个很好的教学 &quot;心理模型&quot;，并且在所采用的纠删码方面是通用的，但在相当长的一段时间内可能是低效率的。</p></li></ul><p>**挑战 C：公告板是 &quot;什么 &quot;和 &quot;在哪里&quot;？提议者如何 &quot;写 &quot;到它上面？**在我们讨论公告板 &quot;是什么 &quot;和 &quot;在哪里&quot;，提议者如何 &quot;写 &quot;到它上面，以及验证者如何从它 &quot;读&quot;/&quot;取样 &quot;之前，让我们回顾一下两个基本 P2P 网络原语中众所周知的缺点：</p><ul><li><p><strong>基于低量级泛洪的发布-订阅 gossip 网络</strong>，如 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/2007.02754">GossipSub</a>，其中通信被组织成不同的 &quot;广播组&quot;（&quot;主题&quot;），参与者可以加入（&quot;订阅&quot;）并发送消息（&quot;发布&quot;）到：</p><ul><li><p>在任意（&quot;拜占庭&quot;）对抗行为（例如，日蚀攻击、Sybil 攻击、对等发现攻击）下不安全</p></li><li><p>常见的变体甚至不提供抗 Sybil 抵抗机制</p></li><li><p>通常不保证参与者的小组成员对其他参与者的隐私（事实上，小组成员身份通常与对等方通信，以避免他们转发不需要的主题网络流量）。</p></li><li><p>如果有大量的主题，每个主题都有很少的订阅者，那么通信往往会变得不可靠（因为订阅了特定主题的节点的子图可能不再连接，所以泛洪可能会失败。）</p></li></ul></li><li><p><strong>分布式哈希表（DHT）</strong>，如 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf">Kademlia</a>，每个参与者都存储了哈希表中存储的全部数据的一部分，参与者可以快速确定通往存储特定信息的对等方的最短路径。</p><ul><li><p>也不是拜占庭式的容错（例如，对诚实参与者的请求进行不适当的路由，对网络形成/维护攻击）</p></li><li><p>事实上，DHT 在抵御对抗行为方面的表现比 gossip 协议差很多。Gossip 协议 &quot;只 &quot;要求由诚实节点（以及诚实节点之间的边）形成的子图是连接的，因此信息可以从任何诚实节点到达所有诚实节点。在 DHT 中，信息是专门沿着路径路由的，查询一旦到达路径上的对抗节点就可能失败。</p></li><li><p>也不提供 Sybil 抵抗机制</p></li><li><p>参与者存储或请求信息的隐私不被保障（不被其他参与者的好奇心所影响）。</p></li></ul></li></ul><p>考虑到这一点，我们可以回到关于如何实现公告牌和对其进行读写操作的核心问题。编码块存储在哪里？它们如何到达那里？<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://notes.ethereum.org/@djrtwo/das-building-blocks">正在考虑的</a>三种主要的方法是：</p><ul><li><p>**GOSSIP：使用一个gossip网络来分散编码块。**例如，每个编码块可以有一个主题，而负责存储某个块的节点可以订阅相应的主题。</p></li><li><p>**DHT：将编码块上传到DHT。**然后，DHT将 &quot;自动 &quot;分配给每个参与者他们应该存储的块。</p></li><li><p>**REPLICATE：来自附近的副本的采样。**一些节点存储完整（或部分）的数据副本，并向采样节点提供块请求。</p></li></ul><p>这些方法所面临的挑战是：</p><ul><li><p>如何确保 &quot;公告板上有足够的空间 &quot;开始（即有足够的参与者订阅了 <strong>GOSSIP</strong> 的每个主题，或者每个节点可以存储它在 <strong>DHT</strong> 下需要存储的所有块），并确保公告板的所有部分都在随着节点的变化和时间的推移而保持在线？(理想情况下，为了确保可扩展性，我们甚至希望存储能被有效地利用，也就是说，在诚实的节点存储的内容中不应该有太多的冗余）。在一个真正的无需许可系统中，这将是特别棘手的，在这个系统中，节点来来去去，也许没有 Sybil 抵抗机制，所以大部分的节点可能是对抗性的，也可能在瞬间消失。幸运的是，在区块链背景下，通常会有一些 Sybil 抵抗机制（如 PoS），可以用来建立信誉甚至进行攻击，但如何利用 Sybil 抵抗机制来保证 P2P 网络层的安全，其中还有许多细节有待确定。</p></li><li><p>根据前面的观点，由于网络是共识的基础，因此也是拜占庭容错（BFT）系统的基石，网络层本身最好是BFT —— 但正如前面所见，流行的 gossip 或 DHT 协议（如 GossipSub 或 Kademlia）并非如此。 (即使是 <strong>REPLICATE</strong> 也可能面临这种挑战，因为 DHT 可能仍然用于网络堆栈的其他部分，例如，用于对等节点的发现；但在这一点上，DHT 的挑战成为一般网络层的关注点，而不是专门针对数据可用性采样。）</p></li><li><p>最后，有人认为，从长远来看，节点应该存储或转发不超过一个区块的相当小的一部分，否则可扩展性和支持相对 &quot;弱 &quot;的参与者（参照去中心化）的可能性是有限的。这是与 <strong>REPLICATE</strong> 是相反的。对于 GOSSIP 来说，这就需要大量的广播组（&quot;主题&quot;），每个主题都有少量的订阅者，在这种情况下，gossip 协议往往变得不那么可靠。在任何情况下，上述方法都有成本，例如，代表其他节点转发块的带宽，不能超过单个节点的预算。</p></li></ul><p>**挑战 D：我们 &quot;如何 &quot;实现随机采样？**这个问题有两个方面：所需的块如何在网络中定位和传输（即如何从公告板上 &quot;读取&quot;），以及如何确保采样对对手来说 &quot;保持随机&quot;，即对抗性区块生产者没有（太多的）机会根据谁查询哪些块而适应性地改变其策略。</p><ul><li><p>当然，直接从区块生产者那里采样并不是一个可行的选择，因为这需要区块生产者的高带宽，而且如果区块生产者的网络地址被所有人知道的话，还会产生相关的拒绝服务向量。(可以通过 DHT 和 REPLICATE 的视角观察到一些涉及到从区块生产者那里提取的混合结构）。</p></li><li><p>另一种方法是在使用上述方法之一（<strong>GOSSIP</strong> 或 DHT）分散大块后，从 &quot;swarm &quot;中采样。具体来说：</p><ul><li><p>在使用 <strong>GOSSIP</strong> 或 DHT 分散块之后，DHT 在路由采样请求和随机采样块时会很方便，但这也带来了上面讨论的挑战，最明显的是缺乏BFT和隐私。</p></li><li><p>另外，在 <strong>GOSSIP</strong> 下，每个节点可以订阅与它想采样的块相对应的主题 —— 但有上述的挑战：除了缺乏 BFT 和隐私，有大量的主题而每个主题的订阅者很少会导致不可靠的通信。</p></li></ul></li><li><p>在 &quot;从区块生产者中采样 &quot;和 &quot;从 swarm 中采样 &quot;之间，可以用 <strong>REPLICATE</strong> 进行折衷，即从数据的完整副本中采样，而副本是在网络对等方中进行识别。</p></li></ul><p>请注意，上面只解决了采样（现在从公告板上 &quot;读&quot;），而没有解决在未来任何时候从公告板上 &quot;读&quot;的问题。具体来说，<strong>GOSSIP</strong> 本质上实现了一个临时的公告板（只能在其内容被写入/散布时被读取/采样），而 DHT 实现了一个永久的公告板（也可以在很久之后被读取/采样）。通常情况下，人们希望有一个永久的公告板（永久的要求从 &quot;天 &quot;到 &quot;永远 &quot;不等，取决于具体的设计），为此，<strong>GOSSIP</strong> 必须使用 DHT 来路由块，这就带来了上述的挑战。<strong>REPLICATE</strong> 马上就实现了一个永久性的公告板。</p><p>下表说明了通常建议使用哪些 P2P 协议来实现模型的不同功能。具体来说，面向 gossip 的方法有两种变体，一种是使用 gossip 对块进行采样，另一种是使用 DHT 对块进行采样，而在这两种情况下，先使用 gossip 将块写在公告板上，然后再使用 DHT 从公告板上 &quot;读取&quot;。相比之下，面向 DHT 的方法完全依靠 DHT 来完成所有相关的操作。在面向 replication 的方法中，每个节点使用请求/响应协议，从附近的完整副本中读取/采样块。尽管两个对等方之间的 gossipping 在技术上可能是通过请求/响应协议实现的，但它有效地使用了gossip 来进行块的初始传播。</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bdd37376ce5f7bef78d59855ca8c299446fc9ac24c9ae2722b3b55db847469f8.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>此外，在上述所有技术中，&quot;谁采样了什么 &quot;被（至少是部分）泄露给了攻击者，因此攻击者可以通过自己的行为，自适应地削弱/促进某些节点采样的块的传播，从而欺骗某些节点相信该块是（不可）可用的。虽然<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/1809.09044">早期的工作表明，只有少数节点可以被欺骗</a>，但这是不可取的。另外，<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://arxiv.org/abs/1809.09044">早期的工作假设了匿名网络通信</a>，如果不是完全不切实际的话，这在实践中至少会带来相当大的性能损失。</p><p>**挑战 E：如何 &quot;修复 &quot;公告板的内容？**也就是说，如果一个编码块丢失了（例如因为存储该块的节点离线了，这是如何发现的？），如何修复它？简单的修复涉及到解码和重新编码，因此带来了相当大的通信和计算负担，特别是对于常见的 Reed-Solomon 纠删码。谁来承担这一重任？他们是如何得到补偿的？如何避免一个恶意的区块生产者通过保留几个编码块来破坏采样节点，并迫使节点在昂贵的修复上花费资源？分布式修复方案呢？甚至如何检索修复所需的块？这又回到了之前关于未来从公告板 &quot;读取 &quot;的观点。</p><p>**挑战 F：激励。**如果采样是免费的，那么如何防止拒绝服务向量？如果采样需要付费（如何实施？），如何同时做到完全匿名？如何补偿那些存储公告板（部分）、在 P2P 网络中传递信息或执行维护任务（如块状修复）的人？</p><h2 id="h-" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">另一种模型</h2><p>为了完整起见，我们简要地提到一个稍微不同的模型，DAS 实现了一个稍微不同的保证。即使没有匿名和可靠的网络，攻击者最多可以欺骗一定数量的诚实节点，使其相信一个不可用的文件是可用的。否则，它将不得不释放如此多的块，以便从诚实节点获得的所有块的联合中可以恢复该文件。这种模式的优点是，从网络中要求的属性更容易实现（特别是在 P2P 网络被攻击者破坏的情况下）。缺点是对个人用户没有具体的保证（你可能是少数被骗的人之一！），而且仍然不清楚如何收集所有由诚实节点获得的样本并恢复文件（特别是当 P2P 网络被对手攻击时）。</p><h2 id="h-and" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">未来研究 &amp; 发展方向</h2><p>基于这篇博文中提出的观察和论点，我们认为以下将是未来研究和发展的一些有趣方向：</p><p>很明显，为了保证网络层的安全，一些 Sybil 抵抗机制是必要的（现在，可以说，网络协议经常隐含地依赖IP地址的稀缺性来达到这个目的，例如，GossipSub v1.1 的对等评分）。方便的是，共识层正好提供了这一点，例如，以权益证明的形式。因此，在网络层上重用共识层的 Sybil 抵抗机制似乎是很自然的，例如，在 gossip 协议中从验证者集合中采样出一个节点（从而 &quot;继承 &quot;共识的诚实多数假设的力量）。虽然这可能不会立即保证那些不积极的共识参与者的节点的网络安全，但它可以帮助在共识节点之间建立一个安全的 &quot;骨干&quot;（从而加强共识的安全性），随后也许会成为一个垫脚石，使每个人都有更好的安全。这条道路上的一个合乎逻辑的下一步是仔细分析共识和网络与这种共享的 Sybil 抵抗机制的相互作用（<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://eprint.iacr.org/2022/541">这</a>是在这个方向上最近迈出的第一步）。</p><ul><li><p>改进的 gossip 和 DHT 协议：（参考<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.distributed-systems.net/my-data/papers/2011.acm-cs.pdf">本调查报告</a>）</p><ul><li><p>拜占庭容错（BFT），特别是使用共识层上常见的 Sybil 抵抗机制</p></li><li><p>效率（特别是对于 BFT 变体，到目前为止，这些变体有相当大的成本和/或较低的对抗复原能力）。</p></li><li><p>隐私保证（改进的保证，以及更好的效率/更低的成本）。</p></li></ul></li><li><p>修复机制：</p><ul><li><p>以分布式方式实施修复（具有局部性的纠删码？）</p></li><li><p>研究和设计相关的激励机制</p></li></ul></li></ul>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/776cf0d2674d869ebfb77e893e1e96f2fd499cec0080878ee228440598040956.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[DeFi 策略发明家 —— opyn]]></title>
            <link>https://paragraph.com/@w3hitchhiker/defi-opyn</link>
            <guid>BlVwNtZ9QdNauztIvEQ8</guid>
            <pubDate>Mon, 10 Oct 2022 06:42:01 GMT</pubDate>
            <description><![CDATA[作者：Yuky｜W3.Hitchhiker English version：Opyn - May Be A Defi Strategy Inventor1. 项目简介官方推特：https://twitter.com/opyn_简介：Opyn 是一个基于以太坊的去中心化期权协议平台，用户可以通过期权交易或者提供流动性来获得收益。Opyn 允许用户在 ERC20 上买入、卖出和创建期权，它是无须托管的期权协议，也是无须许可的保险协议。 Opyn 经历了 V1 版本和 V2 的迭代，目前这两个版本基本均宣告失败。现在，Opyn 团队将重心转向了一个新的方向 Squeeth 。 Squeeth 是团队推出的一种 DeFi 永续继承的衍生产品，它是追踪乘方的永续继承投资工具。产品基于著名的研究机构 Parath 于 21 月 8 日提出的“永续”契约概念进行制造。融资：2020年 216 万刀，领投方：Dragonfly2021年 670万刀，领投方：Paradigm A轮人员：2. 策略2.1 Long onlyETH 买入opyn 平台上的代币 oSQTH，标的物为 ETH ^2 （是...]]></description>
            <content:encoded><![CDATA[<p><strong><em>作者：Yuky｜W3.Hitchhiker</em></strong></p><p><em>English version：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.substack.com/p/opyn-may-be-a-defi-strategy-inventor"><em>Opyn - May Be A Defi Strategy Inventor</em></a></p><hr><h2 id="h-1" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">1. 项目简介</h2><p>官方推特：<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/opyn_">https://twitter.com/opyn_</a></p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">简介：</h3><p>Opyn 是一个基于以太坊的去中心化期权协议平台，用户可以通过期权交易或者提供流动性来获得收益。Opyn 允许用户在 ERC20 上买入、卖出和创建期权，它是无须托管的期权协议，也是无须许可的保险协议。</p><p>Opyn 经历了 V1 版本和 V2 的迭代，目前这两个版本基本均宣告失败。现在，Opyn 团队将重心转向了一个新的方向 <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://squeeth.opyn.co/?ct=TW">Squeeth</a> 。</p><p>Squeeth 是团队推出的一种 DeFi 永续继承的衍生产品，它是追踪乘方的永续继承投资工具。产品基于著名的研究机构 Parath 于 21 月 8 日提出的“永续”契约概念进行制造。</p><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">融资：</h3><ul><li><p>2020年 216 万刀，领投方：Dragonfly</p></li><li><p>2021年 670万刀，领投方：Paradigm A轮</p></li></ul><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">人员：</h3><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ccc285b3d95df67fbdaaf19ec4c97f186b2f90628cbfabbaf7f1119ab07d34e9.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/bb395acb0b0293ca35cb1e27bce43833b1b81d4c6e463afa53d8209feaf48644.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-2" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">2. 策略</h2><h3 id="h-21-long-only" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2.1 Long only</h3><p>ETH 买入opyn 平台上的代币 oSQTH，标的物为 ETH ^2 （是一个指数，gamma &gt; 0，delta &gt; 0）</p><p>开仓：ETH- oSQTH</p><p>平仓： oSQTH - ETH （uni 或者 opyn平台）</p><p>头寸：Long oSQTH</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/efaa44c234f2121e259795c61c34c71dec83ed666f4ddcea8b2f604c274919f6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Squeeth price = 10,000*(_oSQTH price in USD)/(normalization factor)*</p><p>收益率：Long squeeth return ≈ 2r + (r)² - funding</p><p>举例计算：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/d7ad8d4dd62c071aeccd4b007da4694502a7a822dd3e0a8b0ff28cb8e721a393.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><em>（从谷歌电子表格链接读取数据：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1_xt6F8SSSOyJ7AwVCswrjJKFTZ_cx6IvCS3rtwSuJgM/edit#gid=804401548"><em>https://docs.google.com/spreadsheets/d/1_xt6F8SSSOyJ7AwVCswrjJKFTZ_cx6IvCS3rtwSuJgM/edit#gid=804401548</em></a><em>）</em></p><p>需要注意的是，funding 费率是每天支付的（由多方支付给空方），比例等于平台上的 funding，形式为 in-kind ，因此不适合长期投资（因为红色线会降低收益率，除非有指数级别的行情）</p><h3 id="h-22-short-only" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2.2 Short only</h3><p>这种情况复杂一些；</p><p>short 头寸<strong>最少投入 6.9 ETH</strong>，抵押 ETH 选择 CR（抵押倍数，阈值为150% - 300%之间，低于 150% 则触发清算）</p><p>开仓：抵押 ETH ，获得 funding rate （gamma &lt; 0 ， delta &lt;0）</p><p>平仓：消除合约，赎回ETH</p><p>头寸：Short oSQTH</p><p>收益率： <strong>Short squeeth return ≈ -2r - (r)² + funding + CR*r</strong></p><p>举例计算：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/b05b7846acc83605e553db1f03ab573415998260f1e0d9efbce9c428a475b62a.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/9cbaa04cd8976b1b9a23b2a8c5e34a4d1a8052105a89ac6e4f9d07c0ace4d0fc.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/db892e07dccdd9de96afdf75922222ef883de064784d9c5dbbe421a2d74f3a59.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p><em>（从谷歌电子表格链接读取数据：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1_xt6F8SSSOyJ7AwVCswrjJKFTZ_cx6IvCS3rtwSuJgM/edit#gid=1886503241"><em>https://docs.google.com/spreadsheets/d/1_xt6F8SSSOyJ7AwVCswrjJKFTZ_cx6IvCS3rtwSuJgM/edit#gid=1886503241</em></a><em>）</em></p><p>看空的 oSQTH 具有负的 delta 和 gamma ，因此在凸性上呈现跌多涨少的特性，好在有 funding 和 质押的 ETH 收益能抵消一部分损失（在上涨行情中），但由于有至少抵押 6.9 个 ETH 的门槛限制，因此在散户中不具备选择性。</p><p>**小结：**我们用一张简单的图片形容这个 long short 两方的情况</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/00a7e3fa670ef14d2b1a379219554e5d9f321b32cd1a5da64ce865f7a41fb8f6.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>或者以对手方的形式：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/46d32d62b853db9884846ae9f423d8203ab4b2f6ea7ef2c47f61a062d75df0bf.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-23-crab-strategy-long-short" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2.3 Crab Strategy 螃蟹策略（Long / Short 策略）</h3><p>螃蟹策略是 opyn 上新推出的横盘时期的策略，其头寸为： long ETH + short oSQTH （delta hedge， gamma &lt; 0 ）</p><p><strong>动态调整</strong><em>（这里有一个推导的过程：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://colab.research.google.com/drive/1R7aMIIWRTm1qEztww3rEUOfZB-kL4dUW#scrollTo=oqc7fgcW5jfj"><em>https://colab.research.google.com/drive/1R7aMIIWRTm1qEztww3rEUOfZB-kL4dUW#scrollTo=oqc7fgcW5jfj</em></a><em>）</em>；</p><p>相当于一个自主稳定器或者缓冲带，</p><p>实质是一个 short 隐含波动率的策略；</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/21b9b1caf88e69d256394790c3aa6b2407cec567d04cf2203718f466b3478243.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>收益率（天） ：<em>Crab return = funding — (ETH return)²</em></p><p>收益率（年化）： <em>E(Crab apy) = 365</em>funding — (variance of eth )*</p><p>图形如下：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/0068a3082c744b8d4a33dd0828050e77cecff163d2780258a7b4304ea85e58c9.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/733353b7a5d17e1d06dabb6716237db1e6452132959329d4f4c1605ff45358c9.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">螃蟹策略的套利形式：拍卖</h3><p>螃蟹拍卖分为“买”和“卖”两种，用来平衡螃蟹策略。</p><p>买：就是用 WETH 买你手里的 oSQTH，对用户而言是卖出，这时候你需要有 oSQTH 代币才可以参加。（long eth + short oSQTH）</p><p>卖：就是把“多余”的 osqth 换成 WETH，对用户而言是买入，这时候你需要有 WETH 代币才可以参加。</p><p>两者都会有一个最小起拍量，站在参加拍卖的用户角度，比如你可以最少买入 8 个 osqth 代币，或者最少卖出 10 个 Osqth 代币，这就是门槛。</p><p>潜在的套利机会就是返璞归真的“低买高卖”，比如你买入了 WETH 用来购买螃蟹策略卖出的 osqth，这个时候一般买入的价格都会比同期 Uniswap 上的价格便宜，所以你买到了就可以去 uniswap 卖掉获利。如果你在 uniswap 买入了 osqth 代币卖给螃蟹策略，那么你要确保你购入 osqth 的成本要低于螃蟹策略的收购价，这样才有利可图。当然也需要注意授权和交易产生的 gas 费，以及极端行情带来的代币价格波动，确保不亏本。</p><p>「<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/participating-in-the-squeeth-crab-auction-b75a1defd8d6">Participating in the squeeth crab auction</a>」</p><p>螃蟹的证明计算表格：<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.google.com/spreadsheets/d/1EOofU20IZFtPKlFsg1spaUrtTefLXYDKRtJ9vhMJVGE/edit#gid=46994367">https://docs.google.com/spreadsheets/d/1EOofU20IZFtPKlFsg1spaUrtTefLXYDKRtJ9vhMJVGE/edit#gid=46994367</a></p><p>如果 ETH 价格上涨 → 策略用 WETH 购买 oSQTH</p><p>如果 ETH 价格下跌 → 策略卖出 oSQTH 换取 WETH</p><p>**小结：**从长期持有来看，螃蟹策略是一个负凸的策略，有左偏风险；但是螃蟹策略一定程度上改善了做空 oSQTH 者进入的门槛；从短期看，螃蟹拍卖提供了短期套利的机会，持续的收入 funding rate 会改善收益曲线。</p><h3 id="h-24-lp" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">2.4 LP 业务</h3><p>可以选择向 uni 池中的 ETH/oSQTH 币种注入流动性</p><p>方式有两种：Buy and LP 及 Mint and LP</p><p>如果看好 oSQTH 则可以选择 Buy and LP 的方式，由于 UNI 上 LP 的性质 ETH 头寸不是完全投入到 oSQTH 上的，所以收益曲线类似于跟踪一个指数 ETH ^1.5 （形式上是一个部分做多 oSQTH 的头寸）收益率图形如下：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/8b20de6c0d23ac16c752a095fbc3cd9c3cc5d203f4cfe8be46afbdacfcaa5b38.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>如果不看好 oSQTH 则可以选择 Mint and LP 的形式，过程为抵押 ETH 换取 oSQTH ，然后在 UNI 上做 LP</p><p>covered call （ writting a covered call ）：头寸为 long ETH + short oSQTH</p><p>同理 LP 会降低 Long ETH 的头寸，且 short oSQTH 带有负凸的属性，且 oSQTH 跟踪 ETH ^2 曲线，长时间看，负凸的效应会越来越明显，收益率图形呈现如下：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/6456e63864f621ad2daa09797c19e7af14a36ed5be3d5630e8aa236142764775.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-3" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">3. 亮点与不足</h2><h3 id="h-31" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">3.1 亮点与展望</h3><p>**亮点：**opyn 的 squeeth 解决了两个问题： 展期（roll down） 及 凸性 （convexity）</p><p>如图所示：</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a414894020a8ae9b1cd385580ddcc3609f06b02dce247dd6d3e35b6514928919.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>用永续理论解决了展期的问题，通过 long 币的一方 向 short 币的一方方不断支付 funding 解决</p><p>关于永续理论的推导：「<a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://www.paradigm.xyz/2021/05/everlasting-options">Everlasting Options</a>」</p><p>用ETH 的价格的平方作为跟踪指数，制造了凸性（gamma）使其具有与期权类似的属性</p><p>简单的操作也更具有普遍性</p><p>**展望：**更多的策略组合，吸引更多专业者参与；例如：gamma hedge 的需求者；或者 opyn 平台开放了熊市策略和牛市策略后出现更多衍生品组合的可能性（市场大），以及想象力（和其他衍生品平台互相配合，作为衍生品组合）</p><h3 id="h-32" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">3.2 不足</h3><p>从期权平台来说，盈利能力未知（或有限），做出来的产品像期权但不是期权（本质上，squeeth 只是一个含有凸性的期货指数，不同于straddle 和 strangle期权策略），产品的淘汰率令人担忧（v1，v2 的期权产品已无人问津）</p><p>从策略上来说：衍生品<strong>门槛较高</strong>，不适合普通的投资者参与（参与人少）；目前的策略内容还是过于单一，更像一个雏形；<strong>流动性不足</strong>（uni 上的流动性大概为 200 万刀左右），交易费（gas），价格冲击（price impact），及滑点都较高（大概有 1.5%）；<strong>所有的策略指向短期和套利，对于希望做长期策略的投资者不太友善。</strong></p><h2 id="h-4" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">4. 总结</h2><p>opyn 平台优势劣势还是挺明显的。</p><p><strong>优：</strong></p><p>创造了指数 ETH^2 和引入 Gamma ，这方面从市场看有两个改变：</p><ul><li><p>一是吸引更多的专业投资者参与（更多专业的衍生品交易者可以有更为广泛的选择）</p></li><li><p>一是可以有更多的衍生品组合出现（这种组合可<strong>能有自己和自己平台产品</strong>，<strong>也可能是跨平台产品</strong>）虽然是很小的改变，但是也确实拓宽了衍生品市场的种类和组合方式；</p></li></ul><p>项目的<strong>专业性和创新能力不错</strong>，比较期待他们的 Bull strategy 和 Bear strategy。</p><p><strong>劣：</strong></p><p>平台产品<strong>对于散户门槛较高</strong>（经济上的和认知上的），用户量的增加和普及（<strong>宣传力度</strong>，<strong>教授力度</strong>）对于项目方是个重要的问题；</p><ul><li><p>UNI 池子<strong>流动性和深度也不足</strong>；</p></li><li><p><strong>交易费和价格冲击的问题？</strong></p></li><li><p>策略的期限结构还是比较<strong>单一</strong>，都指向<strong>短期</strong>；</p></li><li><p>形式上也比较单一：目前还都是以<strong>套利</strong>为主</p></li></ul><p>总结下来，虽然优劣势明显，但是作为创新的先驱者还是可以给予一定期待</p><hr><h3 id="h-" class="text-2xl font-header !mt-6 !mb-4 first:!mt-0 first:!mb-0">参考资料</h3><p><em>螃蟹实验室： </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/crablab-bae31af13be6"><em>https://medium.com/opyn/crablab-bae31af13be6</em></a></p><p><em>螃蟹拍卖： </em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/participating-in-the-squeeth-crab-auction-b75a1defd8d6"><em>https://medium.com/opyn/participating-in-the-squeeth-crab-auction-b75a1defd8d6</em></a></p><p><em>Squeeth Lab 简介：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/how-to-think-about-squeeth-returns-8646fd57f559"><em>https://medium.com/opyn/how-to-think-about-squeeth-returns-8646fd57f559</em></a></p><p><em>Squeeth 资金和流动性：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/squeeth-insides-volume-1-funding-and-volatility-f16bed146b7d"><em>https://medium.com/opyn/squeeth-insides-volume-1-funding-and-volatility-f16bed146b7d</em></a></p><p><em>LP 整理：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/lpeeeeeeth-demystifying-squeeth-lping-faee7e50ed33"><em>https://medium.com/opyn/lpeeeeeeth-demystifying-squeeth-lping-faee7e50ed33</em></a></p><p><em>入门指引：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://medium.com/opyn/squeeth-primer-a-guide-to-understanding-opyns-implementation-of-squeeth-a0f5e8b95684"><em>https://medium.com/opyn/squeeth-primer-a-guide-to-understanding-opyns-implementation-of-squeeth-a0f5e8b95684</em></a></p><p><em>Squeeth doc：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://opyn.gitbook.io/squeeth/squeeth/contracts-documentation"><em>https://opyn.gitbook.io/squeeth/squeeth/contracts-documentation</em></a></p><p><em>Gamma doc：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://opyn.gitbook.io/opyn/getting-started/introduction"><em>https://opyn.gitbook.io/opyn/getting-started/introduction</em></a></p><p><em>Greeks图表：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://pro.gvol.io/defi/squeeth/"><em>https://pro.gvol.io/defi/squeeth/</em></a></p><hr><blockquote><p><em>声明：本文内容仅供参考、交流，不构成任何投资建议。若存在明显的理解或数据的错误，欢迎反馈。</em></p><p><em>本文内容系 W3.Hitchhiker 原创，如需转载请标明出处。</em></p><p><em>商务合作：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="mailto:hello@w3hitchhiker.com"><em>hello@w3hitchhiker.com</em></a></p><p><em>官网：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://w3hitchhiker.com/"><em>https://w3hitchhiker.com/</em></a></p><p><em>W3.Hitchhiker 官方推特：</em><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://twitter.com/HitchhikerW3"><em>https://twitter.com/HitchhikerW3</em></a></p></blockquote>]]></content:encoded>
            <author>w3hitchhiker@newsletter.paragraph.com (W3.Hitchhiker)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/bd83a22dbc7d024b172f06eead1780b1ac6cbb924598cae155d85cc7b74144fd.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>