Back to Blog

[Not All Tokens Are Good] The Quick Analysis of the Paraluni Attack

Code Auditing
March 13, 2022

The Paraluni project was attacked on the morning of March 13 (UTC +8 time). The attacker leveraged two vulnerabilities to attack the protocol. The first vulnerability is the lack of the verification of passed tokens, and the second is the traditional reentrancy. The attacker launched a couple of attack transactions. In the following, we will use one of them 0xf2bba649019ce40a67f0fb74e5e800257d359d9094b6ba6faea14ffa4d3446b1 to illustrate the whole attack process.

Step I: add liquidity to paraRouter

The attacker invoked addLiquidity to the BTCB-WBNB pool (index = 9) and the pool will mint the lp token to UBT (a token created by the attacker.) After this operation, the UBT token holds the pool's lp token. Note that, the BTCB and WBNB is borrowed from the flash loan.

Step II: invoke depositByAddLiquidity of MasterChef The attacker invoked depositByAddLiquidity by providing the _pid as 9 and using the UGT and UBT token as the parameters. However, the function does not check whether the pool’s reserve tokens are equal to the passed tokens (UGT and UBT).

Then the function invokes the depositByAddLiquidityInternal which then invokes addLiquidity of paraRouter. This function will invoke the UGT and UBT token’s transferFrom function. However, these two tokens are controlled by the attacker. In the transferFrom function of UBT, the attacker invoked deposit function of the MasterChef contract to deposit the LP token obtained in the first step into MasterChef contract.

Unfortunately, due to the balance change in the deposit function, the newBalance after addLiquidity is much larger than the oldBalance. In this way, the attacker got double credits in MasterChef contract.

Step III: get profit

The attacker finally invoked UBT.withdrawAsset and MasterChef.withdraw to redeem the lptoken to get BTCB and WBNB. Since the number of liquidity is more than the attacker should have, the attacker will get profits.

Lessons

Besides the reentrancy problem, the passed tokens have not been verified is one of the root causes. We have seen other cases with similar issue, as in the Visor case and the Coin98 case.

About BlockSec

BlockSec is a pioneering blockchain security company established in 2021 by a group of globally distinguished security experts. The company is committed to enhancing security and usability for the emerging Web3 world in order to facilitate its mass adoption. To this end, BlockSec provides smart contract and EVM chain security auditing services, the Phalcon platform for security development and blocking threats proactively, the MetaSleuth platform for fund tracking and investigation, and MetaSuites extension for web3 builders surfing efficiently in the crypto world.

To date, the company has served over 300 esteemed clients such as MetaMask, Uniswap Foundation, Compound, Forta, and PancakeSwap, and received tens of millions of US dollars in two rounds of financing from preeminent investors, including Matrix Partners, Vitalbridge Capital, and Fenbushi Capital.

Official website: https://blocksec.com/

Official Twitter account: https://twitter.com/BlockSecTeam

Sign up for the latest updates
Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield
Security Insights

Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield

Looking ahead, targeted freezing events like this $6.76M USDT action will only become more common. On-chain data analysis is improving. Stablecoin issuers are also working closely with regulators. As a result, hidden illicit financial networks will be exposed.

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026

During the week of March 2 to March 8, 2026, seven blockchain security incidents were reported with total losses of ~$3.25M. The incidents occurred across Base, BNB Chain, and Ethereum, exposing critical vulnerabilities in smart contract business logic, token deflationary mechanics, and asset price manipulation. The primary causes included a double-minting logic flaw during full token deposits that allowed an attacker to exponentially inflate their balances through repeated burn-and-mint cycles, a price manipulation vulnerability in an AMM-based lending market where artificially inflated vault shares created divergent price anchors to incorrectly force healthy positions into liquidation, and a flawed access control implementation relying on trivially spoofed contract interfaces that enabled attackers to bypass authorization to batch-mint and dump arbitrary tokens.

Weekly Web3 Security Incident Roundup | Feb 23 – Mar 1, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Feb 23 – Mar 1, 2026

During the week of February 23 to March 1, 2026, seven blockchain security incidents were reported with total losses of ~$13M. The incidents affected multiple protocols, exposing critical weaknesses in oracle design/configuration, cryptographic verification, and core business logic. The primary drivers included oracle manipulation/misconfiguration that led to the largest loss at YieldBloxDAO (~$10M), a crypto-proof verification flaw that enabled the FOOMCASH (~$2.26M) exploit, and additional token design and logic errors impacting Ploutos, LAXO, STO, HedgePay, and an unknown contract, underscoring the need for rigorous audits and continuous monitoring across all protocol layers.