ポプシクル・ファイナンスのセキュリティインシデント分析

ポプシクル・ファイナンスのセキュリティインシデント分析

2021年8月4日、Popsicle Financeは攻撃により巨額の金銭的損失(2000万ドル超)を被りました[1]。 手動分析の結果、これは「ダブルクレイム」攻撃、つまり報酬システムの抜け穴により、攻撃者が報酬を繰り返し請求できるものであることを確認しました。 以下では、攻撃プロセスと脆弱性の根本原因を説明するために、攻撃トランザクションを使用します。

背景

Popsicle Financeは、複数のチェーン(例:EthereumおよびBSC)に対応するイールド最適化プラットフォームです。

具体的には、ユーザーはまずdeposit関数を呼び出して流動性を提供し、Popsicle LPトークン(略称:PLP)を取得します。その後、Popsicle Financeはユーザーのために流動性(Uniswapなどのプラットフォームと連携)を管理して利益を上げます。 ユーザーはwithdraw関数を呼び出してPopsicle Financeから流動性を取り戻すことができます。その際、PLPトークンに基づいて金額が計算されます。 インセンティブ報酬は流動性に由来し、時間とともに蓄積されます。 ユーザーはcollectFees関数を呼び出して報酬を請求できます。これがこの攻撃の鍵となります。

脆弱性分析

collectFees関数では、token0Rewardtoken1Reward(対応するLPトークンペアの報酬)がユーザーのために計算されます。計算ロジック全体は単純です。しかし、この関数はupdateVaultというモディファイアを使用しており、これにより報酬が適切に更新されます。

要するに、updateVaultは以下のことを行います。

  1. まず、_earnFees関数を呼び出して、プールから蓄積された手数料を取得します。
  2. 次に、_tokenPerShare関数を呼び出して、token0PerShareStoredtoken1PerShareStoredを更新します。これらは、各シェアあたりのプール内のトークン0とトークン1の金額を表します。
  3. 最後に、_fee0Earned_fee1Earned関数を呼び出して、ユーザーの報酬(それぞれtoken0Rewardstoken1Rewards)を更新します。

_fee0Earned関数と_fee1Earned関数は同じロジックを共有します。つまり、以下の式を実装します(トークン0を例に取ります)。

user.token0Rewards += PLP.balanceOf(account) * (fee0PerShare - user.token0PerSharePaid) / 1e18

この計算は累積的であることに注意してください。つまり、ユーザーがPLPトークンを保有していなくても、計算された報酬はtoken0Rewardsに格納された値のままです。

したがって、以下の2つの観察結果を導き出すことができます。

  1. ユーザーの報酬はtoken0Rewardstoken1Rewardsに保存されており、これはPLPトークンとは関連付けられていません
  2. collectFees関数はtoken0Rewardstoken1Rewardsの状態のみに依存しているため、PLPトークンを保有せずに報酬を引き出すことができます

現実世界では、これはユーザーがお金を通帳に預け、銀行が預金証明書を発行するようなものです。残念ながら、この証明書は偽造防止機能がなく、ユーザーとも関連付けられていません。 この場合、複製を作成して他人に配布し、銀行から利益を得ることが可能です。

攻撃フロー

簡単に言うと、攻撃者は以下の手順で攻撃を実行しました。

  1. 3つのコントラクトを作成しました。1つは攻撃に使用され、他の2つはcollectFees関数を呼び出して報酬を取得するために使用されました。
  2. AAVEから大量の流動性を借り入れるフラッシュローンを利用しました。
  3. 攻撃を実行するためにデポジット-ウィズドロー-コレクトフィーズサイクルを起動しました(合計8サイクルあり、Popsicle Financeの複数のボルトから大量の流動性が引き出されました)。
  4. フラッシュローンをAAVEに返却し、Tornado.Cashを通じて利益をマネーロンダリングしました。

具体的には、デポジット-ウィズドロー-コレクトフィーズサイクルはいくつかのステップで構成されており、オンラインツール [2]を使用することで、簡単にラベル付けして明確に要約できます。

利益分析

合計で、攻撃者はPopsicle Financeから2000万ドルを不正に取得しました。これには、2.56K WETH、96.2 WBTC、160K DAI、5.39M USDC、4.98M USDT、10.5K UNIが含まれます。 この不正行為の後、攻撃者はまずUniswapとWETHを通じて他のすべてのトークンをETHに交換し、その後Tornado.Cashを使用してマネーロンダリングを行いました。

謝辞

Yufeng Hu、Ziling Lin、Junjie Fei、Lei Wu、Yajin Zhou @BlockSec

(姓のアルファベット順)

https://www.blocksecteam.com

Medium: https://blocksecteam.medium.com/

Twitter: https://twitter.com/BlockSecTeam

連絡先: [email protected]

参考文献

[1] https://twitter.com/defiprime/status/1422708265423556611

[2] https://tx.blocksecteam.com/

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.