Back to Blog

現実における価格操作攻撃(再び):RariCapital事件

Code Auditing
May 9, 2021
5 min read

5月8日、PeckshieldはRariCapitalに関するセキュリティインシデントを報告しました。慎重な調査の結果、これは我々の論文で説明されている価格操作攻撃(間接的なもの)の一種であることが判明しました:DeFiRanger: Detecting Price Manipulation Attacks on DeFi Applications。この論文では、直接的および間接的な価格操作攻撃を含む、DeFiアプリケーションに対する2種類の新しい攻撃の検出に焦点を当てています。前者とは、攻撃者が脆弱なDeFiアプリを攻撃することで、同じDEXで望ましくない取引を実行することにより、DEX内のトークン価格を直接操作することを意味します。後者とは、攻撃者が脆弱なDeFiアプリのトークン価格を間接的に操作することを意味します。このセキュリティインシデントは、間接的な価格操作攻撃の一例です。

原因

攻撃の根本原因を分析した結果、不確実な価格依存性が原因であることが判明しました。具体的には、RariのLPトークンの価格は、Rariが保有するLPトークン(ibEth)の価値(Ether建て)に依存しています。残念ながら、ibEth LPトークンの価格は、攻撃者がibEthのwork関数を呼び出すことによって操作される可能性があります。

Rariが保有するRariトークン価値 = Rari内のETH準備金 * Rariトークン数/Rariトークン総供給量

Rariが保有するibEthトークン価値 = ibEth内のETH準備金 * ibEthトークン数/ibEthトークン総供給量

Rari内のETH準備金は、ibEthが保有するibEthトークン価値に影響を受けます。これは、攻撃者がibEth内のETH準備金を増やすこと(work関数を呼び出すこと)によって操作されます。

我々のシステムDefiRangerを使用すると、図に示されているDeFiのセマンティクスを容易に復元できます。流動性マイニング(LPトークンを取得するためにEtherを預ける)と流動性キャンセル(Etherを取得するためにLPトークンを引き出す)におけるLPトークンの数は、同じEther量(緑色の背景)に対して異なります(赤い円で囲まれています)。

攻撃プロセス

攻撃プロセスを以下のステップで示します。

1)攻撃者はibEthのwork関数を呼び出します。 2)この関数はSushiswapGoblin.work関数を呼び出し、さらに攻撃者が制御するコントラクト(0x2f755e8980f0c2e81681d82cccd1a4bd5b4d5d46)を呼び出します。

3)コントラクトはまず、Rariに58903.4755276693 Ether(フラッシュローンから借り入れたもの)を預け入れ、RariのLPトークン(146281892117489076580650)を取得します。 4)攻撃者は3818.9022134987213 EtherをibEthに転送します。これは、ibEth LPトークンの価格を上昇させる(その総供給量には影響を与えずに)重要なステップであり、これによりRariのLPトークンの価格もさらに影響を受けます。これは、Rariのプール内の総Ether準備金が、保有するibEth LPトークンの価格上昇により増加するためです。なお、攻撃者は流動性を追加することによってRariまたはibEthのトークン価格を操作することはできません。なぜなら、それによってもトークンの総供給量が増加してしまうからです。 5)攻撃者はEtherを引き出します。Rariトークンの価格が高くなっているため、攻撃者は(146281892117489076580650ではなく)より少ないRari LPトークンを使用して、同じ量のEtherを取得し、フラッシュローンを返済することができます。

6)攻撃者はwork関数の終了時に返還されたEtherを取得します。

まとめ

結論として、RariCapitalが直面したセキュリティ侵害は、DeFiアプリケーションに潜む洗練された脅威を鮮明に思い起こさせます。巧妙な悪用戦略を通じて、攻撃者は間接的な価格操作攻撃を実行しました。このインシデントは、スマートコントラクトにおける不確実な価格依存性の使用に関連する重大な脆弱性を明らかにしました。この攻撃は、DeFiプロジェクトが、成長するDeFiエコシステムの完全性とセキュリティを脅かす直接的および間接的な操作戦術から保護するために、DeFiRangerのような堅牢な検出システムを採用する必要性を緊急に示しています。

BlockSecについて

BlockSecは、2021年に世界的に著名なセキュリティ専門家グループによって設立された、先駆的なブロックチェーンセキュリティ企業です。同社は、Web3の世界の普及を促進するために、新しいWeb3の世界のセキュリティと使いやすさを向上させることに専念しています。この目的のために、BlockSecはスマートコントラクトおよびEVMチェーンのセキュリティ監査サービス、セキュリティ開発および脅威のプロアクティブなブロックのためのPhalconプラットフォーム、資金追跡および調査のためのMetaSleuthプラットフォーム、そして仮想通貨の世界を効率的にサーフィンするためのWeb3ビルダー向けのMetaDock拡張機能を提供しています。

現在までに、同社はMetaMask、Uniswap Foundation、Compound、Forta、PancakeSwapなどの300以上の著名なクライアントにサービスを提供しており、Matrix Partners、Vitalbridge Capital、Fenbushi Capitalなどの著名な投資家から2回の資金調達ラウンドで数千万米ドルを受け取っています。

公式ウェブサイト:https://blocksec.com/

公式Twitterアカウント:https://twitter.com/BlockSecTeam

Sign up for the latest updates
The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis
Security Insights

The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis

This BlockSec deep-dive analyzes the KelpDAO $290M rsETH cross-chain bridge exploit (April 18, 2026), attributed to the Lazarus Group, tracing a causal chain across three layers: how a single-point DVN dependency enabled the attack, how DeFi composability cascaded the damage through Aave V3 lending markets to freeze WETH liquidity exceeding $6.7B across Ethereum, Arbitrum, Base, Mantle, and Linea, and how the crisis forced decentralized governance to exercise centralized emergency powers. The article examines three parameters that shaped the cascade's severity (LTV, pool depth, and cross-chain deployment count) and provides an exclusive technical breakdown of Arbitrum Security Council's forced state transition, an atomic contract upgrade that moved 30,766 ETH without the holder's signature.

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026

This BlockSec weekly security report covers four attack incidents detected between April 13 and April 19, 2026, across multiple chains such as Ethereum, Unichain, Arbitrum, and NEAR, with total estimated losses of approximately $310M. The highlighted incident is the $290M KelpDAO rsETH bridge exploit, where an attacker poisoned the RPC infrastructure of the sole LayerZero DVN to fabricate a cross-chain message, triggering a cascading WETH freeze across five chains and an Arbitrum Security Council forced state transition that raises questions about the actual trust boundaries of decentralized systems. Other incidents include a $242K MMR proof forgery on Hyperbridge, a $1.5M signed integer abuse on Dango, and an $18.4M circular swap path exploit on Rhea Finance's Burrowland protocol.

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026

This BlockSec weekly security report covers four DeFi attack incidents detected between April 6 and April 12, 2026, across Linea, BNB Chain, Arbitrum, Optimism, Avalanche, and Base, with total estimated losses of approximately $928.6K. Notable incidents include a $517K approval-related exploit where a user mistakenly approved a permissionless SquidMulticall contract enabling arbitrary external calls, a $193K business logic flaw in the HB token's reward-settlement logic that allowed direct AMM reserve manipulation, a $165.6K exploit in Denaria's perpetual DEX caused by a rounding asymmetry compounded with an unsafe cast, and a $53K access control issue in XBITVault caused by an initialization-dependent check that failed open. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Best Security Auditor for Web3

Validate design, code, and business logic before launch. Aligned with the highest industry security standards.

BlockSec Audit