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
~$15.9M Lost: Trusted Volumes & More | BlockSec Weekly
Security Insights

~$15.9M Lost: Trusted Volumes & More | BlockSec Weekly

This BlockSec bi-weekly security report covers 11 notable attack incidents identified between April 27 and May 10, 2026, across Sui, Ethereum, BNB Chain, Base, Blast, and Berachain, with total estimated losses of approximately $15.9M. Three incidents are analyzed in detail: the highlighted $1.14M Aftermath Finance exploit on Sui, where a signed/unsigned semantic mismatch in the builder-fee validation allowed an attacker to inject a negative fee that was converted into positive collateral during settlement; the $5.87M Trusted Volumes RFQ authorization mismatch on Ethereum; and the $5.7M Wasabi Protocol infrastructure-to-contract-control compromise across multiple EVM chains.

Newsletter - April 2026
Security Insights

Newsletter - April 2026

In April 2026, the DeFi ecosystem experienced three major security incidents. KelpDAO lost ~$290M due to an insecure 1-of-1 DVN bridge configuration exploited via RPC infrastructure compromise, Drift Protocol suffered ~$285M from a multisig governance takeover leveraging Solana's durable nonce mechanism, and Rhea Finance incurred ~$18.4M following a business logic flaw in its margin-trading module that allowed circular swap path manipulatio

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly
Security Insights

~$7.04M Lost: GiddyDefi, Volo Vault & More | BlockSec Weekly

This BlockSec weekly security report covers eight attack incidents detected between April 20 and April 26, 2026, across Ethereum, Avalanche, Sui, Base, HyperLiquid, and MegaETH, with total estimated losses of approximately $7.04M. The highlighted incident is the $1.3M GiddyDefi exploit, where the attacker did not break any cryptography or use a flash loan but simply replayed an existing on-chain EIP-712 signature with the unsigned `aggregator` and `fromToken` fields swapped out for a malicious contract, demonstrating how partial signature coverage turns any historical signature into a generic permit. Other incidents include a $3.5M Volo Vault operator key compromise on Sui, a $1.5M Purrlend privileged-role takeover, a $413K SingularityFinance oracle misconfiguration, a $142.7K Scallop cross-pool index injection, a $72.35K Kipseli Router decimal mismatch, a $50.7K REVLoans (Juicebox) accounting pollution, and a $64K Custom Rebalancer arbitrary-call exploit.

Best Security Auditor for Web3

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

BlockSec Audit