<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://y7lee.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://y7lee.github.io/" rel="alternate" type="text/html" /><updated>2026-05-09T10:16:09+00:00</updated><id>https://y7lee.github.io/feed.xml</id><title type="html">y7lee</title><subtitle>for freedom！</subtitle><author><name>y7lee</name><email></email></author><entry><title type="html">Arsenal 2025-26 赛季 Polymarket 跨市场套利分析</title><link href="https://y7lee.github.io/posts/arsenal-pm-arbitrage/" rel="alternate" type="text/html" title="Arsenal 2025-26 赛季 Polymarket 跨市场套利分析" /><published>2026-05-09T00:00:00+00:00</published><updated>2026-05-09T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/arsenal-pm-arbitrage</id><content type="html" xml:base="https://y7lee.github.io/posts/arsenal-pm-arbitrage/"><![CDATA[<h1 id="arsenal-2025-26-赛季-polymarket-市场分析">Arsenal 2025-26 赛季 Polymarket 市场分析</h1>

<blockquote>
  <p>数据抓取时间：2026-05-07（赛后：欧冠半决赛淘汰马竞、英超剩 3 轮）
数据源：Polymarket Gamma API <code class="language-plaintext highlighter-rouge">/events</code> + <code class="language-plaintext highlighter-rouge">/markets</code></p>
</blockquote>

<hr />

<h2 id="一活跃市场总览">一、活跃市场总览</h2>

<p>Arsenal 目前在 Polymarket 上有 <strong>4 个未结束市场</strong>（Carabao Cup 已输、FA Cup 归曼联，均已结算）：</p>

<table>
  <thead>
    <tr>
      <th>#</th>
      <th>市场</th>
      <th>Yes</th>
      <th>No</th>
      <th>交易量</th>
      <th>截止</th>
      <th>negRisk</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Arsenal 赢得英超</td>
      <td><strong>79.5%</strong></td>
      <td>20.5%</td>
      <td>$11.1M</td>
      <td>2026-05-27</td>
      <td>是</td>
    </tr>
    <tr>
      <td>2</td>
      <td>Arsenal 赢得欧冠</td>
      <td><strong>41.5%</strong></td>
      <td>58.5%</td>
      <td>$6.7M</td>
      <td>2026-05-31</td>
      <td>是</td>
    </tr>
    <tr>
      <td>3</td>
      <td>Arsenal 赢得任意奖杯</td>
      <td><strong>84.4%</strong></td>
      <td>15.6%</td>
      <td>$0.33M</td>
      <td>2026-05-30</td>
      <td>否</td>
    </tr>
    <tr>
      <td>4</td>
      <td>Arsenal 英超第 2 名</td>
      <td><strong>20.0%</strong></td>
      <td>80.0%</td>
      <td>$2.6M</td>
      <td>2026-05-27</td>
      <td>是</td>
    </tr>
  </tbody>
</table>

<p><strong>奖杯市场说明</strong>：条款涵盖 EPL + UCL + Carabao + FA Cup。后两者已结束，当前等价于 <strong>EPL OR UCL</strong>。</p>

<hr />

<h2 id="二各-negrisk-池完整分布">二、各 negRisk 池完整分布</h2>

<h3 id="epl-winner20-队σyes--0990">EPL Winner（20 队，ΣYes = 0.990）</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Arsenal        79.5% ████████████████████████████████████████
Man City       19.5% █████████
Brentford       0.0%
Newcastle       0.0%
Liverpool       0.0%
Chelsea         0.0%
Man United      0.0%
Tottenham       0.0%
... (其他 12 队) 0.0%
</code></pre></div></div>

<blockquote>
  <p>ΣYes = 0.990 &lt; 1 → 理论买入全套 Yes 成本 $0.99 得 $1（+1.0%），gas 费吃掉利润。</p>
</blockquote>

<h3 id="ucl-winner60-队σyes--1015">UCL Winner（60 队，ΣYes = 1.015）</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Arsenal        41.5% ████████████████████
Bayern Munich  31.5% ███████████████
PSG            28.5% ██████████████
其他 57 队       0.0% (已淘汰)
</code></pre></div></div>

<blockquote>
  <p>ΣYes = 1.015 &gt; 1 → <strong>被超买</strong>。三个决赛圈队伍的 Yes 被市场集体推高。</p>
</blockquote>

<h3 id="epl-2nd-place20-队σyes--0996">EPL 2nd Place（20 队，ΣYes = 0.996）</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Man City       79.5% ████████████████████████████████████████
Arsenal        20.0% ██████████
其他 18 队       0.0%
</code></pre></div></div>

<hr />

<h2 id="三市场隐含的世界状态">三、市场隐含的世界状态</h2>

<p>由三个 Arsenal 市场的 Yes 价格推导出四种互斥状态的概率：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>                      ┌─ UCL Yes (41.5%)
                      │
           ┌──────────┼──────────┐
           │  36.6%   │   4.9%   │
           │  双冠王   │  仅欧冠   │
           │          │          │
EPL 79.5%  ┤──────────┼──────────┤
           │  42.9%   │  15.6%   │
           │  仅英超   │ 四大皆空  │
           │          │          │
           └──────────┴──────────┘
</code></pre></div></div>

<p><strong>推导过程</strong>：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>P(Trophy) = P(EPL ∪ UCL) = P(EPL) + P(UCL) - P(EPL ∩ UCL)
0.8445     = 0.795   + 0.415   - P(双冠)

→ P(双冠)   = 0.795 + 0.415 - 0.8445 = 0.3655  (36.6%)
→ P(仅英超) = 0.795 - 0.3655          = 0.4295  (42.9%)
→ P(仅欧冠) = 0.415 - 0.3655          = 0.0495  ( 4.9%)
→ P(无冠)   = 1 - 0.8445             = 0.1555  (15.6%)
</code></pre></div></div>

<h3 id="隐含条件概率">隐含条件概率</h3>

<table>
  <thead>
    <tr>
      <th>条件</th>
      <th>概率</th>
      <th>解读</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>P(UCL | EPL)</td>
      <td>36.6% / 79.5% = <strong>46.0%</strong></td>
      <td>拿英超后欧冠胜率翻倍</td>
    </tr>
    <tr>
      <td>P(UCL | ~EPL)</td>
      <td>4.9% / 20.5% = <strong>24.1%</strong></td>
      <td>不拿英超则欧冠希望大降</td>
    </tr>
    <tr>
      <td>P(EPL | UCL)</td>
      <td>36.6% / 41.5% = <strong>88.1%</strong></td>
      <td>拿欧冠几乎意味着双冠</td>
    </tr>
    <tr>
      <td>P(EPL | ~UCL)</td>
      <td>42.9% / 58.5% = <strong>73.3%</strong></td>
      <td>没拿欧冠仍有七成英超</td>
    </tr>
  </tbody>
</table>

<blockquote>
  <p>市场赋予了英超和欧冠之间极高的正相关性。实际上 EPL 收官（5/24）和 UCL 决赛（5/30）只隔 6 天，两场硬仗的体能消耗应该是<strong>负相关因素</strong>，但市场却在定价”赢一场就更可能赢第二场”。</p>
</blockquote>

<hr />

<h2 id="四套利分析">四、套利分析</h2>

<h3 id="41-negrisk-池内套利">4.1 negRisk 池内套利</h3>

<table>
  <thead>
    <tr>
      <th>池</th>
      <th>ΣYes</th>
      <th>方向</th>
      <th>理论收益</th>
      <th>实际可行性</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>EPL Winner</td>
      <td>0.990</td>
      <td>买全部 Yes</td>
      <td>+1.0%</td>
      <td>需 20 笔交易，gas &gt; 利润</td>
    </tr>
    <tr>
      <td>UCL Winner</td>
      <td>1.015</td>
      <td>卖全部 No</td>
      <td>+0.025%</td>
      <td>需 60 笔，57 个已淘汰的 No=$1 无利差</td>
    </tr>
    <tr>
      <td>EPL 2nd Place</td>
      <td>0.996</td>
      <td>买全部 Yes</td>
      <td>+0.4%</td>
      <td>同上，gas 问题</td>
    </tr>
  </tbody>
</table>

<p><strong>结论：negRisk 池内套利在数学上存在，但 Polymarket Polygon 链上的 gas 成本 + 滑点将利润蚕食至零。</strong></p>

<h3 id="42-跨市场套利">4.2 跨市场套利</h3>

<p>三个 Arsenal 市场<strong>不属于同一 negRisk 组</strong>。构造线性规划：</p>

<p>设 x1~x6 分别为 EPL-Y, EPL-N, UCL-Y, UCL-N, Trophy-Y, Trophy-N 的持仓数。</p>

<p>四种状态下等额支付的约束：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>(EPL, UCL):     x1 + x3 + x5 = V
(EPL, ~UCL):    x1 + x4 + x5 = V
(~EPL, UCL):    x2 + x3 + x5 = V
(~EPL, ~UCL):   x2 + x4 + x6 = V
</code></pre></div></div>

<p>解得：x1=x2, x3=x4, x5=x6。即<strong>必须在每个市场上同时做多和做空</strong>。</p>

<p>总成本 = x1(0.795+0.205) + x3(0.415+0.585) + x5(0.8445+0.1555) = x1 + x3 + x5
总收益 = x1 + x3 + x5</p>

<p>→ <strong>零利差。中点价不存在跨市场套利。</strong></p>

<h3 id="43-为什么没套利但看起来有">4.3 为什么没套利但看起来有？</h3>

<p>三个市场的中点价满足概率论的基本约束（Kolmogorov 公理）。价格的”缝隙”不在中点价，而在：</p>

<ul>
  <li><strong>Bid/Ask Spread</strong>：实际成交价偏离中点 1-3 美分</li>
  <li><strong>流动性不均</strong>：Trophy 市场只有 $325K vol，大单会推动价格</li>
  <li><strong>手续费</strong>：maker 0.1% / taker 0.1%</li>
</ul>

<hr />

<h2 id="五结构性发现">五、结构性发现</h2>

<h3 id="51-流动性极度失衡">5.1 流动性极度失衡</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>EPL Winner  (Arsenal 子市场):  $11.1M vol
UCL Winner  (Arsenal 子市场):  $6.7M  vol
Trophy      (独立市场):       $0.33M vol  ← 比前两者小 20-30 倍
</code></pre></div></div>

<p>一个 $325K 的小池子，在给 $18M 的大池子当”衍生品定价锚”。<strong>几万元的买卖就能推动 Trophy 价格几个百分点</strong>，而它反过来又影响市场对 P(双冠) 的隐含估计。</p>

<h3 id="52-缺少双冠王市场">5.2 缺少”双冠王”市场</h3>

<p>Polymarket 有这三个市场，但<strong>没有</strong> “Arsenal to win the Double” 市场。这是最自然的衍生品——三个已有市场隐含双冠概率 36.6%，直接开一个双冠市场可以：</p>

<ul>
  <li>为套利者提供更直接的 hedge 工具</li>
  <li>让 Polymarket 收割新的交易费</li>
  <li>消除三个分散市场之间的价格摩擦</li>
</ul>

<p>没有开，可能是事件创建者还没注意到。</p>

<h3 id="53-ucl-池被多头挤爆的结构性原因">5.3 UCL 池被多头挤爆的结构性原因</h3>

<p>ΣYes = 1.015 是一个值得注意的信号。正常 negRisk 池 ΣYes ≈ 0.98-0.995（被手续费压到 1 以下）。超买的原因：</p>

<ol>
  <li>57 个已淘汰队伍的 Yes 被精准打到 0.00，没有卖家</li>
  <li>剩余 3 个热门队被多军抢筹，推高了整体 ΣYes</li>
  <li>没有人做空已淘汰队伍的 Yes（反正快结算了，占用资金不划算）</li>
</ol>

<p>这导致 ΣYes 在决赛阶段系统性偏高——这是 negRisk 机制在赛事末期的<strong>结构性特征</strong>，不是套利机会。</p>

<h3 id="54-隐含相关性可能过高">5.4 隐含相关性可能过高</h3>

<p>市场定价：赢一场 → 另一场胜率翻倍（24% → 46%）。</p>

<p>足球现实：EPL 最后三轮 + UCL 决赛集中在 10 天内，体能消耗、伤病风险、心理压力都是<strong>负相关驱动因素</strong>。如果真实相关性低于市场隐含值，那么：</p>

<ul>
  <li><strong>Trophy No @ 15.6% 被低估</strong>（真实概率可能更高）</li>
  <li><strong>EPL Yes + UCL Yes 同时持有</strong>有正的期望收益，但承担了过多相关性风险</li>
</ul>

<hr />

<h2 id="六关键数据速查">六、关键数据速查</h2>

<table>
  <thead>
    <tr>
      <th>指标</th>
      <th>值</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>P(EPL)</td>
      <td>79.5%</td>
    </tr>
    <tr>
      <td>P(UCL)</td>
      <td>41.5%</td>
    </tr>
    <tr>
      <td>P(Trophy)</td>
      <td>84.4%</td>
    </tr>
    <tr>
      <td>P(双冠)</td>
      <td>36.6%</td>
    </tr>
    <tr>
      <td>P(仅英超)</td>
      <td>42.9%</td>
    </tr>
    <tr>
      <td>P(仅欧冠)</td>
      <td>4.9%</td>
    </tr>
    <tr>
      <td>P(四大皆空)</td>
      <td>15.6%</td>
    </tr>
    <tr>
      <td>P(UCL | EPL)</td>
      <td>46.0%</td>
    </tr>
    <tr>
      <td>P(UCL | ~EPL)</td>
      <td>24.1%</td>
    </tr>
    <tr>
      <td>P(EPL | UCL)</td>
      <td>88.1%</td>
    </tr>
  </tbody>
</table>

<hr />

<h2 id="七数据来源">七、数据来源</h2>

<ul>
  <li>Polymarket Gamma API: <code class="language-plaintext highlighter-rouge">GET /events/slug/{slug}</code> + <code class="language-plaintext highlighter-rouge">GET /markets/{id}</code></li>
  <li>EPL Winner: <code class="language-plaintext highlighter-rouge">english-premier-league-winner</code>, Arsenal 子市场 ID 566187</li>
  <li>UCL Winner: <code class="language-plaintext highlighter-rouge">uefa-champions-league-winner</code>, Arsenal 子市场 ID 566140</li>
  <li>Win a Trophy: market ID 1193498</li>
  <li>EPL 2nd Place: <code class="language-plaintext highlighter-rouge">english-premier-league-2nd-place</code>, Arsenal 子市场 ID 572733</li>
</ul>

<p><em>分析代码见 <code class="language-plaintext highlighter-rouge">polymarket/market_making/vps_bot/football.py</code> 中的 Gamma API 调用模式。</em></p>]]></content><author><name>y7lee</name></author><category term="polymarket" /><category term="polymarket arbitrage prediction-market negrisk probability" /><summary type="html"><![CDATA[对 Polymarket 上四个 Arsenal 赛季市场进行概率建模，推导隐含世界状态，分析 negRisk 池内与跨市场套利机会。]]></summary></entry><entry><title type="html">YT in Pendle</title><link href="https://y7lee.github.io/posts/pendle-yt/" rel="alternate" type="text/html" title="YT in Pendle" /><published>2024-04-27T00:00:00+00:00</published><updated>2024-04-27T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/pendle-yt</id><content type="html" xml:base="https://y7lee.github.io/posts/pendle-yt/"><![CDATA[<h1 id="pendleasset-类">PendleAsset 类</h1>
<p>模拟 Pendle 中的资产，如 stETH。</p>
<ul>
<li>initial_price 是资产当前的市场价格，比如 stETH 的价格是 $1000。</li>
<li>annual_yield 是资产的年化收益率，比如 stETH 的质押收益是 5%。</li>
<li>calculate_future_yield 方法计算未来一年的收益（$1000 × 5% = $50）。</li>
</ul>
<h1 id="pendletransaction-类">PendleTransaction 类</h1>
<ul>
<li>模拟用户对 YT 的操作：选择 持有 YT 或 卖出 YT。</li>
<li>yt_market_price 是当前市场上 YT 的价格，比如 $45。</li>
<li>hold_yt 模拟持有 YT 到期后获取的收益（$50）。</li>
<li>sell_yt 模拟立即卖出 YT，获取当前市场价格的现金流（$45）。
运行逻辑</li>
</ul>
<p>如果你选择持有 YT，到期后获得 $50。
如果你选择卖出 YT，现在获得 $45。</p>
<h1 id="运行结果">运行结果</h1>
<p>假设 stETH 当前价格为 $1000，年化收益率为 5%，YT 市场价格为 $45：</p>
<ul>
<li>持有 YT 到期后，你将获得未来收益：$50</li>
<li>立即卖出 YT，你可以获得即时收益：$45</li>
</ul>
<h1 id="总结">总结</h1>
<ul>
<li>持有 YT 更适合想要等待收益到期的用户（收益更高）。</li>
<li>卖出 YT 适合需要立即现金流的用户（收益更快）。</li>
</ul>
<p>&lsquo;&lsquo;&lsquo;python</p>
<pre><code>class PendleAsset:
    def __init__(self, initial_price, annual_yield):
        &quot;&quot;&quot;
        初始化 Pendle 资产
        :param initial_price: 资产当前的市场价格
        :param annual_yield: 资产的年化收益率 (如5% = 0.05)
        &quot;&quot;&quot;
        self.initial_price = initial_price
        self.annual_yield = annual_yield
        self.future_yield = self.calculate_future_yield()

    def calculate_future_yield(self, years=1):
        &quot;&quot;&quot;
        计算未来的收益
        :param years: 时间跨度（默认1年）
        :return: 未来收益的总金额
        &quot;&quot;&quot;
        return self.initial_price * self.annual_yield * years

class PendleTransaction:
    def __init__(self, asset, yt_market_price):
        &quot;&quot;&quot;
        初始化交易
        :param asset: PendleAsset 对象
        :param yt_market_price: 当前 YT 的市场价格
        &quot;&quot;&quot;
        self.asset = asset
        self.yt_market_price = yt_market_price

    def hold_yt(self):
        &quot;&quot;&quot;
        持有 YT 直至到期
        :return: 最终收益金额
        &quot;&quot;&quot;
        return self.asset.future_yield

    def sell_yt(self):
        &quot;&quot;&quot;
        卖出 YT
        :return: 即时收益金额
        &quot;&quot;&quot;
        return self.yt_market_price

# 示例使用
# 初始化一个 Pendle 资产（假设 1 stETH，价格 $1000，年化收益率 5%）
steth = PendleAsset(initial_price=1000, annual_yield=0.05)

# 当前 YT 的市场价格为 $45
yt_market_price = 45

# 初始化交易
transaction = PendleTransaction(asset=steth, yt_market_price=yt_market_price)

# 持有 YT 的收益
hold_yt_earnings = transaction.hold_yt()
print(f&quot;持有 YT 到期后，你将获得未来收益：${hold_yt_earnings}&quot;)

# 卖出 YT 的收益
sell_yt_earnings = transaction.sell_yt()
print(f&quot;立即卖出 YT，你可以获得即时收益：${sell_yt_earnings}&quot;)
</code></pre>
<p>&rsquo;&rsquo;&rsquo;</p>]]></content><author><name>y7lee</name></author><category term="defi" /><category term="defi pendle yield-trading" /><summary type="html"><![CDATA[本文用来介绍Pendle中的YT的逻辑和运行代码]]></summary></entry><entry><title type="html">BTC价格和宏观经济指标</title><link href="https://y7lee.github.io/posts/btc-macro-indicators/" rel="alternate" type="text/html" title="BTC价格和宏观经济指标" /><published>2024-04-20T00:00:00+00:00</published><updated>2024-04-20T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/btc-macro-indicators</id><content type="html" xml:base="https://y7lee.github.io/posts/btc-macro-indicators/"><![CDATA[<p>美国的主要经济指标与比特币价格之间存在多种复杂的、直接或间接的影响关系。主要因素包括。以下将讨论失业率,货币政策，通货膨胀和利率，国债收益率，政治因素，经济周期六个因素。</p>
<h3 id="1-失业率">1. 失业率</h3>
<p>失业率是衡量经济健康的重要指标之一。当失业率较高时，表明经济活动减缓，失业人数增多，家庭收入减少，这可能会导致投资者对高风险资产的需求降低。反过来，失业率降低通常是经济改善的标志，可能增强投资者对风险资产的信心，从而可能带动比特币价格上涨。</p>
<p>确实，我们可以通过考察过去的经济周期和相关事件来理解失业率与比特币价格之间的关系的实际影响。
以2020年初的COVID-19大流行为例，在此期间，由于疫情和相关的封锁措施，美国失业率急剧上升。根据美国劳动统计局的数据，失业率在2020年4月达到了14.8%，这是自大萧条以来的最高水平。许多企业关闭或规模缩减，导致广泛失业，人们的收入明显减少。</p>
<p>传统上，我们可能认为在经济不确定性增大、失业率上升的环境下，投资者会转向传统的避险资产，如黄金，而远离高风险资产。然而，在这次经济动荡期间，比特币的价格却显示出了相反的趋势。从2020年初到年末，比特币的价格实现了显著增长。尤其是在2020年3月，随着全球市场的大幅震荡，比特币价格短期内受到冲击，跌至约5000美元附近，但之后迅速反弹并持续上涨，到年底时超过了29000美元。这种上涨反映出了几个重要因素的作用：</p>
<ul>
<li>
<p><strong>流动性注入和货币价值预期：</strong>
为了应对经济危机，美联储和其他中央银行实施了前所未有的货币宽松政策，包括大规模资产购买计划和降低利率。这种政策不仅增加了流动性，也引发了市场对未来通胀的预期。在这种环境下，比特币作为一种被认为是有限供应的资产，被一些投资者视为对抗货币贬值的工具。</p>
<blockquote>
<p>大规模资产购买计划包含
大规模资产购买计划（通常称为量化宽松，Quantitative Easing，简称QE）是中央银行为了提振经济而采取的一种非常规的货币政策工具。在实施量化宽松政策时，中央银行会创造新的货币，用这些新货币购买市场上的长期债券和其他金融资产。这项措施的主要目的是降低长期利率，增加市场流动性，鼓励银行和其他金融机构放贷以及提振投资和消费。
量化宽松具体如何实施：
1. <strong>增加资金供应：</strong> 中央银行通过电子方式创建新的货币，用于购买政府债券和其他金融资产，如公司债。
2. <strong>压低长期利率：</strong> 通过增加对债券的需求，量化宽松有助于提高债券价格，并因此降低了债券的收益率或利率。低利率意味着较低的借贷成本，鼓励企业和个人借更多的钱来投资和消费。
3. <strong>鼓励风险投资：</strong> 降低了传统稳定投资（如国债）的回报率使得投资者寻求更高收益的替代投资，包括股市、房地产以及某些情况下的加密货币等风险较高的资产。
4. <strong>提高通胀预期：</strong> 增加市场流动性和降低利率也可能会提高通胀预期，这在一定程度上是中央银行采取这一政策的目标之一——特别是在通缩风险阴影下。
量化宽松政策在2008年全球金融危机后被广泛应用，特别是美国联邦储备系统（美联储）、欧洲中央银行（ECB）和日本银行（BoJ）等大型经济体的中央银行。在这些案例中，量化宽松有助于稳定金融系统并促进经济复苏。然而，这一政策也有其潜在副作用，包括资产泡沫、收入和财富不平等的增加，以及如果处理不当可能导致的高通胀。</p>
</blockquote>
</li>
<li>
<p><strong>风险资产的重新评估：</strong> 尽管失业率高，经济前景不明，但投资者在评估风险和回报的过程中，越来越将比特币视为一个存储价值的手段和潜在的增值投资。</p>
</li>
<li>
<p><strong>数字资产采纳率的增长：</strong> 随着对数字化金融解决方案的需要增加，以及加密货币市场基础设施的改善，比特币和其他加密货币获得了进一步的市场认可。</p>
</li>
</ul>
<p>因此，尽管高失业率通常显示出经济挑战，但2020年的这个特殊事件突显出加密货币市场与传统经济指标之间可以存在的非直观关系。在不确定和变动的经济环境中，比特币的独特属性使其在一些情况下，反而受到投资者的青睐。</p>
<h3 id="2-货币政策">2. 货币政策</h3>
<p>美联储制定的货币政策对经济影响深远，其中最重要的政策工具包括利率调整和量化宽松。低利率和量化宽松政策意味着更多流动性被注入市场，这通常有利于风险资产的价格上涨，包括比特币。因此，宽松的货币政策往往看到比特币和其他加密货币的价格上涨。</p>
<h3 id="3-通货膨胀和利率">3. 通货膨胀和利率</h3>
<p>通货膨胀率上升通常会促使中央银行提高利率，以遏制购买力下降的趋势。然而，当利率上升时，资金的时间价值增加，投资者可能会将资金从比如比特币这样的非利息资产转移至固定收益产品中。由此，利率增长可能会给比特币和其他加密货币的价格造成压力。相反，较低的利率则减少了持有现金和债券的吸引力，有可能导致投资者寻求比特币作为可能的对冲工具。</p>
<h3 id="4-国债收益率">4. 国债收益率</h3>
<p>国债收益率是另一个衡量投资者风险偏好和经济展望的重要指标。一般来说，风险规避情绪上升时，投资者倾向于购买国债作为安全资产，导致国债价格上升、收益率下降。在这种情况下，比特币的吸引力可能会减少。相反，当国债收益率上升时，这可能表明市场情绪转向风险接受，比特币和其他加密货币可能会受益。</p>
<h3 id="5-政治因素">5. 政治因素</h3>
<p>美国的政治情况，包括选举和政权变动，也能影响经济预期和政策方向。不确定的政治环境可能会导致投资者寻求比特币等替代资产作为避险工具。此外，政治事件可能会影响法规环境，这对于监管重度依赖的加密货币市场尤其重要。</p>
<h3 id="6-经济周期">6. 经济周期</h3>
<p>经济周期的不同阶段会影响投资者情绪和行为。在经济扩张阶段，投资者可能会对高风险投资，如比特币，表现出更大的兴趣。而在经济衰退期间，尽管比特币有时被视作避险资产，但整体风险偏好的下降可能会对其价格产生负面影响。</p>
<p>综上所述，比特币作为新兴资产类别，受众多因素影响，包括宏观经济指标。不过比特币还受到其本身因素的影响，如技术发展、市场采纳率和监管变化，这些都需要在评估其价格走势时予以考量。</p>]]></content><author><name>y7lee</name></author><category term="blockchain" /><category term="btc bitcoin macro economy" /><summary type="html"><![CDATA[BTC价格和宏观经济环境之间的关系总结与整理]]></summary></entry><entry><title type="html">What hanppend on-chain when you mint a</title><link href="https://y7lee.github.io/posts/mint-onchain-trace/" rel="alternate" type="text/html" title="What hanppend on-chain when you mint a" /><published>2024-04-07T00:00:00+00:00</published><updated>2024-04-07T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/mint-onchain-trace</id><content type="html" xml:base="https://y7lee.github.io/posts/mint-onchain-trace/"><![CDATA[<h1 id="what-happened-when-mint-a-bytepass">What happened when mint a Bytepass</h1>
<p>作为新接触web3 的人，钱包转账，合约交互等问题常常让我们难以理解，尤其是其表面的逻辑和背后的数据流通，常常让人感到疑惑。这里将基于一个简单的转账和合约交互的案例，利用链上数据工具，追踪这些活动在链上留下的踪迹，帮助大家更好的理解WEB3中以太坊生态下的合约交互的逻辑和方法。
这里将使用</p>
<h1 id="场景">场景</h1>
<p>首先介绍我做了什么</p>
<h1 id="链上数据追踪">链上数据追踪</h1>
<h2 id="转账">转账</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sql" data-lang="sql"><span style="display:flex;"><span><span style="color:#66d9ef">SELECT</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">*</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">FROM</span> optimism.transactions x
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">WHERE</span>
</span></span><span style="display:flex;"><span>  x.<span style="color:#e6db74">&#34;from&#34;</span> <span style="color:#66d9ef">IN</span> (<span style="color:#ae81ff">0</span>xE668a961CaDc3e4526e5583AEe9C6d460820315e)
</span></span><span style="display:flex;"><span>  <span style="color:#66d9ef">OR</span> x.<span style="color:#e6db74">&#34;to&#34;</span> <span style="color:#66d9ef">IN</span> (<span style="color:#ae81ff">0</span>xE668a961CaDc3e4526e5583AEe9C6d460820315e)
</span></span></code></pre></div>
<h2 id="合约交互">合约交互</h2>
<h2 id="heading"></h2>]]></content><author><name>y7lee</name></author><category term="blockchain" /><category term="blockchain onchain-data tutorial" /><summary type="html"><![CDATA[作为新接触web3 的人，钱包转账，合约交互等问题常常让我们难以理解，尤其是其表面的逻辑和背后的数据流通，常常让人感到疑惑。这里将基于一个简单的MINT的案例，利用链上数据工具，追踪该行为在链上留下的痕迹，解释当你MINT一个]]></summary></entry><entry><title type="html">UTXO and account</title><link href="https://y7lee.github.io/posts/utxo-vs-account/" rel="alternate" type="text/html" title="UTXO and account" /><published>2024-04-07T00:00:00+00:00</published><updated>2024-04-07T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/utxo-vs-account</id><content type="html" xml:base="https://y7lee.github.io/posts/utxo-vs-account/"><![CDATA[<h1 id="what-is-application-specific-blockchainappchain">what is Application-Specific Blockchain(AppChain)</h1>
<p>[reference]</p>
<ul>
<li><a href="https://medium.com/iosg-ventures/dydx-is-running-away-the-battle-between-appchain-and-rollup-75953337d18e">https://medium.com/iosg-ventures/dydx-is-running-away-the-battle-between-appchain-and-rollup-75953337d18e</a></li>
<li><a href="https://coinmarketcap.com/alexandria/article/what-is-an-application-specific-blockchain-appchain">https://coinmarketcap.com/alexandria/article/what-is-an-application-specific-blockchain-appchain</a></li>
</ul>]]></content><author><name>y7lee</name></author><category term="blockchain" /><category term="blockchain utxo account bitcoin ethereum" /><summary type="html"><![CDATA[what is Application-Specific Blockchain(AppChain) [reference] https://medium.com/iosg-ventures/dydx-is-running-away-the-battle-between-appchain-and-rollup-75953337d18e https://coinmarketcap.com/alexandria/article/what-is-an-application-specific-blockchain-appchain]]></summary></entry><entry><title type="html">Proposer / Builder Separation: A Look into its Present and Future</title><link href="https://y7lee.github.io/posts/pbs-mev/" rel="alternate" type="text/html" title="Proposer / Builder Separation: A Look into its Present and Future" /><published>2023-04-27T00:00:00+00:00</published><updated>2023-04-27T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/pbs-mev</id><content type="html" xml:base="https://y7lee.github.io/posts/pbs-mev/"><![CDATA[<h2 id="introduction">Introduction</h2>
<p><em>After Ethereum transitioned from Proof-of-work (PoW) to Proof-of-stake (PoS), validators replaced miners as the key role in the network. The idea of Proposer / Builder Separation (PBS) is to split validators into two roles, Builder and Proposer, to mitigate MEV&rsquo;s negative impact. Currently, PBS is mainly implemented by
MEV-Boost, and in the future, PBS will be built into the Ethereum protocol. This report will introduce PBS&rsquo;s mechanism and discuss its current situation and future.</em></p>
<h1 id="table-of-contents">Table of Contents</h1>
<nav id="TableOfContents">
  <ul>
    <li><a href="#introduction">Introduction</a></li>
    <li><a href="#1-background">1. Background</a></li>
    <li><a href="#2what-is-pbs">2.What is PBS</a></li>
    <li><a href="#3-the-present-and-future-of-pb">3. The Present and future of PB</a>
      <ul>
        <li><a href="#31-mev-boost">3.1 MEV-Boost</a></li>
        <li><a href="#32--in-protocol-pbs">3.2  In-protocol PBS</a></li>
      </ul>
    </li>
    <li><a href="#4-noteworthy-issues">4. Noteworthy Issues</a></li>
    <li><a href="#5conclusion">5.Conclusion</a></li>
  </ul>
</nav>

<h2 id="1-background">1. Background</h2>
<p>After the merge of Ethereum, the threshold for validator nodes has been lowered, allowing more users to participate. This has greatly increased the number of validators, improving Ethereum&rsquo;s decentralization and security. However, the problem of disproportionate beneficiaries of Maximal Extractable Value (MEV) is still a concern. Currently, the market size of MEV is very large. The following figure shows the cumulative MEV value before the merge, which is close to 700 million US dollars, and this value is still growing (Figure 1).</p>

<div class="figure left">
  
    <a class="fancybox" href="/images/post1_pic/fig1.png" title="Figure 1 Cumulative Extract MEV (Before merge); Source: https://explore.flashbots.net/" data-fancybox="group:travel">
  
    <img class="fig-img" src="/images/post1_pic/fig1.png" style="height: 300px;" alt="Figure 1 Cumulative Extract MEV (Before merge); Source: https://explore.flashbots.net/" />
  
    </a>
  
   
    <span class="caption">Figure 1 Cumulative Extract MEV (Before merge); Source: https://explore.flashbots.net/</span>
  
</div>

<div style="clear:both;"></div>

<p>As MEV grows, validators driven by profit will lead to centralization. In PoS, validators who are selected in advance can see users&rsquo; transactions and add their own transactions to them, directly controlling the order of transactions to profit themselves. Validators need complex strategies to maximize MEV. These strategies
lead to high fixed costs. Therefore, compared with ordinary validators, validators with more resources will have more opportunities to realize MEV. They will obtain more profits, and then obtain more validator seats, thereby gaining more opportunities to control transactions. For ordinary users, this will not only leadto higher gas fees and network congestion, but also make on-chain transactions unfair.</p>
<h2 id="2what-is-pbs">2.What is PBS</h2>
<p>In order to address the above problems, PBS is proposed. In Ethereum, validators are pseudo-randomly selected and propose to the network while building blocks. Therefore, they have great power and control order flow. In PBS, validators are divided into two roles: Builder and Proposer, which respectively undertake block-building and block-proposing functions. Builder is a highly specialized participant who sorts the transaction list and submits headers of the bundles to Proposer. Proposer&rsquo;s job is to accept the bundle with the highest bid. Importantly, before the auction ends, no one can see the content of the execution block. This is to prevent participants from controlling the flow of transaction in the block.</p>
<p>It’s worth noting that PBS enhances competition between builders. It requires all builders to focus on optimizing block building profitability using complex strategies. For Proposers, they can sit back and enjoy the benefits because they will receive rewards whether or not their proposals are accepted. Another point to note in PBS is that the role of Builder requires higher performance requirements for nodes, while the
threshold for Proposer is much lower. Therefore, even without powerful nodes, Proposers can participate in MEV. Overall, PBS not only reduces participants&rsquo; control over the order flow but also makes builders share MEV with Proposers, achieving decentralized MEV distribution.</p>
<h2 id="3-the-present-and-future-of-pb">3. The Present and future of PB</h2>
<p>There are already some third-party PBS solutions available, such as the MEV-boots developed by Flashbots, which is a short-term implementation solution for Ethereum (PoS). In the future, PBS will be included in Ethereum’s protocol and will become a mandatory enforcement feature.</p>
<h3 id="31-mev-boost">3.1 MEV-Boost</h3>
<p>MEV-Boost is a PBS implementation developed by Flashbots for Ethereum (PoS). MEV-Boost is used as a sidecar for consensus clients, and validators can run it to build a trust bridge with builders. After running MEV-Boost, the market process changes as shown in Figure 2. First, the Builder receives bundles from the Searcher and selects some bundles to form a block based on its own strategy. The Builder then sends the block to relays. MEV-Boost selects the most profitable block from the relay and returns it to the Proposer (validator). In this process, Relay serves as a two-way communication channel between Builder and Proposer. It can connect to one or more builders and verify the validity and bidding of the blocks submitted by Builder. For the Proposer, one or more relays can be run to select the most profitable block and make a proposal.</p>

<div class="figure center">
  
    <a class="fancybox" href="/images/post1_pic/fig2.png" title="Figure 2 The role of MEV-Boost; Source: https://docs.flashbots.net/flashbots-MEV-Boost/introduction" data-fancybox="group:travel">
  
    <img class="fig-img" src="/images/post1_pic/fig2.png" style="height: 300px;" alt="Figure 2 The role of MEV-Boost; Source: https://docs.flashbots.net/flashbots-MEV-Boost/introduction" />
  
    </a>
  
   
    <span class="caption">Figure 2 The role of MEV-Boost; Source: https://docs.flashbots.net/flashbots-MEV-Boost/introduction</span>
  
</div>

<div style="clear:both;"></div>

<p>After the merge of Ethereum, the MEV-Boost market has developed rapidly. As shown in figure 3, at present, 90% of the blocks come from relays. Flashbots relay was dominant after the merge, but after February 2023, other relays gradually expanded. Builder shares also have a similar trend. Compared with the early stage of Ethereum merge, the current competition is more open. Therefore, the risk of centralization dominated by Flashbots that everyone worried about at the beginning of the merge is gradually easing. Since the MEV-Boost relies on relays, how to guarantee the existence of malicious relays is an issue to be discussed, e.g. by introducing Relay Monitor to ensure that relays are trusted</p>

<div class="figure center">
  
    <a class="fancybox" href="/images/post1_pic/fig3.png" title="Figure 3 Total slot share of Relays and builders; Source: https://mevboost.pics/;" data-fancybox="group:travel">
  
    <img class="fig-img" src="/images/post1_pic/fig3.png" style="height: 200px;" alt="Figure 3 Total slot share of Relays and builders; Source: https://mevboost.pics/;" />
  
    </a>
  
   
    <span class="caption">Figure 3 Total slot share of Relays and builders; Source: https://mevboost.pics/;</span>
  
</div>

<div style="clear:both;"></div>

<h3 id="32--in-protocol-pbs">3.2  In-protocol PBS</h3>
<p>In MEV-Boost, the relay acts as an intermediary between the Proposer and Builder and is responsible for storing the block content. If the relay is malicious, both the Proposer and Builder will be harmed. Therefore, in MEV-Boost, both Builder and Proposer need to trust the relay. However, in-protocol PBS directly adds the Relay role to the Ethereum protocol, and Proposer and Builder no longer need to trust third parties. If either Proposer or Builder violates the rules, they will be directly punished by the protocol itself. For example, if Builder does not disclose block content, Builder still has to pay the bidding fee to Proposer. This will be enforced by the Ethereum protocol and is something that MEV-Boost cannot achieve.</p>

<div class="figure center">
  
    <a class="fancybox" href="/images/post1_pic/fig4.png" title="Figure 4 crList in In-protocol PBS; Source: https://notes.ethereum.org/@hww/workshop_feb_2022" data-fancybox="group:travel">
  
    <img class="fig-img" src="/images/post1_pic/fig4.png" style="height: 200px;" alt="Figure 4 crList in In-protocol PBS; Source: https://notes.ethereum.org/@hww/workshop_feb_2022" />
  
    </a>
  
   
    <span class="caption">Figure 4 crList in In-protocol PBS; Source: https://notes.ethereum.org/@hww/workshop_feb_2022</span>
  
</div>

<div style="clear:both;"></div>

<p>In the future, Dank-Sharding will also rely on PBS solutions because Dank-Sharding has strong computing power and bandwidth requirements for participant nodes (32-64 core CPUs, 2.5Gbit/s bandwidth). Under the PBS solution, these burdens will naturally be borne by builders with powerful computing power. The proposer&rsquo;s burden will not increase, nor will it be centralized. Therefore, in-protocol PBS also conforms to Ethereum’s future development direction Censorship Resistance List (crList) is a term that needs to be mentioned in In-protocol PBS (Figure 4). Proposer has the right to specify a transaction list, and Builder can only choose to package and sort crList; after winning the auction, Builder needs to prove that all transactions in crList have been included, otherwise the block will be considered invalid. This means that packagers cannot insert their own private transactions to obtain MEV, nor can they intentionally reject a transaction.</p>
<h2 id="4-noteworthy-issues">4. Noteworthy Issues</h2>
<ul>
<li>
<p><strong>Decentralization of Builder</strong></p>
<p>Private Order Flow can lead builders to become centralized. Private Order Flow refers to the situation where users directly submit transactions to specific builders instead of the public network. In order to gain more benefits, some builders will directly purchase from wallet merchants or basic service institutions that control order flow, causing other resource-lacking builders to lose competitiveness. Therefore, in this context, decentralized builders are necessary because they will make the entire ecosystem more stable, provide stronger security guarantees, and reduce trust requirements. However, it is also worth considering whether decentralized builders have the ability to compete with centralized builders. On the other hand, designing builders for decentralization will also increase costs</p>
</li>
<li>
<p><strong>Trust between Builder and searcher</strong></p>
<p>PBS makes it possible for Proposer and Builder to complete their respective work without trusting each other. However, the interaction between the Searcher and Builder still needs to be based on trust. Therefore, there are also some decentralized solutions for builders, such as introducing the Aggregator role using TEE (Trusted Execution Environment) technology to replace builders. In this case, Aggregator can be regarded as a trusted robot, and the searcher directly submits the bundle to Aggregator. However, even in this case, the Proposer may privately reach an agreement with the Aggregator operator to obtain block content. Therefore, simply using the Aggregator is not enough, and more review measures are needed in this case</p>
</li>
<li>
<p><strong>Trust between Builder and searcher</strong>
Currently, there are also discussions about the implementation of in-protocol PBS, and the most discussed ones are Single Slot PBS (Figure 5) and Two Slot PBS (Figure 6). Single Slot PBS is similar to replacing the Relay role in MEV-Boost with a decentralized Committee: the Committee keeps the block content, and after winning the bid, the Committee broadcasts the complete block content together with the Builder. Two Slot PBS adds an Intermediate Block to store block content separately. Two Slot PBS is more decentralized, but less efficient because two slots mean the effective block time is extended to 24 seconds (one slot = 12 seconds). Single Slot PBS has a simple structure similar to MEV-Boost, but it is challenging to use cryptographic technology within the protocol because Ethereum’s protocol has not yet used encryption technology internally.</p>

     
      
      
      
      
        
          
        
      
        
          
        
      
        
      
    
     
      
      
      
      
        
      
        
          
        
      
    
    <div class="figure center">
      
        <a class="fancybox" href="/images/post1_pic/fig5.png" title="Figure 5 Single slot PBS; Source: https://ethresear.ch/t/single-slot-pbs-using-attesters-as-distributed-availability-oracle/11877" data-fancybox="group:travel">
      
        <img class="fig-img" src="/images/post1_pic/fig5.png" style="height: 200px;" alt="Figure 5 Single slot PBS; Source: https://ethresear.ch/t/single-slot-pbs-using-attesters-as-distributed-availability-oracle/11877" />
      
        </a>
      
       
        <span class="caption">Figure 5 Single slot PBS; Source: https://ethresear.ch/t/single-slot-pbs-using-attesters-as-distributed-availability-oracle/11877</span>
      
    </div>
    
      <div style="clear:both;"></div>

<p><img src="/fig6.png" alt="" />

     
      
      
      
      
        
          
        
      
        
          
        
      
        
      
    
     
      
      
      
      
        
      
        
          
        
      
    
    <div class="figure center">
      
        <a class="fancybox" href="/images/post1_pic/fig6.png" title="Figure 6 Two Slot PBS; Source:  https://ethresear.ch/t/two-slot-proposer-Builder-separation/10980" data-fancybox="group:travel">
      
        <img class="fig-img" src="/images/post1_pic/fig6.png" style="height: 200px;" alt="Figure 6 Two Slot PBS; Source:  https://ethresear.ch/t/two-slot-proposer-Builder-separation/10980" />
      
        </a>
      
       
        <span class="caption">Figure 6 Two Slot PBS; Source:  https://ethresear.ch/t/two-slot-proposer-Builder-separation/10980</span>
      
    </div>
    
      <div style="clear:both;"></div>
</p>
</li>
</ul>
<h2 id="5conclusion">5.Conclusion</h2>
<p>PBS can reduce the risk of centralization of validators caused by MEV incentives, allowing more proposers to participate in the market. After the merge, MEV-Boost has developed rapidly, but relay as the core function of MEV-Boost has also brought certain risks, such as malicious relays and easy external attacks. IN-protocol-PBS will build PBS into the protocol, but specific implementation plans and issues such as Builder centralization are still under discussion. In summary, PBS is critical for MEV and the Ethereum ecosystem, but, as an emerging concept, how to avoid other negative effects while achieving PBS’s own goals still requires more discussion and practice.</p>]]></content><author><name>y7lee</name></author><category term="defi" /><category term="ethereum mev pbs proposer-builder" /><summary type="html"><![CDATA[The idea of Proposer / Builder Separation (PBS) is to split validators into two roles, Builder and Proposer, to mitigate MEV’s negative impact.]]></summary></entry><entry><title type="html">Appchain and smartcontract</title><link href="https://y7lee.github.io/posts/appchain-vs-smartcontract/" rel="alternate" type="text/html" title="Appchain and smartcontract" /><published>2023-04-07T00:00:00+00:00</published><updated>2023-04-07T00:00:00+00:00</updated><id>https://y7lee.github.io/posts/appchain-vs-smartcontract</id><content type="html" xml:base="https://y7lee.github.io/posts/appchain-vs-smartcontract/"><![CDATA[<h1 id="what-is-application-specific-blockchainappchain">what is Application-Specific Blockchain(AppChain)</h1>
<p>[reference]</p>
<ul>
<li><a href="https://medium.com/iosg-ventures/dydx-is-running-away-the-battle-between-appchain-and-rollup-75953337d18e">https://medium.com/iosg-ventures/dydx-is-running-away-the-battle-between-appchain-and-rollup-75953337d18e</a></li>
<li><a href="https://coinmarketcap.com/alexandria/article/what-is-an-application-specific-blockchain-appchain">https://coinmarketcap.com/alexandria/article/what-is-an-application-specific-blockchain-appchain</a></li>
<li></li>
</ul>]]></content><author><name>y7lee</name></author><category term="layer2" /><category term="layer2 appchain rollup scalability" /><summary type="html"><![CDATA[应用链与智能合约的架构对比与取舍]]></summary></entry></feed>