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

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

2020年11月、イーサリアム上の多くのDeFiプラットフォームで、Pickle Finance88mphなどのセキュリティインシデントが発生しました。

DeFiで発生したセキュリティインシデントを検知するために、私たちはThunderForecastシステムを開発しました。最近のトランザクションを分析する際に、極めて疑わしいトランザクションのクラスを発見しました。まず、取引レートの差が千倍以上ある取引のペアが存在します。次に、呼び出し元(EOA)は、各トランザクションの最後に常に少量のEtherを獲得できます。私たちは、私たちの研究チームが開発したEthScopeシステムを使用してこれらのトランザクションを分析し、これがアービトラージ目的でLoopringのVaultプロトコルの脆弱性を悪用した攻撃であることを発見しました。

LRCプロトコル手数料Vault

Loopringは、イーサリアムブロックチェーン上の分散型取引所(DEX)のためのオープンソースプロトコルです。対応するLRCは、Loopringのトークン(ERC-20)です。さらに、Loopringはプロトコルの手数料を保管するための特定のVaultプロトコル(LRC Protocol Fee Vault)を持っています。以下では、略称LRCPFVを使用します。

    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);
    }

sellTokenForLRCはLRCPFV内の関数です。この関数により、ユーザーはプールから手数料をLRCトークンにスワップできます。しかし、開発者によってsellTokenForLRCにアクセス制御が設計されていないため、誰でもこの関数を呼び出すことができます。最終的に、この脆弱性を悪用することで、攻撃者は同じロジックで一連の攻撃を開始する機会を得ます。攻撃の詳細については、以下で分析します。

詳細

攻撃トランザクション0x00b2c...を用いて、この攻撃のより詳細な情報を明らかにします。

これには6つのステップが含まれます。

  • ステップ1:0xEB7e...から3773.88 ETHのフラッシュローンを借り入れます。

  • ステップ2:Uniswap V1-LRCで3773.88 ETHを5014.68 LRCにスワップします。この取引のレートは1 ETH = 1.32878 LRCです。

  • ステップ3:LRCFVに保管されている0.231 ETHの手数料を、sellTokenForLRCを呼び出すことによってUniswap V1-LRCプールで0.000219 LRCにスワップします(前述の通り、攻撃者はsellTokenForLRCを呼び出すべきではありません)。しかし、Uniswap V1-LRCで使用されている価格計算アルゴリズムに基づき、Uniswap V1-LRCでのLRCとETHの価格は劇的に上昇します。この取引のレートは1 ETH = 0.00094 LRCです。

  • ステップ4:Uniswap V1-LRCで5014.68 LRCを3774.09 ETHにスワップします。ステップ3に基づき、Uniswap V1-LRCでスワップされたLRCはわずかです。このアクションにより、Uniswap V1-LRCでのETHに対するLRCの価値が高まります。したがって、ステップ1と比較して、攻撃者はUniswap V1-LRCで5014.68 LRCをスワップして3773.88 ETHを獲得し、追加で0.215 ETHの利益を得ます。

  • ステップ5:3773.88 ETHのフラッシュローンを返済します。

  • ステップ6:0.215 ETHを攻撃者のアドレス(EOA)に送信します。

損益

分析されたトランザクションは2020年10月13日に実行されました。攻撃者と被害者の双方の粗いながらも説明可能な損益を計算するために、coingeckoを使用してLRCの価格(0.0005175 ETH)を取得します。一方、LRCPFV。

攻撃者はステップ4で価格を操作し、2回の取引で0.215 ETHの利益を得ます。

攻撃の規模

攻撃の特徴に基づき、攻撃者0x81e8...によってローンチされた3つのデプロイされた悪意のあるコントラクト(0xa896...0x414a...0xd91d...)と90のトランザクションを検知しました(LRCPFVがデプロイされたブロック9644449以降。例えば、トランザクション0x33eab...での最大の利益は9.89 ETHに達しました)。最終的に、攻撃者は合計80.97 ETHをアービトラージし、これは2020年10月1日時点の価格に基づき48,849.2 USDに相当します。

終わりに

イーサリアムでのDeFiエコシステムの発展に伴い、様々なセキュリティ問題が徐々に顕在化しています。しかし、コミュニティは、莫大な金銭的損失をもたらす攻撃に容易に惹きつけられがちですが、目立たない攻撃も見過ごされがちです。実際、この攻撃の根本原因であるアクセス制御は、90件のトランザクションをローンチすることによってLoopringに相当な損失(80.97ETH)をもたらしました。

タイムライン

  • 2020/11/30:疑わしいトランザクションが発見されました。
  • 2020/12/01:分析を完了しました。
  • 2020/12/02:loopringに報告しました。
  • 2020/12/03:脆弱性が確認され、修正がオンラインになりました。
  • 2020/12/03:詳細が公開されました。
  • 2021/01/03:CVE-2020–35962が割り当てられました。
Sign up for the latest updates
Weekly Web3 Security Incident Roundup | Feb 9 – Feb 15, 2026

Weekly Web3 Security Incident Roundup | Feb 9 – Feb 15, 2026

During the week of February 9 to February 15, 2026, three blockchain security incidents were reported with total losses of ~$657K. All incidents occurred on the BNB Smart Chain and involved flawed business logic in DeFi token contracts. The primary causes included an unchecked balance withdrawal from an intermediary contract that allowed donation-based inflation of a liquidity addition targeted by a sandwich attack, a post-swap deflationary clawback that returned sold tokens to the caller while draining pool reserves to create a repeatable price-manipulation primitive, and a token transfer override that burned tokens directly from a Uniswap V2 pair's balance and force-synced reserves within the same transaction to artificially inflate the token price.

Top 10 "Awesome" Security Incidents in 2025

Top 10 "Awesome" Security Incidents in 2025

To help the community learn from what happened, BlockSec selected ten incidents that stood out most this year. These cases were chosen not only for the scale of loss, but also for the distinct techniques involved, the unexpected twists in execution, and the new or underexplored attack surfaces they revealed.

#10 Panoptic Incident: XOR Linearity Breaks the Position Fingerprint Scheme

#10 Panoptic Incident: XOR Linearity Breaks the Position Fingerprint Scheme

On August 29, 2025, Panoptic disclosed a Cantina bounty finding and confirmed that, with support from Cantina and Seal911, it executed a rescue operation on August 25 to secure roughly $400K in funds. The issue stemmed from a flaw in Panoptic’s position fingerprint calculation algorithm, which could have enabled incorrect position identification and downstream fund risk.