埋在GMX订单薄中的“不定时炸弹”:Keeper机制是否会引发内部作恶?

吴说区块链Published on 2022-12-01Last updated on 2022-12-01

Abstract

9 月 18 日,GMX 遭遇了价格操纵攻击,攻击者利用 GMX 的最小价差和 0 滑点的特性对 AVAX/USD 进行价格操纵,赚取了 56.5 万美元的 AVAX。

引言

9 月 18 日,GMX 遭遇了价格操纵攻击,攻击者利用 GMX 的最小价差和 0 滑点的特性对 AVAX/USD 进行价格操纵,赚取了 56.5 万美元的 AVAX。关于其中细节可以参考《如何利用 GMX 的交易机制进行价格操纵?外部攻击与内部作恶的方法分析》,此次攻击是“合理但恶意”地利用了 GMX 的交易机制,属于外部攻击。文章提到,除了外部攻击外,GMX 还存在潜在的内部攻击风险。

链茶馆文章:

https://mp.weixin.qq.com/s/kIcQ56uQM38KQ2_vW22d2A

关于 Keeper 机制所带来的作恶隐患,详细分析如下:

https://im0xalpha.notion.site/GMX-A-Can-Be-Evil-AMM-bf22717230864f458e94fc5482e304ff

GMX 依赖于一个集中的喂价机制,即“Keeper”,它完全由团队控制。

Keeper 决定了所有的交易价格,因此可以随心所欲地使任何一方(交易者和 LP)受损或受益。

有了 Keeper 的绝对权力,GMX 很容易作恶,甚至比任何中心化的交易所更容易。

# 细节中的魔鬼:GMX 的 Keeper

最近 GMX 遭遇的价格操纵攻击使我们注意到了 GMX 的 Keeper 机制。事实上,外部操纵的攻击并不是最大的问题,因为外部操纵是一个可预防的问题。但 Keeper 所带来的的内部操纵隐患是没有办法避免的(甚至没有办法发现它)。

在 GMX 上交易存在两个步骤:

1. 下单。在这一步中,除了常规的交易费用外,你还需要支付额外的 ETH/AVAX(称为执行费),以便 Keeper 执行你的交易。

2. Keeper 以所谓的预言机价格执行你的订单,该价格完全由 Keeper 决定。

这个细节中存在魔鬼:此 Keeper 不属于任何链上或透明机制。相反,它是一个由 GMX 拥有的地址签署的程序,并在 GMX 自己的集中式服务器上运行。而 Keeper 的核心作用不仅仅是执行订单,也是决定交易价格。在非常弱的约束条件下,Keeper 可以直接用它选择的任何价格执行你的交易。而正是这个弱约束也只会让交易员的价格变得更糟(https://www.notion.so/47fc5ed832e243afb9e97e8a4a036353,与 ChainLink 价格的偏差大于 2.5% 将触发买卖价差)。

# 如何作恶?

非常简单!

由于每笔交易的交易价格完全由 Keeper 决定,运行 Keeper 的人可以做任何他们想做的事情。例如,按其意愿提供有利于或不利于交易者的价格,通过为交易提供不好的价格(长线交易的价格较高,短线交易的价格较低),从每笔交易中获利是非常方便的。

而这可以以一种非常秘密的方式进行:Keeper 只需要使价格比公平价值稍差(例如高出或低于 0.1%),这样就很难注意到。那么大量的利润(0.1% 的交易量)就会从交易中被偷走。

你可能认为这种偷窃对 LP 有利。在这种特殊情况下,确实如此。但有了这样的绝对权力,从 LP 那里偷窃也同样容易。Keeper 只需要用优于公平的价格(多头交易的价格较低,或空头交易的价格较高)喂养其附属账户,就可以将利润转移到这个账户。这一点非常容易理解:如果攻击中的外部操纵者(https://www.binance.com/en/news/top/7204043)可以通过操纵价格来源使他们的账户受益,那么 Keeper 通过直接操纵价格使特定账户受益只会更直接。唯一的区别是,前者是以中心化交易所(即 Binance)的价格为成本的,而后者则是零成本。而且,这也可以通过保持足够小的偏差来避开外界关注,同时又能非常隐蔽地获利。

这种交易机制是如此不透明,以至于比任何基于订单簿的中心化交易所更容易作恶。对于后者,你通过查看订单簿上的报价,提前对你的交易价格有一个合理清晰的预期。如果报价不公平,你可以选择不交易。相比之下,在 GMX 上,交易完全掌握在 Keeper 手中。

# 他们是否已经作恶?

从技术上讲,答案是我们不知道,因为这没有办法从外部验证。

然而,当你问出这个问题,你可能已经忽略了重点。从“不作恶”转换为“不能作恶”是加密世界的基本价值之一,也是重大的进步。一个依靠权力所有者的善意而运作的系统不应该属于这个世界。

无论一个“能作恶”的项目如何声称他们不会作恶,都不应该给予信任。这不是 Web3 的工作方式!

# 作恶成本有多大

分析师 @NintendoDoomed 对 GMX 的作恶成本进行了分析。

通过操纵价格发动攻击的可能性是存在的,在其他协议上也发生过,但是攻击成本比大多数人想的要高。GMX 有千分之一的交易费用,一笔交易开平仓就有千分之二的费用,因此在操纵预言机价格时,对价格的影响必须要大于千分之二才有意义。

对于 BTC 而言就是 $30+ 的价差,并不是一个小的数字。GMX 的预言机聚合了数个头部中心化交易所的价格,基本需要操纵整个市场的定价才能攻击GMX。对于 Avax 之类流动性较差的小币种可能是划算的,但是对于 BTC/ETH 则未必。此前有消息称有人操纵 AVAX 价格,这主要是因为 AVAX 流动性相对较差,操纵成本较低。因此,通过操作价格对 GMX 发动攻击目前只适用于流动性较差的 Token,但对于主流币暂时不会构成威胁。

此外,GMX 对于仓位规模有上限设置,开平仓都存在时间差,这进一步提升了攻击成本。这个上限是会低于 LP 存入对应 Token 的规模, 比如 LP 存入 ETH 有 $80M,那么 ETH Long Position 可能就会设置成 $50M,因此可以全额兑付。

https://twitter.com/NintendoDoomed/status/1597223938563919872

https://foresightnews.pro/article/detail/16360

Trending Cryptos

Related Reads

TechFlow Intelligence Bureau: Anthropic IPO Odds Exceed 80%, Iran Closes Strait of Hormuz Again, Triggering Oil Price Volatility

**Market Digest** **AI & Tech:** Anthropic is widely expected to announce an IPO before November 2026, raising questions about balancing its trillion-dollar valuation ambitions with its core "AI safety" mission. Brands are increasingly adopting AI-generated virtual influencers for marketing. Cloudflare introduced temporary accounts for AI agents to ease automation workflows. **Infrastructure & Hardware:** Google's IPv6 traffic surpassed 50%, marking a major internet milestone. Goldman Sachs warned that massive projected AI capital expenditure ($5.3T) is approaching credit saturation limits, potentially curbing the "AI arms race." **Space & Robotics:** SpaceX's IPO saw a historic $370M retail buying frenzy in three days. Hyundai Motor Group plans to acquire full ownership of Boston Dynamics. Elon Musk speculated about future "septillion-dollar" investments in antimatter for interstellar travel. **Energy & Geopolitics:** Iran's military announced another closure of the strategic Strait of Hormuz, accusing Israel of violating a ceasefire, causing oil market volatility. However, ship-tracking data indicated some traffic continued. Concurrently, Iran resumed crude loadings at Kharg Island, potentially releasing up to 20 million barrels to the market. **Finance & Macro:** A European CLO (collateralized loan obligation) experienced its first post-2008-crisis-era equity tranche default, raising alarms in credit markets. Nomura warned that new Federal Reserve Chair Wash's perceived hawkish debut speech could signal a significant policy shift. **The Undercurrent:** Seemingly disparate events—the Strait of Hormuz tension, the European CLO default, and warnings on AI spending—point to a tightening of global liquidity and rising marginal costs across energy, credit, and tech investment. Meanwhile, capital continues chasing grand narratives like space exploration and advanced AI, highlighting a divergence where old-world leverage frays as new-world stories grow more ambitious.

marsbit12h ago

TechFlow Intelligence Bureau: Anthropic IPO Odds Exceed 80%, Iran Closes Strait of Hormuz Again, Triggering Oil Price Volatility

marsbit12h ago

Trading

Spot
Futures

Hot Articles

What is $BITCOIN

DIGITAL GOLD ($BITCOIN): A Comprehensive Analysis Introduction to DIGITAL GOLD ($BITCOIN) DIGITAL GOLD ($BITCOIN) is a blockchain-based project operating on the Solana network, which aims to combine the characteristics of traditional precious metals with the innovation of decentralized technologies. While it shares a name with Bitcoin, often referred to as “digital gold” due to its perception as a store of value, DIGITAL GOLD is a separate token designed to create a unique ecosystem within the Web3 landscape. Its goal is to position itself as a viable alternative digital asset, although specifics regarding its applications and functionalities are still developing. What is DIGITAL GOLD ($BITCOIN)? DIGITAL GOLD ($BITCOIN) is a cryptocurrency token explicitly designed for use on the Solana blockchain. In contrast to Bitcoin, which provides a widely recognized value storage role, this token appears to focus on broader applications and characteristics. Notable aspects include: Blockchain Infrastructure: The token is built on the Solana blockchain, known for its capacity to handle high-speed and low-cost transactions. Supply Dynamics: DIGITAL GOLD has a maximum supply capped at 100 quadrillion tokens (100P $BITCOIN), although details regarding its circulating supply are currently undisclosed. Utility: While precise functionalities are not explicitly outlined, there are indications that the token could be utilized for various applications, potentially involving decentralized applications (dApps) or asset tokenization strategies. Who is the Creator of DIGITAL GOLD ($BITCOIN)? At present, the identity of the creators and development team behind DIGITAL GOLD ($BITCOIN) remains unknown. This situation is typical among many innovative projects within the blockchain space, particularly those aligning with decentralized finance and meme coin phenomena. While such anonymity may foster a community-driven culture, it intensifies concerns about governance and accountability. Who are the Investors of DIGITAL GOLD ($BITCOIN)? The available information indicates that DIGITAL GOLD ($BITCOIN) does not have any known institutional backers or prominent venture capital investments. The project seems to operate on a peer-to-peer model focused on community support and adoption rather than traditional funding routes. Its activity and liquidity are primarily situated on decentralized exchanges (DEXs), such as PumpSwap, rather than established centralized trading platforms, further highlighting its grassroots approach. How DIGITAL GOLD ($BITCOIN) Works The operational mechanics of DIGITAL GOLD ($BITCOIN) can be elaborated on based on its blockchain design and network attributes: Consensus Mechanism: By leveraging Solana’s unique proof-of-history (PoH) combined with a proof-of-stake (PoS) model, the project ensures efficient transaction validation contributing to the network's high performance. Tokenomics: While specific deflationary mechanisms have not been extensively detailed, the vast maximum token supply implies that it may cater to microtransactions or niche use cases that are still to be defined. Interoperability: There exists the potential for integration with Solana’s broader ecosystem, including various decentralized finance (DeFi) platforms. However, the details regarding specific integrations remain unspecified. Timeline of Key Events Here is a timeline that highlights significant milestones concerning DIGITAL GOLD ($BITCOIN): 2023: The initial deployment of the token occurs on the Solana blockchain, marked by its contract address. 2024: DIGITAL GOLD gains visibility as it becomes available for trading on decentralized exchanges like PumpSwap, allowing users to trade it against SOL. 2025: The project witnesses sporadic trading activity and potential interest in community-led engagements, although no noteworthy partnerships or technical advancements have been documented as of yet. Critical Analysis Strengths Scalability: The underlying Solana infrastructure supports high transaction volumes, which could enhance the utility of $BITCOIN in various transaction scenarios. Accessibility: The potential low trading price per token could attract retail investors, facilitating wider participation due to fractional ownership opportunities. Risks Lack of Transparency: The absence of publicly known backers, developers, or an audit process may yield skepticism regarding the project's sustainability and trustworthiness. Market Volatility: The trading activity is heavily reliant on speculative behavior, which can result in significant price volatility and uncertainty for investors. Conclusion DIGITAL GOLD ($BITCOIN) emerges as an intriguing yet ambiguous project within the rapidly evolving Solana ecosystem. While it attempts to leverage the “digital gold” narrative, its departure from Bitcoin's established role as a store of value underscores the need for a clearer differentiation of its intended utility and governance structure. Future acceptance and adoption will likely depend on addressing the current opacity and defining its operational and economic strategies more explicitly. Note: This report encompasses synthesised information available as of October 2023, and developments may have transpired beyond the research period.

414 Total ViewsPublished 2025.05.13Updated 2025.05.13

What is $BITCOIN

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of BTC (BTC) are presented below.

活动图片