Back to Blog

Loopring(LRC) Protocol Incident

Code AuditingPhalcon SecurityMetaSleuth
December 3, 2020
4 min read
Key Insights

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\}

In November 2020, a critical vulnerability in Loopring’s LRC Protocol Fee Vault allowed attackers to exploit access control weaknesses and manipulate token prices via flash loan attacks. This incident highlights the importance of robust access control and continuous DeFi security monitoring to prevent costly exploits.

Introduction to the Loopring (LRC) Protocol Incident

In late 2020, several Ethereum-based DeFi platforms, including Pickle Finance and 88mph, experienced security incidents. To detect such vulnerabilities, BlockSec developed the ThunderForecast system, which identified suspicious transactions involving unusually large trade rate differences and consistent Ether gains by the same external owned account (EOA).

Using our EthScope system, we analyzed these transactions and discovered an exploit targeting a vulnerability in Loopring’s vault protocol, specifically the LRC Protocol Fee Vault (LRCPFV). This blog post details the attack, its impact, and lessons learned for the DeFi security community.


LRC Protocol Fee Vault Overview

Loopring is an open-source decentralized exchange (DEX) protocol on Ethereum. Its native token, LRC (ERC-20), is used within the ecosystem. Loopring’s vault protocol, known as the LRC Protocol Fee Vault (LRCPFV), stores protocol fees and allows swapping fees to LRC tokens.

The vulnerable function in LRCPFV is sellTokenForLRC, which enables swapping tokens for LRC without proper access control, allowing anyone to invoke it.

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

Because this function lacks access control, attackers could repeatedly invoke it to manipulate token prices and profit from arbitrage opportunities.


Details of the Attack

We analyzed a representative attack transaction: 0x00b2c.... The attack involved six key steps:

  1. Flash Loan: Borrowed 3,773.88 ETH from a flash loan provider (0xEB7e...).
  2. Initial Swap: Converted 3,773.88 ETH to 5,014.68 LRC on Uniswap V1-LRC at a rate of 1 ETH = 1.32878 LRC.
  3. Fee Vault Swap: Swapped 0.231 ETH fee stored in LRCPFV to 0.000219 LRC by invoking the vulnerable sellTokenForLRC function. This unauthorized call manipulated the LRC price on Uniswap, drastically increasing its value against ETH (1 ETH = 0.00094 LRC).
  4. Profitable Swap: Swapped 5,014.68 LRC back to 3,774.09 ETH on Uniswap V1-LRC, gaining an extra 0.215 ETH due to the manipulated price.
  5. Loan Repayment: Returned the 3,773.88 ETH flash loan.
  6. Profit Transfer: Sent the 0.215 ETH profit to the attacker’s EOA.

This exploit leveraged a flash loan attack combined with price manipulation and lack of access control in the vault contract.


Impact and Scale of the Attack

The analyzed transaction occurred on October 13, 2020. Using CoinGecko data, the LRC price was approximately 0.0005175 ETH at that time.

Our investigation uncovered:

  • Malicious Contracts: 3 deployed by the attacker (0xa896..., 0x414a..., 0xd91d...).
  • Attack Volume: 90 transactions launched by the attacker’s EOA (0x81e8...) since block 9,644,449, where LRCPFV was deployed.
  • Maximum Profit: One transaction (0x33eab...) yielded 9.89 ETH profit.
  • Total Profit: Approximately 80.97 ETH (~48,849 USD as of October 1, 2020).

The root cause was the missing access control in the sellTokenForLRC function, enabling repeated exploitation.


Get Started with Phalcon Security

Detect every threat, alert what matters, and block attacks.

Try now for free

Lessons Learned and The End

As the Ethereum DeFi ecosystem grows, security challenges such as access control vulnerabilities become increasingly critical. While high-profile attacks often grab attention, less conspicuous vulnerabilities can cause significant financial losses, as demonstrated by this incident.

Loopring lost approximately 80.97 ETH due to this exploit, emphasizing the need for rigorous smart contract audits and continuous security monitoring.

For DeFi protocols, implementing strict access control, leveraging tools like BlockSec’s Smart Contract Audit and Phalcon Security, and proactive risk management are essential to safeguard digital assets.


Explore MetaSleuth Investigation

Trace flows and build evidence for investigations

Try now for free

Timeline of the Incident

  • 2020/11/30: Suspicious transactions detected by ThunderForecast.
  • 2020/12/01: Completed detailed analysis using EthScope.
  • 2020/12/02: Reported vulnerability to Loopring team.
  • 2020/12/03: Vulnerability confirmed; fix implemented.
  • 2020/12/03: Public disclosure of incident details.
  • 2021/01/03: CVE-2020-35962 assigned to the vulnerability.

References and Further Reading

Sign up for the latest updates
FATF’s New Stablecoin Report Signals a Shift to Secondary-Market Compliance
Knowledge

FATF’s New Stablecoin Report Signals a Shift to Secondary-Market Compliance

BlockSec interprets FATF’s March 2026 report on stablecoins and unhosted wallets, explains why supervision is shifting toward secondary-market P2P activity, breaks down the report’s main recommendations and red flags, and shows how on-chain monitoring, screening, and cross-chain tracing can help issuers and VASPs respond with stronger, more effective compliance controls.

Weekly Web3 Security Incident Roundup | Mar 16 – Mar 22, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 16 – Mar 22, 2026

This BlockSec weekly security report covers seven DeFi attack incidents detected between March 16 and March 22, 2026, across Ethereum, BNB Chain, Polygon, and Polygon zkEVM, with total estimated losses of approximately $82.7M. The most significant event was the Resolv stablecoin protocol's infrastructure-key compromise, which led to over $80M in unauthorized USR minting and cross-protocol contagion across lending markets. Other incidents include a $2.15M donation attack combined with market manipulation on Venus Protocol, a $257K empty-market exploit on dTRINITY (Aave V3 fork), access control vulnerabilities in Fun.xyz and ShiMama, a weak-randomness exploit in BlindBox, and a redemption accounting flaw in Keom.

Weekly Web3 Security Incident Roundup | Mar 9 – Mar 15, 2026
Security Insights

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

This BlockSec weekly security report covers eight DeFi attack incidents detected between March 9 and March 15, 2026, across Ethereum and BNB Chain, with total estimated losses of approximately $1.66M. Incidents include a $1.01M AAVE incorrect liquidation caused by oracle misconfiguration, a $242K exploit on the deflationary token MT due to flawed trading restrictions, a $149K exploit on the burn-to-earn protocol DBXen from `_msgSender()` and `msg.sender` inconsistency, and a $131K attack on AM Token exploiting a flawed delayed-burn mechanism. 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

Get Real-Time Protection with Phalcon Security

Audits alone are not enough. Phalcon Security detects attacks in real time and blocks threats mid-flight.

phalcon security

Go Deeper with MetaSleuth Investigation

Extend your crypto compliance capabilities with Blocksec's MetaSleuth Investigation, the first platform for tracing funds, mapping transaction networks and revealing hidden on-chain relationships.

Move from detection to resolution faster with clear visual insights and evidence-ready workflows across the digital assets ecosystem.

MetaSleuth Investigation