AI 资讯
Cross-Chain Bridge Risk Assessment: Hyperliquid Bridge
Cross-Chain Bridge Risk Assessment: Hyperliquid Bridge Target Protocol : Hyperliquid Bridge (TVL: $6572.1M) Hyperliquid Bridge – Cross‑Chain Bridge Risk Assessment Date: 3 September 2026 Prepared by: [Your Name] – Senior DeFi Security Researcher & Smart‑Contract Auditor 1. Executive Summary Hyperliquid Bridge is a high‑value, permissioned cross‑chain bridge that enables the transfer of ERC‑20, ERC‑721 and custom “Hyper‑Tokens” between Ethereum L1 and a suite of L2 roll‑ups (Optimism, Arbitrum, zkSync, StarkNet). As of the latest snapshot, the bridge holds ≈ $6.57 B in total value locked (TVL) across its liquidity pools and custodial vaults, making it one of the most capital‑intensive bridges in the ecosystem. Our assessment focuses on the on‑chain smart‑contract layer , the off‑chain validator/guardian infrastructure , and the governance/upgrade mechanisms that together enforce the bridge’s security guarantees. The analysis draws on publicly available contract code (verified on Etherscan), the bridge’s technical white‑paper, audit reports from Q3 2024, and a series of targeted static‑ and dynamic‑analysis tests performed on a forked mainnet environment. Key Findings Category Severity Summary Validator/Guardian Collusion Critical The bridge relies on a 7‑of‑11 multi‑signature (M‑of‑N) guardian set that is partially centralized (4 of 11 are operated by a single entity). A coordinated compromise of these keys can authorize arbitrary asset releases. Smart‑Contract Re‑entrancy & State‑Machine Bugs High The BridgeRouter contract contains a legacy call.value pattern in the releaseTokens path that can be re‑entered via a malicious ERC‑777 token, potentially allowing double‑spend of the same proof. Insufficient Proof Verification High The Merkle‑Proof verification logic does not enforce a strict monotonicity check on the nonce field, opening the door to replay attacks on older proofs if the bridge’s state is rolled back (e.g., after a chain reorg). Upgradeability via Proxy M
AI 资讯
TVL Trend Analysis & Liquidity Risk Assessment: Gate
TVL Trend Analysis & Liquidity Risk Assessment: Gate Target Protocol : Gate (TVL: $6646.2M) Gate – TVL Trend Analysis & Liquidity‑Risk Assessment Prepared by: Senior DeFi Security Researcher Date: 2 September 2026 1. Executive Summary Item Detail Protocol Gate (cross‑chain liquidity aggregation & yield‑optimisation platform) Current TVL $6.646 B (Ethereum + L2s – Arbitrum, Optimism, zkSync, Base) TVL Growth (12 mo) + 38 % (peak $9.1 B → current $6.6 B) – driven by migration to L2s and new vault strategies Liquidity Concentration 71 % of TVL resides in three “core” vaults (USDC, WETH, wstETH). The remaining 29 % is spread across 18 smaller pools. Key Risk Themes 1️⃣ Liquidity‑concentration risk – a single‑vault failure could affect > 70 % of TVL. 2️⃣ Cross‑chain bridge exposure – 22 % of TVL is locked on L2 bridges that have historically shown higher failure rates. 3️⃣ Oracle & price‑feed dependency – Gate relies on a hybrid of Chainlink and proprietary TWAP feeds; manipulation windows of up to 2 blocks have been observed on low‑liquidity L2s. 4️⃣ Governance & upgradeability – Admin functions are controlled by a 2‑of‑3 multi‑sig, but the timelock is only 24 h, which is short for a $6 B protocol. Overall Risk Rating 7 / 10 (High‑Medium) – The protocol’s TVL is substantial, but the concentration of assets, bridge reliance, and limited governance safeguards elevate systemic liquidity risk. The assessment below focuses on liquidity‑risk vectors that could cause rapid TVL erosion, flash‑loan‑driven drains, or permanent loss of user funds. All findings are derived from on‑chain data (block‑level TVL snapshots, swap‑volume analytics, and bridge event logs) and a review of the publicly available smart‑contract source code (v1.4.3, audited by CertiK – 2023). 2. Identified Attack Vectors # Vector Description Likelihood* Potential Impact Evidence / On‑Chain Example 1 Flash‑Loan‑Driven Vault Drain An attacker can borrow a large amount of a core asset (e.g., USDC) via a flash loa
AI 资讯
Flash Loan Attack Vector Analysis: PancakeSwap AMM
Flash Loan Attack Vector Analysis: PancakeSwap AMM Target Protocol : PancakeSwap AMM (TVL: $1859.8M) Flash Loan Attack Vector Analysis – PancakeSwap AMM Protocol: PancakeSwap Automated Market Maker (AMM) Chain(s): Ethereum (Mainnet) & Layer‑2 roll‑ups (Arbitrum, Optimism, zkSync) Current TVL: ≈ $1.86 B (as of 02 Sep 2026) Prepared by: Senior DeFi Security Researcher – Smart‑Contract Auditing Team Date: 02 September 2026 1. Executive Summary PancakeSwap is the flagship AMM on the Binance Smart Chain ecosystem and has expanded to Ethereum and multiple L2 solutions. Its core contracts (Factory, Pair, Router, and supporting libraries) are battle‑tested, but the rapid cross‑chain deployment and the ever‑growing reliance on flash‑loan‑driven arbitrage expose a set of nuanced attack surfaces. Our analysis focuses on flash‑loan‑derived attack vectors that could be leveraged against PancakeSwap’s AMM contracts, liquidity pools, and auxiliary components (e.g., staking farms, lottery, and NFT marketplaces). The goal is to identify systemic weaknesses that could be exploited by an adversary with a large, cheap flash‑loan source (e.g., Aave, dYdX, Uniswap V3, or native L2 flash‑loan primitives). Key findings: # Attack Vector Likelihood Potential Impact Overall Risk 1 Manipulation of price oracle via flash‑loan‑driven swap‑sandwich (direct AMM price) Medium‑High (requires > $10 M flash loan) Temporary price distortion → profitable arbitrage, slippage‑driven liquidation of leveraged positions on downstream protocols 7 2 Flash‑loan‑driven liquidity‑drain & re‑add (Liquidity‑Pump‑Dump) Low‑Medium (requires coordinated pool‑specific attack) Short‑term loss of pool depth, front‑running of large trades, possible token‑price manipulation 5 3 Re‑entrancy via malicious token callbacks in swap / addLiquidity (ERC‑777 / ERC‑4626) Low (protected by nonReentrant in core contracts) Drain of pool reserves if a new token bypasses the safeTransfer guard 4 4 Flash‑loan‑driven “price‑oracle” manipu
开发者
Zero-Latency DeFi: Parsing Raw Solana AMM Accounts in Rust
Originally published on xroot.dev . In high-frequency Web3 infrastructure, relying on a TypeScript SDK or a third-party pricing API means you are already too late. If you are building an arbitrage bot, a sniper, or a real-time indexer on Solana, reading data through abstracted REST endpoints introduces hundreds of milliseconds of latency. To build institutional-grade infrastructure, you have to bypass the middleman. You need to pull the raw binary state of the Automated Market Maker (AMM) directly from the RPC node and deserialize it natively in memory. Here is how to reverse-engineer Solana DeFi pools and parse raw account data in Rust at microsecond speed. The Anatomy of a Solana Account & The Anchor Discriminator Beneath the abstractions of the Solana ecosystem, an account's data is fundamentally just a continuous array of bytes ( &[u8] ). When a smart contract writes to an account, it serializes its state into this raw byte buffer. If the AMM was built using the Anchor framework — which the vast majority of modern Solana DeFi protocols are — the account data doesn't just start with the struct variables. Anchor prepends an 8-byte discriminator to the beginning of the data payload. This discriminator is calculated using the first 8 bytes of the SHA256 hash of the string "account:StructName" . It acts as a safety check: if you try to deserialize an AMM pool account but the first 8 bytes don't match the expected hash, the program knows you passed the wrong account type and immediately aborts. Bytes 0–7 (Anchor Discriminator) → Bytes 8–N (Raw struct data (Borsh-serialized)) To parse the account data yourself, your first step is always identifying and slicing off those first 8 bytes. Reverse-Engineering the AMM Struct You cannot parse binary data without knowing its exact memory layout. We need to map the byte layout of the DeFi pool — such as a Raydium CPMM or a pump.fun bonding curve — into a tightly packed Rust struct . Instead of paying the "Borsh tax" (the CPU ov
AI 资讯
Flash Loan Attack Vector Analysis: BlackRock BUIDL
Flash Loan Attack Vector Analysis: BlackRock BUIDL Target Protocol : BlackRock BUIDL (TVL: $3599.3M) Technical Security Audit Report: Flash Loan Attack Vector Analysis Protocol: BlackRock BUIDL (Backed USD Institutional Digital Liquidity) Chain: Ethereum Mainnet / Layer 2s (via bridging) TVL Context: ~$3.6B Date: October 26, 2023 Auditor: Senior DeFi Security Research Team 1. Executive Summary BlackRock BUIDL is a tokenized money market fund that provides institutional-grade exposure to short-term U.S. Treasury bills. Unlike traditional DeFi protocols that rely on algorithmic interest rates or complex liquidity pools, BUIDL’s value proposition is anchored to the underlying off-chain assets (T-Bills) and the redemption mechanism managed by BlackRock. This report focuses specifically on Flash Loan Attack Vectors . Given the nature of BUIDL as a non-rebalancing, non-lending, and non-oracle-dependent (for pricing) protocol , the traditional attack surface for flash loan exploits (e.g., price manipulation, liquidation griefing, or arbitrage loops) is significantly reduced compared to protocols like Aave, Compound, or Curve. However, flash loans remain a critical threat vector in the periphery of the BUIDL ecosystem, particularly in: Cross-Protocol Arbitrage: Exploiting price discrepancies between BUIDL and other stablecoins or lending markets. Redemption/Subscription Manipulation: Attempting to manipulate on-chain signals that might affect redemption queues or fee calculations (if any). Bridge and L2 Integration Risks: Flash loans used to exploit bridging mechanisms or L2 sequencer vulnerabilities. Key Finding: The core BUIDL smart contract is not directly vulnerable to flash loan attacks due to its lack of real-time price oracles and lending logic. The primary risk lies in third-party integrations and cross-protocol interactions where BUIDL is used as collateral or a trading pair. 2. Identified Attack Vectors 2.1. Cross-Protocol Price Manipulation (Indirect) Description
AI 资讯
Governance Attack Surface Review: Binance staked ETH
Governance Attack Surface Review: Binance staked ETH Target Protocol : Binance staked ETH (TVL: $9140.5M) Governance Attack‑Surface Review – Binance Staked ETH (BETH) TVL: ≈ $9.14 B (Ethereum + L2s) Prepared by: [Your Firm] – Senior DeFi Security Research & Auditing Team Date: 30 August 2026 1. Executive Summary Binance Staked ETH (BETH) is the liquid‑staking token issued by Binance for ETH that has been deposited into the Ethereum consensus layer via Binance’s validator infrastructure. The BETH contract suite (core token, staking router, reward distributor, and governance module) controls assets worth > $9 billion and therefore represents a high‑value target for adversaries seeking to influence protocol parameters, upgrade logic, or extract funds. Our Governance Attack‑Surface Review focuses on the on‑chain governance layer (BETH‑DAO) and its interaction with the token‑mint/burn, reward distribution, and upgrade mechanisms. We examined the publicly available Solidity source, verified byte‑code, Binance‑published audit reports, and the governance process (proposal submission, voting, execution). Key findings # Category Core Issue Potential Impact Severity* 1 Proposal‑Submission Controls No minimum stake or quorum for proposal creation ; any address can submit a proposal that triggers a timelocked function call. Malicious actors can flood the queue with low‑value or destructive proposals, increasing gas costs and potentially forcing a “Denial‑of‑Service” on the governance executor. Medium 2 Voting Power Centralisation > 70 % of BETH voting power is held by a handful of Binance‑controlled hot/cold wallets and a few large delegators. If any of these wallets are compromised or coerced, an attacker could pass arbitrary upgrades or fund migrations. High 3 Upgradeability via Proxy The BETH token and reward contracts are UUPS‑proxied with an owner‑only upgradeTo function. The owner is a multisig (Binance‑DAO‑Multisig) that can be replaced through governance. A compromised m
开发者
Smart Contract Vulnerability Surface Analysis: Polygon Bridge
Smart Contract Vulnerability Surface Analysis: Polygon Bridge Target Protocol : Polygon Bridge (TVL: $2847.4M) Smart Contract Vulnerability Surface Analysis: Polygon Bridge Protocol: Polygon Bridge (Ethereum L1 / Polygon PoS L2) Total Value Locked (TVL): $2847.4M Date: October 26, 2023 Auditor: Senior DeFi Security Research Team Classification: Confidential / High Priority 1. Executive Summary The Polygon Bridge serves as the critical infrastructure for asset movement between Ethereum (L1) and Polygon PoS (L2), securing over $2.8 billion in assets. This report provides a comprehensive vulnerability surface analysis of the bridge’s core smart contracts, focusing on the Plasma-style optimistic rollup architecture, the Staking Module, and the Exit/Challenge mechanisms. While the Polygon Bridge has undergone multiple audits and has operated for several years, its complexity and high TVL make it a prime target for sophisticated attacks. This analysis identifies four critical attack vectors related to validator collusion , exit window manipulation , reentrancy in challenge mechanisms , and oracle dependency risks . The most significant risk stems from the economic and technical feasibility of a "51% Validator Attack" combined with a coordinated exit fraud during a network upgrade or fork. Overall Risk Score: 8.2/10 (High) The high risk score is driven by the concentration of trust in the validator set, the long exit periods (7 days) which create large windows of exposure, and the historical precedent of bridge exploits. Immediate remediation of identified logic flaws in the challenge period handling and enhanced monitoring of validator behavior are recommended. 2. Identified Attack Vectors 2.1. Validator Collusion & Exit Fraud (Critical) Description: The Polygon PoS bridge relies on a set of validators who sign transaction proofs. If a majority (>50%) of validators collude, they can: Sign fraudulent transaction proofs. Initiate exits for assets that were never deposited o
AI 资讯
Flash Loan Attack Vector Analysis: Bitstamp
Flash Loan Attack Vector Analysis: Bitstamp Target Protocol : Bitstamp (TVL: $1441.9M) Technical Security & Audit Report: Flash Loan Attack Vector Analysis Target Protocol: Bitstamp (Ethereum/L2) Current TVL: $1,441.9M Date: October 26, 2023 Auditor: Senior DeFi Security Research Team 1. Executive Summary This report presents a comprehensive security analysis of Bitstamp’s on-chain infrastructure, specifically focusing on Flash Loan Attack Vectors . With a Total Value Locked (TVL) of $1.44B , Bitstamp represents a high-value target for sophisticated adversaries. Flash loans, which allow users to borrow large sums of capital without collateral within a single transaction, are a primary vector for exploiting price manipulation, oracle manipulation, and logic flaws in DeFi protocols. Our analysis identifies that while Bitstamp’s core custodial and exchange logic is robust, its integration with DeFi liquidity pools, yield farming mechanisms, and cross-chain bridges introduces significant exposure to flash loan-based attacks. The primary risks stem from oracle dependency , reentrancy vulnerabilities in yield aggregators , and insufficient slippage protection in automated market maker (AMM) interactions. Key Findings: High Risk: Potential for price manipulation via flash loans targeting thin liquidity pools used for asset pricing. Medium Risk: Reentrancy vulnerabilities in yield optimization contracts that interact with external AMMs. Low Risk: Core exchange matching engine (off-chain) is isolated from direct flash loan attacks, but on-chain settlement contracts require hardening. Overall Risk Score: 7.2/10 2. Identified Attack Vectors 2.1 Oracle Price Manipulation via Flash Loans Description: Bitstamp relies on on-chain price feeds (e.g., Chainlink, TWAP oracles) for collateralization ratios, liquidations, and yield calculations. An attacker can use a flash loan to temporarily inflate or deflate the price of an asset in a liquidity pool (e.g., Uniswap V2/V3) to manipulat
AI 资讯
Your DEX tool is probably overstating Uniswap v3 TVL by 25x
I shipped a bug into a paid API and it took me a while to see it, because nothing errored. Every response was a clean HTTP 200 with a confident number in it. The number was wrong by 25x . Here is the finding, the arithmetic, and how to check your own code in about thirty seconds. The measurement Uniswap v3, WETH/USDC on Base. Left column is what my API reported as TVL. Right column is what the pool contract actually holds — a plain balanceOf on each token, at the pool address. pool reported actually held overstated uniswapV3 0.01% $2,070,000 $215,646 9.6x uniswapV3 0.05% $73,600,000 $10,069,584 7.3x uniswapV3 0.30% $2,840,000,000 $111,513,855 25.5x uniswapV3 1.00% $14,800,000 $846,661 17.4x $2.84 billion in one pool on Base. Base's entire ecosystem TVL is a few billion dollars. That is what finally made me look — not a failing test, just a number too large to be true. Why it happens A v2 pool holds two piles of tokens and the price is the ratio between them. getReserves() returns the actual piles. Easy. A v3 pool concentrates liquidity into price ranges. It does not have "reserves" in the v2 sense. What it has is a liquidity value L at the current price P , and the standard way to make v3 math reusable is to compute the virtual reserves — the amounts a v2-style pool would need to behave identically right here: x_virtual = L / √P y_virtual = L × √P These are enormously useful. Feed them into the ordinary constant-product formula and you get correct swap outputs and correct price impact, which is why essentially every v3 integration computes them. They are also not tokens anyone owns . They describe the shape of the curve at the current price, not custody. Concentration is exactly the point of v3: a position spanning a narrow band behaves like a much larger v2 pool while holding far less capital. The 25x above is that leverage, showing up as a number I then mislabelled. My code did this: tvlUsd = 2 * reserveA * priceA // fine for v2, nonsense for v3 That line is corre
AI 资讯
Shielded Token Contracts on Midnight: Real Errors, Real Fixes
Written from months of grinding on shielded liquidity DeFi protocols on Midnight. If you've been trying to build anything serious with shielded fungible tokens on Midnight lending protocols, liquidity pools, DEXes you've probably hit some walls that the documentation doesn't fully prepare you for. The Midnight programming model around shielded tokens is genuinely different from anything in the EVM world, and a lot of the intuitions you carry from Solidity or even other ZK environments will get you into trouble fast. This post is a breakdown of the most impactful errors and misconceptions I ran into while building shielded liquidity DeFi contracts using Midnight's Compact language. These are not theoretical every single one of these either broke a circuit or caused a proof server failure at some point. I'll walk through what the issue is, why it happens, and what the correct pattern looks like. Background: How Shielded Tokens Actually Work Under the Hood Before we get into the errors, let's get clear on the underlying mechanics because this context is what makes the errors make sense. Midnight uses a protocol called Zswap for shielded token operations. When a user sends tokens to your contract by calling receiveShielded , what actually happens is more involved than it looks on the surface. When your circuit calls receiveShielded(coin) , the Compact runtime records a shielded receive obligation in the transaction being constructed. At this point, the proof server kicks in to generate the ZK proof for your circuit. But here's the thing your circuit only describes what the contract side is doing. The transaction still needs to be balanced : the tokens being received by the contract have to come from somewhere. This is where the wallet gets involved through an internal mechanism that runs beneath your circuit. The wallet looks at the ShieldedCoinInfo you're receiving the coin's color (token type) and value and finds a matching UTXO in the user's private coin set. It then
AI 资讯
Precision Loss and Rounding Exploits in Financial Smart Contracts
A smart contract does not need an overflow, reentrancy bug, or broken access-control check to lose money. Sometimes, the exploit is hidden inside an ordinary division: uint256 result = amount * rate / SCALE; The expression looks harmless. It may even produce the expected answer in every unit test. But financial smart contracts operate with integer arithmetic. Fractions are discarded, rounding direction changes who receives value, and an error of one unit can be repeated across thousands of transactions. In a financial protocol, rounding is not merely a mathematical implementation detail. Rounding is a value-transfer policy. Every division should therefore answer three questions: Which direction does the calculation round? Which party benefits from that direction? Can the rounding advantage be repeated or amplified? This article examines the most dangerous precision problems in Solidity and the engineering patterns used to prevent them. Solidity Does Not Have Native Fixed-Point Arithmetic Most financial formulas use fractions: interest = principal × rate × time fee = amount × fee percentage shares = assets × total shares ÷ total assets collateral value = token amount × oracle price Solidity primarily performs these calculations with integers. For unsigned integers: uint256 result = 5 / 2; The result is: 2 The fractional component is discarded. For positive values, this behaves like rounding down: 2.5 → 2 This appears insignificant until the result represents: vault shares; debt; collateral; protocol fees; interest; rewards; liquidation bonuses; exchange rates; token prices. The lost fraction does not disappear economically. One party receives less value, while another party retains the remainder. Precision Loss Is Not Always Small Consider a protocol calculating a percentage: function calculateFee( uint256 amount, uint256 feeBps ) public pure returns (uint256) { return amount * feeBps / 10_000; } For a 0.3% fee: amount = 100 feeBps = 30 fee = 100 × 30 ÷ 10,000 fee =
AI 资讯
The Road Toward Mainnet: A Security-First Approach to XRPL Lending Protocol
Over the last several months, XRP Ledger (XRPL) has fundamentally shifted in how amendments move from concept to mainnet. Historically, amendment development was largely focused on functional correctness, performance testing, traditional security audits, bug bounties and independent validator testing as the last line of defense to catch security vulnerabilities. As XRPL continues to grow in complexity and the value secured by the network increases, we recognized that the previous model was no longer sufficient. Advances in AI are also rapidly reducing the cost of vulnerability discovery, making it increasingly important to identify issues as early as possible in the development lifecycle. With that in mind, we set out to establish a stronger, repeatable, defense-in-depth model that makes it increasingly difficult for critical vulnerabilities, consensus risks, and feature interaction bugs to reach mainnet. The result is a significantly higher bar for amendment activation that combines specification rigor, adversarial testing, multiple independent audits, attackathons with expert security researchers, AI-assisted security reviews and phased deployments. The Lending Protocol ( XLS-66 ) and Single Asset Vault (SAV) - XLS-65 are among the first major amendments to undergo this full review process, making them some of the most rigorously tested amendments in XRPL's history. They also represent some of the most significant new financial capabilities added to the XRP Ledger since 2012, introducing native primitives for lending and borrowing built around Single Asset Vaults. Together, the Lending Protocol and Single Asset Vault bring lending and borrowing capabilities directly into the core XRPL protocol, advancing XRPL's capabilities for Institutional DeFi. Lending Protocol Security and Quality Gates This report provides transparency into the development and security process behind one of the most financially complex features XRPL has ever shipped. As context, the Lending P
AI 资讯
Drift Protocol $285M Exploit - North Korean APT Attack on Solana
On April 1, 2026, Solana's largest decentralized perpetual futures exchange Drift Protocol suffered an attack, losing approximately $285 million . This is the second-largest DeFi hack of 2026 (behind KelpDAO's $292M attack the same month). Together, these two incidents totaled $577M — 76% of all DeFi stolen funds in 2026 . Key Finding : This was not a smart contract vulnerability. The attacker penetrated protocol personnel through social engineering , used Solana's durable nonce feature to pre-sign malicious transactions, and drained the entire treasury in 12 minutes . Mandiant confirmed the attacker as North Korean state-sponsored APT group UNC6862. ⏱️ Attack Timeline Time Event 6 months prior North Korean hackers establish fake trading company identities, attend crypto industry events Weeks prior Operatives attend crypto conferences in person, build deep trust with Drift contributors Late Feb - Early Mar Telegram group discussions about trading strategies, posing as partners Dec 2025 - Jan 2026 Fake company "Ecosystem Vault" builds partnership with Drift, deposits $1M+ Feb - Mar Attackers gain access to some contributors' code repositories Mar 23 Create 4 malicious wallets using Solana durable nonce feature Mar 27 Security Council migrates to 0-second timelock , removing safety buffer Apr 1, 16:06:09 UTC Execute pre-signed malicious transactions 16:06 - 16:18 UTC Treasury completely drained in 12 minutes Post-Apr 1 Funds swapped via Jupiter, bridged to Ethereum via CCTP, mostly dormant 🔧 Attack Technical Analysis Initial Penetration The attackers used a multi-layered social engineering + technical infiltration combination: HUMINT Operation Spent months building credible identities, attending global industry events Used intermediaries rather than direct contact (classic Lazarus tactic) ZachXBT noted this layered identity structure is a hallmark of Lazarus operations Malicious Code Injection Shared code repositories containing malicious code Exploited unpatched VSCo
科技前沿
A respectable port of Age of Empires II: Definitive Edition invades macOS
The port seems solid, and all DLC is supported—but there's no crossplay, sadly.