<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by HashSavior on Medium]]></title>
        <description><![CDATA[Stories by HashSavior on Medium]]></description>
        <link>https://medium.com/@harri3r.db?source=rss-fa50e71fee28------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9Rk807FRD57EiMMGMAbEmQ.png</url>
            <title>Stories by HashSavior on Medium</title>
            <link>https://medium.com/@harri3r.db?source=rss-fa50e71fee28------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 15:31:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harri3r.db/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[时间链与时间质押：探索未来的劳动价值衡量]]></title>
            <link>https://medium.com/@harri3r.db/%E6%97%B6%E9%97%B4%E9%93%BE%E4%B8%8E%E6%97%B6%E9%97%B4%E8%B4%A8%E6%8A%BC-%E6%8E%A2%E7%B4%A2%E6%9C%AA%E6%9D%A5%E7%9A%84%E5%8A%B3%E5%8A%A8%E4%BB%B7%E5%80%BC%E8%A1%A1%E9%87%8F-0f3ddbbf97e3?source=rss-fa50e71fee28------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f3ddbbf97e3</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[HashSavior]]></dc:creator>
            <pubDate>Sun, 21 Jan 2024 15:59:05 GMT</pubDate>
            <atom:updated>2024-01-21T16:09:54.841Z</atom:updated>
            <content:encoded><![CDATA[<h3>引言：重塑货币与劳动的关系</h3><p>自比特币诞生以来，区块链技术历经多次变革，标志着一个新时代的到来：人类对货币的重新定义。传统上，货币并非为交易劳动而生，而是作为商品交换的媒介。在早期的物物交换中，如一头牛换取一捆米，货币的出现解决了交易的不便，成为通用的等价物。</p><p>然而，将货币用于衡量劳动时间的适应性并不理想，这就如同在温带地区种植咖啡豆一般，两者并不天然契合。在人类社会中，不同的技能结合时间的投入，才能产生等同于商品的价值。这是劳动冷凝成商品的过程。一旦劳动转化为商品，商品便从时间中解耦，可以在市场上自由流通。从平台到简单的支付系统，均可视作商品，为其创造者不断带来货币收入。</p><h3>时间链的概念与设计</h3><p>针对现有的问题，我提出了一种创新的区块链应用：时间链（Timechains）。这是一种基于个体时间的区块链系统，每个人都拥有一条独特的、记录自己生活活动的区块链。时间链的核心功能是记录个体的时间投入，构建起一个人类社会的时间链网络。</p><p>在这个网络中，劳动价值的衡量不再依赖于现有的货币体系。当前，货币在衡量劳动和时间方面的表现不佳，这正是普通劳动者用时间换取金钱效率低下的主要原因。通过时间链，我们可以更公平、更精确地衡量个体的劳动价值，改变人们对劳动和时间的传统认识。</p><h3>展望未来：一个新时代的到来</h3><p>我坚信，一个伟大的时代即将来临。在这个时代中，时间链将彻底改变我们对劳动和时间价值的认知，从而重塑劳动与货币之间的关系。随着时间链的应用和发展，我们有望看到一个更加公平、透明的劳动价值衡量体系的诞生。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f3ddbbf97e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Several tips on btc nft protocol ord initialization]]></title>
            <link>https://medium.com/@harri3r.db/several-tips-on-btc-nft-protocol-ord-initialization-ec4fa8faa420?source=rss-fa50e71fee28------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec4fa8faa420</guid>
            <dc:creator><![CDATA[HashSavior]]></dc:creator>
            <pubDate>Wed, 08 Mar 2023 17:11:38 GMT</pubDate>
            <atom:updated>2023-03-08T17:11:38.000Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>error :d: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32&#39; not found (required by /root/bin/ord).</li></ol><p>issues: <a href="https://github.com/casey/ord/issues/1430">https://github.com/casey/ord/issues/1430</a></p><p>2. setting bitcoin.conf:</p><p>server=1</p><p>txindex=1</p><p>rest=1</p><p><strong>rpcbind=127.0.0.1(if your bitcoind rpc binding failed try add this row)</strong></p><p><strong>rpcallowip=127.0.0.1(if your bitcoind rpc binding failed try add this )</strong></p><p>and run ord index with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D65zOCcEV5kQY_2tV4vCmw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec4fa8faa420" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Several tips on bitcoin core server construction]]></title>
            <link>https://medium.com/@harri3r.db/several-tips-on-bitcoin-core-server-construction-ca907c6d210b?source=rss-fa50e71fee28------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca907c6d210b</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[bitcoin-core]]></category>
            <dc:creator><![CDATA[HashSavior]]></dc:creator>
            <pubDate>Sat, 04 Mar 2023 04:28:10 GMT</pubDate>
            <atom:updated>2023-03-04T04:28:10.997Z</atom:updated>
            <content:encoded><![CDATA[<p>Recording my process in bitcoin core server construction, mainly the process of finding libs for autogen.sh and ./configure. <a href="https://cypherpunks-core.github.io/bitcoinbook_2nd_zh/%E7%AC%AC%E4%B8%89%E7%AB%A0.html">Reference</a>.</p><p><strong>Server provider:</strong> contabo</p><p><strong>Scale</strong>: 6 cores 16 GB 1,600 GB (100% SSD) 600 Mbit/s</p><p><strong>Fee</strong>: $22.99 / month</p><ol><li><strong>apt update all</strong></li></ol><p>For the first time I accessed to the server, I should use this command to update all unfashioned libs.</p><p>2. <strong>git tag</strong></p><p>remember to use space for showing next version tags.</p><p><strong>3. apt-get install autoconf</strong></p><p><strong>4. apt-get install libtool</strong></p><p><strong>5. ./configure — with-gui=no</strong></p><p>remember to add the parameter with-gui=no</p><p><strong>6. apt-get install libboost-all-dev</strong></p><p>for the process of checking boost ..yes</p><p><strong>7. apt install make</strong></p><p>for this error:</p><p>config.status: error: Something went wrong bootstrapping makefile fragments<br> for automatic dependency tracking. Try re-running configure with the<br> ‘ — disable-dependency-tracking’ option to at least be able to build<br> the package (albeit without support for automatic dependency tracking).<br>See `config.log’ for more details</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca907c6d210b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hamilton Equation and future implementations on web3]]></title>
            <link>https://medium.com/@harri3r.db/hamilton-equation-and-future-implementations-on-web3-e514c298bb0b?source=rss-fa50e71fee28------2</link>
            <guid isPermaLink="false">https://medium.com/p/e514c298bb0b</guid>
            <category><![CDATA[optimal-control]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[optimal-theory]]></category>
            <category><![CDATA[consensus]]></category>
            <dc:creator><![CDATA[HashSavior]]></dc:creator>
            <pubDate>Fri, 03 Mar 2023 07:01:22 GMT</pubDate>
            <atom:updated>2023-03-03T07:02:22.452Z</atom:updated>
            <content:encoded><![CDATA[<p>Web3 relates to crowd optimal control and management. Therefore, understanding the fundamentals of Hamilton’s Equation could be quite useful in comprehending web3 economics afterwards.</p><p>I am now conjecturing relations inside web3’s famous protocols including several classic peer-to-pool protocols and found some interesting property via optimal control tools. If you have any insights and interests please tell me.</p><p>This note summarizes the process of understanding Hamilton Equation in solving optimization problems. If you can read Chinese, you can reference to <a href="https://zhuanlan.zhihu.com/p/4361502061">this paper </a>link for more deep understanding in Hamilton equation.</p><h3>Hamilton Equation: The First Order Necessary Condition for Optimal Control</h3><p>First, let’s take a look at the problem we want to solve:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QEgqFMB26Nx2sgNwMQb8nQ.jpeg" /></figure><h3>Theoretical Derivation:</h3><p>Let \lambda be a continuous and differentiable function defined on t_{0}≤t≤t_{1}. For any x(t), u(t) that satisfy the constraint in equation (1), we have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvmdM5MeA6krT_RHmZ1aTw.png" /></figure><p>By integrating the right side of equation (1) using partial integral, we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OqXCUtY1Li1_foYUJTyS9A.png" /></figure><p>Substituting equation (2) into equation (1), we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zEruHW5mdyi0R3bGLu9_cA.jpeg" /></figure><p>In optimal control, once we determine the <strong>control variable</strong> u(t), the <strong>state variable</strong> x(t) is naturally determined by the transformation equation g(t). Therefore, the core of the problem is to determine the optimal u^{*}(t).</p><p>In variational calculus, to determine the first necessary condition for the solution to the following problem, we add a perturbation to the optimal path, i.e., x^{<em>}(t) + ah(t), x^({</em>’})(t) + ah’(t),is arbitrary but given.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*OVom6w6Nvs-6WfiVWGcjww.jpeg" /></figure><p>However, we cannot do this in optimal control. The reason why we can do this in equation (3) depends on x′(t)=u(t), but in general optimal control, it is x′(t)=g(t,u(t),x(t)). Therefore, if we set x(t)=x^{*}(t)+ah(t), we do not know the relationship between u(t) and h(t) and can only express it implicitly. Therefore, the method of constructing the perturbation term h(t) of x^{*}(t) cannot be used there. Instead, we construct x(t)=u^{*}(t)+ah(t). Define y(t,a) as the state variable of u^{*}(t)+ah(t), subject to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PsN9K2bH1DS6WnRR3tvUDg.jpeg" /></figure><p>We can write the objective function as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*R1Tck6S8M2ga-7CBVZVX2A.png" /></figure><p>Using equation (3), we can write (5) as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNU2gT52T0eqI7aUW0AcCQ.png" /></figure><p>Because u^{*} is the optimal control variable, J(a) attains the maximum value at a=0, i.e., J′(0)=0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXsM-hoEPK66Waf_DSkSJw.png" /></figure><p>Since y(t_{0}, a) is a constant, we have y_{a}(t_{0},0)=0.</p><p>The difficulty of equation (6) lies in y_{a} because we do not know the form of y(t, a). However, we can eliminate the term containing y(t, a) by constructing \lambda (t). Define:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EjDgQ0Gk4zpkL8N1tJYfRw.jpeg" /></figure><p>Then, we have:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pr2Zm4j9aY2Mza-c6RvHvQ.png" /></figure><p>Since (8) holds for any continuous h, let h = f_{u}(t, x(t), u(t)) + \lambda g_{u}(t, x_{*}, u_{*}), then we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IPNwCP_ZrtBA2izRhddstA.png" /></figure><p>That is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Phb5r-RA6_ezKad-a_8lBg.png" /></figure><p>To summarize, if u^{*<em>}, x^{</em>*} are optimal solutions, there exists a continuous function \lambda (t) that satisfies:</p><p>A convenient way to remember the state equation, multiplier equation and optimal equations is the Hamilton Equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WeoSwzR93m--QkAIZ41QXA.jpeg" /></figure><p>That’s all the derivation of Hamilton Equation. Thanks for your reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e514c298bb0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding slippage easily with junior high school calculation]]></title>
            <link>https://medium.com/@harri3r.db/understanding-slippage-easily-with-junior-high-school-calculation-9a7f7e4a328c?source=rss-fa50e71fee28------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a7f7e4a328c</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[uniswap]]></category>
            <category><![CDATA[amm]]></category>
            <category><![CDATA[slippage]]></category>
            <dc:creator><![CDATA[HashSavior]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 08:16:08 GMT</pubDate>
            <atom:updated>2023-01-29T18:10:28.324Z</atom:updated>
            <content:encoded><![CDATA[<p>Uniswap v2, which is a classic AMM model, created by Hayden Adams et al. in May 2020, has triggering a plethora of exploration on the curvature and market microstructure in AMM both in academia and Internet. This paper aims to assist people unfamiliar with defi and its market structure in understanding the slippage and impairment loss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*UwuFIaaF2WBulm5jzESiqw.png" /></figure><h3>Slippage</h3><p>The intrinsic understanding of slippage is quite common in everyday life, even though quants and economists use state space representation and other complex tools to explore slippage.</p><p>Consider a pool with 100ETH and 200,000USDC. Our typical idea of ETH’s price is 2000USDC. Will 2000USDC turn into 1ETH if I put it into the pool? Unfortunately, no. This is due to slippage.<strong> </strong>Here’s what we need to know:</p><pre>+-----------+------------------+---------------+-------------+<br>|           |       ETH        |     USDC      |  Invariant  |<br>+-----------+------------------+---------------+-------------+<br>| Initial   | 100              | 200,000       |      ?A     |<br>| Trading   | ? D              | 2,000         |      --     |<br>| Final     | ? C              | ?B            |      ?A     |<br>+-----------+------------------+---------------+-------------+</pre><p>Here are some questions (from A to D), but it’s really only a step-by-step calculation.</p><p>Since uniswap is a CFMM, it maintains the invariant (though in frictioned markets with swap fees, it’s not strictly invariant).</p><p>Invariant = 100 * 200,000 = 2,000,000. Scalar.</p><p>Due to the conservation property of AMM, we got all two places of A = 20,000,000.</p><p>Our second step is to calculate the final reserve of USDC, which is B = 200,000+2,000 = 202,000.</p><p>As a consequence, we get C = A/B = 20,000,000/202,000 ≈ 99.01.</p><p>As a result, D = 100–99.01 = 0.99 ETH. You got a value that is close to 1ETH, but not the same. Therefore, slippage is referred to as a price slippage, which in essence is a difference between the quantity you desire and the quantity you receive.</p><p>Let us consider what price means.<strong> </strong>As opposed to the typical understanding of price that is not directly related to trading volume in our daily lives, in AMM, the definition of price is directly related to the ratio of two assets’ quantities.</p><h3>Equations</h3><p>Let’s now discuss the intriguing equation of slippage.</p><p>Generally, slippage is defined as a divergence between the quantity you want and the quantity you receive. Usually, it is expressed as a percentage (%), which allows us to easily determine the real amount by dividing it by the percentage.</p><pre>+-----------+------------------+---------------+-------------+<br>|           |       ETH        |     USDC      |  Invariant  |<br>+-----------+------------------+---------------+-------------+<br>| Initial   | 100              | 200,000       | 20,000,000  |<br>| Trading   | 0.99             | 2,000         |  --         |<br>| Final     | 99.01            | 202,000       | 20,000,000  |<br>+-----------+------------------+---------------+-------------+</pre><p>ETH is priced at 2000 USDC in the initial phase and you are interested in trading 2000 USDC for 1 ETH. Nevertheless, it turns out to be a 0.99ETH. Slippage is 1%. Mathematically, slippage percent is equal to the ratio between the amount you give to a pool and its initial quantity in USDC.</p><p>It is calculated as 2,000USDC divided by 200,000, which equals 1%. Clearly, this is not a coincidence, but a result of a strict equation.</p><p>Let us now turn our attention to the price aspect. In order to calculate the price of ETH, we need 2000/0.99 = 2020USDC per ETH, which, as you can imagine, is 2000 (1+slippage) = 2,000(1+1%) = 2020.</p><p>Moreover, the quantity of ETH traded out (0.99) divided by the final reserve of ETH (99.01) also yields this result. The following section provides the corresponding proof.</p><h3>Formula</h3><p>A number of people like to formalize the question of slippage and examine it from a mathematical perspective. Formulas for slippage are simple mathematical representations of content shown above.</p><pre>+-----------+------------------+---------------+-------------+<br>|           |       ETH        |     USDC      |  Invariant  |<br>+-----------+------------------+---------------+-------------+<br>| Initial   | a                | b             | k = a*b     |<br>| Trading   | a - R            | x             |  --         |<br>| Final     | R                | b + x         | k           |<br>+-----------+------------------+---------------+-------------+</pre><p>Again, we have R = k / ( b + x ) and the slippage as usual should be the price difference more directly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Wle4iRF8Y5LIkIGbJm71fg.png" /></figure><p>The numerator is stipulated as the difference between initial Price(b/a) and trading price and denominator should be the initial Price.</p><p>After simplification you’ll get ∆P = x / b which is the same as I have exhibited before.</p><h3>Practical meaning</h3><p>The deduction of slippage is simple and can be directly perceived from senses, and quite beneficiary to the understanding of curvature and further exploration to market microstrucure and complicated trader interaction and LP strategy liquidity provision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a7f7e4a328c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>