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
Building a Secure Stablecoin Payment Network: BlockSec Partners with Morph
Partnership

Building a Secure Stablecoin Payment Network: BlockSec Partners with Morph

BlockSec has partnered with Morph as an official audit partner for the $150M Morph Payment Accelerator. By offering exclusive discounts on smart contract audits and penetration testing, BlockSec provides institutional-grade security to payment builders, ensuring a safe and resilient foundation for the future of global stablecoin payments.

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.

Venus Thena (THE) Incident: What Broke and What Was Missed

Venus Thena (THE) Incident: What Broke and What Was Missed

On March 15, 2026, an attacker bypassed the THE (Thena) supply cap on Venus Protocol (BNB Chain) through a donation attack, inflating a collateral position to 3.67x the intended limit and borrowing ~$14.9M in assets. Both sides lost money on-chain: Venus was left with ~$2.15M in bad debt after 254 liquidation bots competed across 8,048 transactions, while the attacker retained only ~$5.2M against a $9.92M investment. This deep dive examines what broke across three lines of defense (exposure limits, collateral valuation, and liquidation) and the monitoring gaps that left months of on-chain warning signals unacted upon.

Best Security Auditor for Web3

Validate design, code, and business logic before launch. Aligned with the highest industry security standards.

BlockSec Audit