Back to Blog

Loopring (LRC) プロトコルインシデント

Code Auditing
December 3, 2020
5 min read

Hash(ti)(mod2248)=[b0,b1,,b247]T,where bi{0,1}\text{Hash}(t_i) \pmod{2^{248}} = [b_0, b_1, \dots, b_{247}]^T, where\ b_i \in \{0, 1\}

2020年11月、LoopringのLRC Protocol Fee Vaultにおける重大な脆弱性により、攻撃者はアクセス制御の不備を悪用し、フラッシュローン攻撃を通じてトークン価格を操作することが可能になりました。この事件は、堅牢なアクセス制御と継続的なDeFiセキュリティ監視の重要性を浮き彫りにし、高額な悪用を防ぐために不可欠です。

Loopring (LRC) プロトコルインシデントの概要

2020年後半、Pickle Financeや88mphを含む複数のEthereumベースのDeFiプラットフォームでセキュリティインシデントが発生しました。このような脆弱性を検出するため、BlockSecはThunderForecastシステムを開発し、異常に大きな取引レート差と同一の外部所有アカウント(EOA)による一貫したEtherゲインを伴う疑わしいトランザクションを特定しました。

EthScopeシステムを使用してこれらのトランザクションを分析した結果、LoopringのVaultプロトコル、特にLRC Protocol Fee Vault(LRCPFV)の脆弱性を標的とした悪用を発見しました。このブログ記事では、攻撃、その影響、およびDeFiセキュリティコミュニティが学んだ教訓について詳述します。


LRC Protocol Fee Vaultの概要

LoopringはEthereum上のオープンソース分散型取引所(DEX)プロトコルです。そのネイティブトークンであるLRC(ERC-20)は、エコシステム内で使用されます。LRC Protocol Fee Vault(LRCPFV)として知られるLoopringのVaultプロトコルは、プロトコル手数料を保存し、スワップ手数料をLRCトークンに交換することを可能にします。

LRCPFVの脆弱な関数はsellTokenForLRCであり、これは適切なアクセス制御なしにトークンをLRCと交換することを可能にし、誰でも呼び出すことができます。

function sellTokenForLRC(
    address token,
    uint amount
)
    external
    nonReentrant
{
    require(amount > 0, "ZERO_AMOUNT");
    require(token != lrcAddress, "PROHIBITED");

    address recipient = tokenSellerAddress == address(0) ? owner : tokenSellerAddress;

    if (token == address(0)) {
        recipient.sendETHAndVerify(amount, gasleft());
    } else {
        token.safeTransferAndVerify(recipient, amount);
    }

    require(
        tokenSellerAddress == address(0) ||
        ITokenSeller(tokenSellerAddress).sellToken(token, lrcAddress),
        "SELL_FAILURE"
    );

    emit TokenSold(token, amount);
}

この関数にはアクセス制御が欠けているため、攻撃者は繰り返し呼び出してトークン価格を操作し、裁定取引の機会から利益を得ることができました。


攻撃の詳細

代表的な攻撃トランザクション:0x00b2c...を分析しました。攻撃は6つの主要なステップで構成されていました。

  1. フラッシュローン: フラッシュローンプロバイダー(0xEB7e...)から3,773.88 ETHを借入。
  2. 初期スワップ: Uniswap V1-LRCで3,773.88 ETHを5,014.68 LRCに交換(レート:1 ETH = 1.32878 LRC)。
  3. フィーVaultスワップ: LRCPFVに保存されている0.231 ETHのフィーを、脆弱なsellTokenForLRC関数を呼び出すことで0.000219 LRCにスワップ。この不正な呼び出しにより、Uniswap上のLRC価格が操作され、ETHに対する価値が劇的に上昇しました(1 ETH = 0.00094 LRC)。
  4. 利益スワップ: Uniswap V1-LRCで5,014.68 LRCを3,774.09 ETHに再度スワップし、操作された価格により0.215 ETHの追加利益を得ました。
  5. ローン返済: 3,773.88 ETHのフラッシュローンを返済。
  6. 利益送金: 得られた0.215 ETHの利益を攻撃者のEOAに送金。

この悪用は、フラッシュローン攻撃と価格操作、およびVaultコントラクトにおけるアクセス制御の欠如を組み合わせて利用しました。


攻撃の影響と規模

分析されたトランザクションは2020年10月13日に発生しました。CoinGeckoのデータによると、当時のLRC価格は約0.0005175 ETHでした。

私たちの調査により、以下のことが明らかになりました。

  • 悪意のあるコントラクト: 攻撃者によって3つデプロイ(0xa896...0x414a...0xd91d...)。
  • 攻撃ボリューム: LRCPFVがデプロイされたブロック9,644,449以降、攻撃者のEOA(0x81e8...)によって90件のトランザクションが実行されました。
  • 最大利益: 1件のトランザクション(0x33eab...)で9.89 ETHの利益が発生しました。
  • 総利益: 約80.97 ETH(2020年10月1日時点の約48,849 USD)。

根本原因は、sellTokenForLRC関数におけるアクセス制御の欠如であり、繰り返し悪用を可能にしていました。


Phalcon Securityで始めましょう

あらゆる脅威を検知し、重要なアラートを発し、攻撃をブロックします。

今すぐ無料で試す

学んだ教訓と終わりに

Ethereum DeFiエコシステムが成長するにつれて、アクセス制御の脆弱性のようなセキュリティ上の課題はますます重要になっています。著名な攻撃が注目を集めることが多いですが、目立たない脆弱性も、このインシデントで示されたように、重大な経済的損失を引き起こす可能性があります。

Loopringはこの悪用により約80.97 ETHを失い、厳格なスマートコントラクト監査と継続的なセキュリティ監視の必要性を強調しました。

DeFiプロトコルにとって、厳格なアクセス制御の実装、BlockSecのスマートコントラクト監査Phalcon Securityのようなツールの活用、およびプロアクティブなリスク管理は、デジタル資産を保護するために不可欠です。


MetaSleuth調査を探る

フローを追跡し、調査のための証拠を構築する

今すぐ無料で試す

インシデントのタイムライン

  • 2020/11/30: ThunderForecastが疑わしいトランザクションを検出。
  • 2020/12/01: EthScopeを使用して詳細な分析を完了。
  • 2020/12/02: Loopringチームに脆弱性を報告。
  • 2020/12/03: 脆弱性を確認し、修正を実装。
  • 2020/12/03: インシデントの詳細を公開。
  • 2021/01/03: CVE-2020-35962が脆弱性に割り当てられました。

参照資料とさらに読む

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