Back to Blog

APEエアドロップへのフラッシュローン攻撃の簡単な分析

Code Auditing
March 17, 2022

The creators of Bored Ape Yacht Club unveil ApeCoin crypto token (lifestyleasia.com)

Will Sheehan氏の報告によると、APEトークンはMEVによって攻撃を受けました。分析の結果、APEトークンのエアドロッププロセスがスポット状態のみを考慮しており、攻撃者によって操作されうる脆弱性が原因であると考えられます。

具体的には、攻撃者はNFTと交換可能なBYACトークンを借り入れ、そのNFTを使用してエアドロップを請求できます。その後、攻撃者はBYAC NFTを使用してBYACトークンをミントし、フラッシュローンを返済します。しかし、このプロセスで攻撃者はエアドロップされたAPEトークンを入手しました。これは、契約が操作可能な資産のスポット価格のみを考慮するフラッシュローンベースの価格操作攻撃に似ていると考えられます。

以下では、攻撃トランザクションを使用してこのプロセスを説明します。

ステップI:フラッシュローンの手数料のためのNFTを準備する

攻撃者は1060 NFTを攻撃コントラクト0x7797に転送しました。このNFTはフラッシュローンで借りたものではなく、106 ETHで購入したものです。

ステップII:フラッシュローンを通じてBYACトークンを借り入れる

ステップIII:NFTを使用してAPEトークンを請求する

このプロセス中、攻撃者は6つのNFTを保有していました。1つは購入した1060個、もう5つは(ステップIIで)借り入れたBYACトークンを使用して交換したものです。合計で60,564 APEトークンを入手しました。

ステップIV:NFTをミントしてBYACトークンを取得する

攻撃者は6つのNFTをミントしてBYACトークンを取得しました。攻撃者は自身のNFT(1060個)もミントしてフラッシュローンの手数料を支払いました。フラッシュローンを返済した後もBYACトークンが残っていたため(自身のBYAC NFT 1060個をミントしたため)、攻撃者は残りのBYACトークンを約14 ETHでスワップしました。

利益

合計で、攻撃者は60,564 APEトークンを入手しました。これは(執筆時点の)約500万米ドルの価値がありました。コストはNFT1つ(106 ETH - 14 ETH)で、約27万米ドルでした。

学び

ここでの問題は、APEトークンのエアドロップが、NFTが誰かに保有されているかどうかというスポット状態のみを考慮していることだと考えられます。これは、攻撃者がフラッシュローンを使用してスポット状態を操作できるため、脆弱です。フラッシュローンのコストがエアドロップトークンの価値よりも小さい場合、示されたような攻撃機会が生まれます。

謝辞

トランザクションを報告したWill Sheehan氏に感謝します。

BlockSecについて

BlockSecは、2021年に世界的に著名なセキュリティ専門家グループによって設立された、先駆的なブロックチェーンセキュリティ企業です。同社は、Web3の世界のセキュリティとユーザビリティを向上させ、その普及を促進することに専念しています。この目的のため、BlockSecはスマートコントラクトおよびEVMチェーンのセキュリティ監査サービス、セキュリティ開発および脅威のプロアクティブなブロックのためのPhalconプラットフォーム、資金追跡および調査のためのMetaSleuthプラットフォーム、そしてWeb3開発者が暗号世界を効率的にサーフィンするためのMetaDock拡張機能を提供しています。

現在までに、同社はMetaMask、Uniswap Foundation、Compound、Forta、PancakeSwapなど300社を超える著名なクライアントにサービスを提供し、Matrix Partners、Vitalbridge Capital、Fenbushi Capitalなどの著名な投資家から2回の資金調達で数千万米ドルを受け入れています。

公式ウェブサイト:https://blocksec.com/

公式Twitterアカウント: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.