Filter
Exclude
Time range
-
Near
🚨 Fractal Protocol - Loss ~$13.7K (2026-05-22) Token: $USDF (receipt token, no liquid market) TVL: $97.27K (pre-hack) Type: Logic Error / Price Manipulation Attacker (0xe2acec13) used an Aave V3 USDC.e flash loan, looped through a chain of Balancer V2 batchSwap callbacks, and recursively hit Fractal's Vault deposit (0xb6b55f25) / withdraw on 0x80e1a981 (impl 0x038c8535) and the USDF receipt token 0xae48b7c8 (impl 0xf8a13864). Each callback minted USDF at the configured tokenPrice and burned it back, extracting ~$13.7K of USDC.e from the vault by exploiting the deposit/withdraw accounting (tokenPrice/share-rounding) inside the recursive Balancer→Vault flow. Vault uses a fixed daily-accrued tokenPrice (~1.27 USDC/USDF) with only a 30-day catch-up in _compute(), and no proper invariant check between depositAmount and withdrawalAmount across re-entered swap callbacks. TX: arbiscan.io/tx/0x20db78913a5… Victim Vault: arbiscan.io/address/0x80e1a9… USDF Token: arbiscan.io/address/0xae48b7…
2
8
38
6,173
Absolute pleasure speaking at @EthCC main conference on AI-Fuzzing in Cannes 🇫🇷. Since AI-security is moving rapidly forward, I have shared my prototype and methodologies on how I combine AI & fuzzing techniques to further improve our security measures. Fuzzing should no longer be stochastic, we combine AI with fuzzing to transform security into directed precision. <From Stochastic Chaos to Directed Precision>: youtube.com/watch?v=SXAKElaX… ---- What did I cover in my talk: 1) Why random fuzzing fails on smart contracts? - Each parameter adds a dimension. Most paths never reach target execution. When we add multi-contract dependencies, it gets worse fast. - Even with advanced LLM-static analysers these days, without a directed fuzzing technique, we won't be able to reach a specific target execution. ---- 2) What's the core framework for understanding smart contract exploits? - Functions Parameters = Value Extraction - The fuzzer needs to know what to call and how to call it. ---- 3) How do we combine LLM & Fuzzing? A) Taint Analysis: By building a semantic knowledge graph of the contract(s) and scoring risk per variable/storage slot, we are able to output a fuzzing schedule targeting the highest-suspicion paths first — i.e. conducting path prioritization or even constructing suspected action sequences. B) Integration of External Call & Long-Call Chain Tracer Problem: Long call chains with external calls: The $120M Balancer exploit lived deep in the chain batchSwap() → ... → onSwap() → ... → _swapGivenOut() → ... → _upscale(). - Existing fuzzers aren't great at handling this kind of complexity, particularly with external call operations (Vault → Composable pool contract e.g.). - Our LLM tracer maps caller→callee param dependencies so mutations stay semantically valid across contract boundaries. C) Complex Data Generation — Bytes/calldata inputs are opaque to random mutation. - The talk demonstrates handling complex calldata types using the MoonHacker exploit ($318K) as an example. - The LLM reverse-engineers the encoding logic from source and generates a script that produces well-formed calldata as a fuzz input. D) Dynamic Revert Feedback (a significant advancement for fuzzers) Problem: Stochastic execution leads to frequent reverts and ineffective execution. Solution: - When execution reverts, most fuzzers discard the result. 1) We extract the raw trace, decode the revert, and send it to the LLM. 2) We obtain actionable input bounds. 3) We guide the next mutation for our fuzzer. 4) The fuzzer learns from failures in real time. ---- 4) Our talk features a well-visualized result. - Chaotic CFG → path reduction → a single directed path (in yellow) hitting the exact vulnerable segment. From stochastic chaos to directed precision. ---- There are always different innovative ways of combining AI with traditional software testing techniques. e.g. LLM to generate specifications [e.g. Yang et al., 2025: arxiv.org/abs/2506.09550] or generating SMT solver hints or having a lightweight LLM-based symbolic execution engine [Li et al., 2025: arxiv.org/abs/2505.13452]; generating invariants; unit test generations (Xu et al., 2025: arxiv.org/abs/2506.02943); property generation (Xiong et al, 2026: arxiv.org/abs/2604.13463); bug oracles; LLM stand-alone CI/CD integration during code development; LLM vulnerability hunters with auto PoC generation with Foundry. I'm always happy to discuss AI integrations from any security perspective. Let me know if you have any thoughts! Go through my talk: <AI-Fuzzing From Stochastic Chaos to Directed Precision>: youtube.com/watch?v=SXAKElaX…
1
10
316
5/ #Balancer V2 ~$128M On November 3, 2025, Balancer V2 (one of the largest AMMs in DeFi) was hacked The hacker withdrew ~$128–129M → Exploited a rounding error in pool math → Attacked Composable Stable Pools across multiple networks → Drained liquidity in under 30 minutes 💡 Simply put Imagine an exchange machine that rounds prices Sometimes in your favor — by $0.001 Now imagine you: → repeat this 65 times in one transaction And each small error compounds into millions What was the problem → Rounding error in scaling function (_upscaleArray) → All calculations rounded down (mulDown) → At small values (8–9 wei), large precision loss occurred → No protection against error accumulation in batchSwap This is not a “logic bug” — it’s an economic flaw in math How the attack happened 1. The hacker identified “edge values” (micro-balances) 2. Executed a series of batchSwap (60 operations) 3. Each operation: → slightly broke price calculations 4. Result: → BPT price (pool token) was artificially lowered 5. The hacker: → bought BPT cheaply → redeemed real assets at normal price 6. Repeated the cycle → drained liquidity Result → Losses: ~$128M → Affected: Ethereum ~6 other networks → TVL dropped: ~$443M → $186M (-58%) → Partially recovered: ~$30M → Some pools completely drained
1
2
57
Replying to @ec265
Agree has to cover fatal bugs. If it doesn't it's useless. But according to ChatGPT generally feasible: ------------------------------------------- Yes—a well-drafted policy can cover “zero-day” smart-contract exploits (i.e., previously unknown vulnerabilities), including cases that look like the Balancer v2 rounding/precision exploit in November 2025. But “users would have been made whole” only happens if the insurance is structured and sized to do that. 1) Can an insurer cover a zero-day bug exploit? Conceptually, yes. The typical insurable event is written along the lines of: “unintended smart-contract vulnerability” “exploitation by an external party” resulting in “loss of digital assets” Munich Re publicly markets a Smart Contract Risks Insurance describing protection against asset loss from “failures… or exploitations by external parties,” with DeFi operators as a target group. Munich Re The Balancer incident is widely described as a precision/rounding error exploited via batchSwap/Vault mechanics, which is exactly the kind of “unexpected code-path” event that could fit a “smart contract exploit” grant of cover—depending on the precise wording and exclusions. openzeppelin.com 2Check Point Research 2 2) Would it have made Balancer users whole? Only if all three of these were true: A. The policyholder is accountable for user restitution Most traditional insurance pays a named insured (a company/foundation/DAO wrapper), not anonymous users directly. Users are made whole only if: the insured entity has a binding commitment/process to reimburse affected addresses, or the policy explicitly names users as beneficiaries / loss payees (rare and operationally complex). B. The coverage scope matches the actual loss mechanics Smart-contract policies often exclude or narrow things like: “economic attacks” / “market manipulation” / “trading losses” governance/admin-key compromise known vulnerabilities not patched losses outside specified contract addresses/versions/chains Even though Balancer is described as a rounding/precision issue, an insurer might litigate whether the loss is “code exploit” versus “economic design / invariant manipulation.” The incident analyses show it blends math/precision and exploitation tactics, so wording matters. openzeppelin.com 2Check Point Research 2 C. The limit is large enough (and conditions are met) Being “made whole” requires: policy limit ≥ total covered loss (plus deductibles/retentions), and no breach of conditions (e.g., required audits, monitoring, change-management, timely security updates) In the real market, many crypto crime/cyber covers that are publicly discussed are in the single-digit to low-double-digit millions (example: DFNS describing up to €10m cyber crime cover from Great Lakes / Munich Re group). Dfns A $100M event like Balancer would likely require very substantial limits and/or layered towers (primary excess reinsurance), which is possible but expensive and not common for open, upgradeable, highly composable DeFi. 3) What would a “Balancer users are made whole” insurance structure look like? One workable approach is a protocol-purchased policy claims distribution plan, for example: Policyholder: Balancer’s operating entity/foundation (or a regulated wrapper) Covered contracts: specific Balancer v2 Vault specified pool factories on specified chains/versions Trigger: independent forensic confirmation of exploit (e.g., reputable security firm report) Payout: insurer pays the policyholder, who then pays users via a predefined on-chain/off-chain claims procedure Limit: sized for worst-case (or explicitly pro-rata if losses exceed limit) This can provide “retail confidence,” but it is not a deposit guarantee: it is conditional, capped, and scope-limited. Bottom line Covering zero-day smart-contract exploits is feasible in principle and is explicitly the direction some large-market players are signaling. Munich Re Making all affected users whole is not automatic: it depends on who is insured, how claims are paid, exclusions/definitions, and (most critically) the limit relative to a $100M loss event. If you want, I can outline a “term-sheet style” set of policy clauses that would maximize the chance that a Balancer-type rounding exploit pays out (definitions, triggers, exclusions to negotiate, and operational controls insurers typically demand).
1
2
76
16 Dec 2025

21
6
48
10,973
Great time speaking at @summit_defi during @EFDevcon in Argentina🇦🇷! Some comments said the talk went at a rapid pace with overwhelming information on fuzzing technology. Here's the a recap of my talk: --------------------------------------------------- Part A: Understanding of Exploits & Challenges of Smart Contract Fuzzing --------------------------------------------------- Key Insights and Core Concepts: Value Extraction Exploit: At its core, exploits in DeFi are characterized by two-step optimization process: 1. Sequence generation: Deciding which state-changing smart contract functions to invoke and in what order. 2. Parameter mutation: Continuously optimizing input parameters for these functions to trigger vulnerabilities. - Fuzzing and State Change: The goal is to modify the state via sequences and parameters that lead to an exploit. - Feasibility of fuzzing: Dimensionality Reduction. Real-world examples of loop-based exploits and various types of reducible actions in practice. Challenges of Smart Contracts Fuzzing in Testcase generations: - State Explosion: The combinatorial explosion of possible function sequences and states. - Multi-contract dependencies: Protocols often span multiple smart contracts interacting with one another. - Proxy contracts and storage separation: Logic and data stored across different contracts complicate state tracking. - External Calls: Protocols may invoke external contracts, adding layers of complexity and uncertainty. Current Approach for Testcase generations: - Sequence-based approach: Pseudo-random sequence mutation with Read-After-Write (RAW) relationship construction by leveraging SLOAD and SSTORE opcode. - Custom Invariants/Property-based testing/specifications: Auditors with expert knowledge can specify testcases with deep understanding of the program under test (PUT). - Snapshot-based approach: Exploring interesting states and mutating based on chosen corpus Challenges of Smart Contracts Fuzzing in Input Parameters generations: - Common specific ABI-specific input types: String and address types are uniquely defined. - Dynamic input types: dynamic array type and dynamic tuple...etc. - Complex input types: Dynamic tuples, arrays, and compressed calldata increase fuzzing difficulty. Current Approach for Input parameter generations: - LibAFL with Havoc Strategy assisted with abi-type mutation: (bitflip, RandMutator, …etc) - Coverage-based feedback mechanism: Code-coverage metrics, distance-metrics. - Optimization algorithms: Leveraging algorithms such as Particle Swarm Optimization, Stochastic gradient descent, Genetic algorithms and learning-based methods. Fuzzing Jargon and Framework: - Argument Initialization: Setting initial input values for fuzz testing. - Sequence Generation: Creating sequences of contract calls to test. - Mutation: Modifying input parameters for subsequent fuzzing iterations. - Feedback Mechanism: Metrics like code coverage or distance to branch conditions that guide mutations. - Oracle: In the fuzzing context, defines what constitutes a failure or exploit (not to be confused with price oracles). - Scheduling: The energy allocation in the fuzzing process. --------------------------------------------------- Part B: Proposed Solution - Three-Layer Fuzzing Framework --------------------------------------------------- 1. Language Model (LM)-Guided Fuzzing - Use LLMs for static and dynamic analysis to guide fuzzing intelligently. Four key components: - Taint Analysis: Tracking data flow to identify relevant inputs. - External Call Trace Analysis: Understanding call hierarchies and dependencies. - Compressed Data Generation: Generating complex calldata inputs. - Dynamic Runtime Information: Observing runtime behavior to guide mutation. Example: Using an LLM to identify vulnerable code lines and map them to control flow graph (CFG) basic blocks to target fuzzing efforts. - LLM aids in linking caller and callee functions, understanding which input parameters affect nested calls—crucial for mutating the correct parameters in complex functions like batchSwap. 2. State-Based Fuzzing Approach - CFG-guided fuzzing with three phases: --- Identify the basic block corresponding to a vulnerable branch. --- Analyze opcode-level conditions (e.g., JUMPI, comparison opcodes) to discover which storage or arguments influence branch decisions. --- Use distance metrics on storage and arguments to guide input mutation. - Maintain a state pool: A repository of interesting blockchain states encountered during fuzzing, enabling reuse and combination to increase coverage. - Introduce state diversity: Combine states from different execution paths to explore more scenarios. 3. GPU-Accelerated EVM Execution - Transform smart contract bytecode into GPU-parallelizable code to massively speed up fuzzing. - Enables running multiple fuzzing instances concurrently, enhancing exploration of the state space. --------------------------------------------------- This recap is intentionally concise — the full talk goes much deeper. Watch it here if you want the unfiltered version: youtube.com/watch?v=DidSdyN1…. I'm genuinely curious: → Which of the three layers (LLM-guided, state-pool CFG, or GPU acceleration) excites you most? → Have you already hit one of the fuzzing pain points I described in production? → Which of the open-ended questions the talk implicitly raises do you believe will shape the next 1-3 years of smart contract fuzzing? → Or any topics in AI / Security :]! Drop it in the replies or DM me!
4
9
60
7,292
19 Nov 2025
Solid and professional response for this tough incident! Although this attack was ultimately triggered by an incorrect rounding direction, the batchSwap and scalingFactors mechanisms introduced in Balancer V2 were also critical contributing factors that enabled the exploit.  Even the pool types on V2 that were unaffected this time (such as Weighted Pools) should undergo strengthened security reviews and re-evaluate their risk profile to ensure no new vulnerabilities can be exploited.
4
423
🚨 Balancer V2 — ~$128M bị khai thác. Một lỗ hổng trong logic của Vault/BatchSwap bị tận dụng, thiệt hại lan multi-chain và làm chao đảo DeFi tuần này. 🔥 Phản ứng “khác màu” giữa các chain: • Berachain dừng/hard-fork để chặn thiệt hại. • Polygon validator bị báo là đã censor tx của hacker, cố “đóng băng” tài sản. • Sonic freeze/blacklist ví liên quan — nhưng attacker có thể tận dụng permit()/cơ chế khác để né. (vụ freeze rồi bypass có báo cáo). 🤔 Ý nghĩa chuyên gia (ngắn gọn): • “Code is law” bị thử thách — trong khủng hoảng, nhiều hệ sinh thái ưu tiên bảo vệ người dùng hơn nguyên tắc bất biến. • Forks / tích hợp code (Balancer V2 forks) đồng nghĩa rủi ro domino — một bug lan khắp nơi. ⚠️ Rủi ro bạn cần nhớ ngay: • Liquidity/TVL sụt mạnh — token liên quan lao dốc. • Freeze/censor có thể bảo vệ ngay nhưng tạo tiền lệ: giảm tính phi tập trung & rủi ro chính trị. • Thêm bản vá = thời gian; trong window này hacker vẫn có cách lách (permit(), bridges…). 🛡️ Hành động thực tế (làm ngay): • Rút vốn khỏi pool nghi ngờ hoặc giảm exposure. • Revoke/kiểm tra approvals. • Theo dõi channel chính thức security feeds (Nansen/CertiK/peckshield). • Nếu đang hold trong chain nhỏ: cân nhắc move về cold wallet cho đến khi an toàn. Kết (góc nhìn founder/pro): Sự kiện này là cú wake-up: DeFi cần kỹ thuật ops governance — không chỉ audit code. Hệ sinh thái nhỏ nên ưu tiên cơ chế bảo vệ users (cứu tiền > code-purism) khi khẩn cấp. Bạn muốn mình biến thread này thành 1 bài dài, 1 infographic checklist, hay 1 PDF rút gọn để share TG/Group? 🔥 #Balancer #DeFi #Security #Oracle #Berachain #Polygon #Sonic
4
53
13 Nov 2025
SECURITY WITH SISI: Balancer Hack Breakdown How math was weaponized for a 9 figured drain. Balancer V2’s Composable Stable Pools were hit in one of the most precise onchain exploits this year about $116M/$128M drained on November 3, 2025. It was a policy problem: tiny “rounding off” leftovers in Balancer’s bookkeeping were stacked and amplified until they became real money The exploit sequence ◈ Probe: Microswaps in the mempool/blocks to find the “sweet spot” where truncation bias is maximized. ◈ Deploy & Constructor Spam constructor runs 50–100 micro batchSwap ops in one atomic tx to push pool state into the truncation boundary repeatedly. Internal balance events show thousands of credited units. ◈ Withdraw: Hacker calls Vault withdrawal paths (manageUserBalance) to materialize the internal accounting credit into ERC-20 tokens. ◈ Cashout & Obfuscation: swap/bridge and break the flow across DEXes/bridges. Two technical enablers made this atomic are: 1. Constructor atomicity (no mid-tx intervention) 2. Internal balances separate from ERC20 balances (accounting credit could diverge from actual reserves). At first, a contract was depolyed the constructor executed hundreds/thousands of micro batch swaps tuned to hit numeric boundaries. Each swap produced a tiny negative rounding error because of integer math and those biases compounded across layers and in a single atomic tx to create a withdrawable internal balance. Then manageUserBalance converted that accounting credit to tokens and cashed out. DeFi commonly uses fixed point integer math: a real value x is stored as ⌊x⋅Q ⌋, Where Q is the scale . Every scaling or division operation uses integer division and truncates fractional remainders. That floor operation introduces a tiny directional, it always chops off the fractional part, producing a tiny bias. Repeating truncation across layers (swaps → pool invariant calculations → wrapped token rescaling) Think of Balancer like a ledger that always chops off tiny fractions instead of rounding them. The Hacker ran hundreds of very small swaps all inside one single transaction (the constructor). Each chop left a microscopic leftover in the ledger. Alone those leftovers are useless, stacked a few hundred of them a thousand times and then multiplied by wrapped ETH derivatives and pool scaling, they turned into withdrawable tokens. Balancer wasn't broken, the rounding was played until the ledger owed real money, then was cashed out before anyone could interrupt the atomic transaction Here are some under reported amplifiers i noticed: ◈ Multilayer scaling: wrappers like wstETH/osETH add extra rescale steps each adds truncation bias. ◈ Constructor as primitive: using constructor prevents any external observer from reacting mid sequence. ◈ Onchain probes: hacker tested onchain micro-ops (not only off-chain), meaning mempool pattern detection could have flagged it earlier. ◈ No reserve reconciliation at withdrawal: Vault credited internal accounting without a strict check versus ERC-20 reserves. And that's how math was weaponized for a 9 figured drain. Tiny truncations, repeated hundreds of thousands of times and amplified by wrappers and pool scaling. On November 6, Balancer officially released an update, stating that although the attack had a wide impact, the rapid response from multiple parties significantly reduced losses in a short period of time. Despite the large scale exploit, balancer has taken swift actions to minimized total losses. Key measures like: ◈ SEAL Whitehat Safe Harbor enabled coordinated whitehat intervention. ◈ Hypernative emergency pause triggered at 08:06 UTC, pausing all CSPv6 pools by 08:07 UTC. ◈ CSPv6 factory disabled to prevent creation of new vulnerable pools. ◈ Affected pool gauges killed, halting emissions and incentives. ◈ LP exits enabled, allowing major LPs (e.g., Crypto.com, Ether.fi) to safely withdraw ~$1.86M combined. ◈ Stakewise recovery reclaimed ~73.5% of stolen osETH (~$19M) and osGNO (~$1.7–$2M) for pro-rata return. Key references   ◈ Exploit constructor tx: 0x6ed07db1a9fe5c0794d44cd36081d6a6df103fab868cdd75d581e3bd23bc9742.  View:etherscan.io/tx/0x6ed07db1a9… ◈ Withdrawal tx (manageUserBalance): 0xd155207261712c35fa3d472ed1e51bfcd816e616dd4f517fa5959836f5b48569.  View:etherscan.io/tx/0xd155207261… ◈ ◈ Primary exploiter EOA I tracked: 0xAa760D53541d8390074c61DEFeaba314675b8e3f.  View address: etherscan.io/address/0xAa760… ◈ Avoid experimental/composable pools for large deposits. ◈For redemptions, use conservative slippage and split large withdrawals Stay safu, enjoy the rest of your week.
10 Nov 2025
SECURITY WITH SISI This week’s topic: Address Poisoning This week i'm digging deep into something that has quietly gotten worse since July. As we all know wallet gets hacked too, not just big protocols. One of the techniques right now is address poisoning, typosquatting, malware that steals private keys and the ongoing use of infostealers to harvest credentials. It's important to remember that the blockchain itself is honest, it faithfully records transfers. The vulnerability is human, UI and some protocol quirks. What is address poisoning ? Address poisoning is when an attacker injects fake, lookalike addresses into places you trust your transaction history, a chat, a website or even a clipboard. You copy & paste the poisoned address and accidentally send funds to them. It’s a more technical social engineering and it works because humans are predictable. Some cases of this manipulation working are 1. $1.25M USDT lost to a poisoned address early November example A wallet owner copied an address from their history which had been “poisoned” with a lookalike address and sent $1.25M USDT to the hacker instead of the intended recipient. This is textbook address poisoning, small noise (a prior micro transfer or lookalike entry) 2. Mobile malware ( the RatOn RAT) This was discovered July/August onward Android malware families use advanced overlay and NFC relay features to steal credentials and manipulate transactions on mobile devices. It's hidden behind fake apps, request powerful permissions and can drain mobile wallets automatically. 3. Lumma: Infostealer infrastructure Law enforcement took down massive infostealer botnets. Here is how these attacks are pulled off 1. Hacker creates a lookalike/vanity address or sends micro “dust” transfers to seed your history. 2. Poisoning : The fake address appears in places you’ll trust later transaction lists, replies, Discord pins, saved contacts or search results. 3. Trigger: You copy & paste or approve a transaction, sometimes while an overlay or malware is active that subtly changes the destination. Here’s how to stay safe: ◈ Never trust a copied address by sight alone. Always verify the first and last 6–8 characters. ◈ If you can afford it, use hardware wallets for signing (especially for bigger amounts). Even if your phone or PC is compromised, a hardware device adds an extra security. ◈ Avoid copy/paste for large sends. ◈ Use secured/crypto friendly browsers. The thing about address poisoning and wallet drainer hackers is: They don’t intend to break the chains, they break your focus. Cheap tricks like lookalike addresses, fake overlays and cloned sites now cause massive losses. It’s been clear hackers are not bias, they target people first and big tech alike. Thank you for reading. Stay safu and don’t get rekt...
4
5
14
1,371
This is ideal for batchswap and clean your wallet from shitcoins @kondodotfun
11 Nov 2025
introducing: @kondodotfun batch swap tokens to clean your wallet with kondo! our much loved farcaster mini app is now available to use with ANY wallet that supports EIP 7702. use the mini app for your warplet and the website for all your other wallets. happy batch swapping :)
2
79
王小楼与链上安全大师的对话:一场「精度丢失」引发的百亿级风暴 你这事儿到底咋爆的? ——王小楼 这是一场在多个链上同时开花的精密攻击。11 月 3 日,攻击者盯上了 Balancer V2 的「可组合稳定池」,挑选那些本该 1:1 兑换、价格波动很小的资产池,用一套精心设计的换币路径,把系统里的「数学误差」放大成真金白银。最后累计损失超 1.25 亿美元。像是一场对秤砣的精度下手:不是把秤砣偷走,而是让秤显示偏一点点,每次都多称出几克,积少成多,仓库就空了。 为啥说是「数学误差」?不都是小数点的事吗? ——王小楼 关键在「放大」和「缩小」的规矩不一致。池子里不同币有不同精度,系统先把数值统一「放大」(乘法),再算完「缩小」(除法)。问题是:放大时只朝一个方向「往小里取整」(mulDown),缩小时则既可能往上也可能往下(divUp / divDown)。这就像称水果时,进秤前你总先抖掉边角(只往下取),出秤时却有时补一点有时扣一点。按理说,所有取整都该「偏向商家」,保证系统不吃亏;可这里的偏向不一致,给了攻击者「从缝里走」的机会。 他到底动了啥手脚? ——王小楼 他用的是「批量换币」(batchSwap)的 GIVEN_OUT 模式——先定好想要拿出的币量,让系统倒推该付多少。可系统在这一步把「想要拿出的量」错误地先做了往下取整的放大,导致后续「该付多少」的计算被低估。换成生活比喻:你点了 8 个饺子,厨房用他们的尺子一量,变成了「8 个不到」,于是收你钱就少算了。攻击者把路径、次数、数值都算得极准,让这个「少算」持续发生,最终把池子的核心计量值 D(相当于池子虚拟总资产)压小,结果就是池子的股权凭证 BPT 变得「看起来更便宜」。 便宜了就能赚钱?怎么套出来的? ——王小楼 三步走,像挤牙膏: 1)先用 BPT 换出底层资产,把其中一个币的余额卡到一个「取整边界」的临界点上——就像把杯中水恰好抹到刻度线上。 2)再用另一种底层币去换它,故意用触发「往下取整」的数值,让系统小看了你付出的量,D 被压低,BPT 的「标价」随之降低。 3)最后把底层资产换回 BPT。因为「标价被压低」,你就能多拿到一些 BPT,相当于用同样的钱买到了更多股权,再慢慢兑回真币,差价就是利润。 他为啥分两次交易?不是一次捞完更爽? ——王小楼 高手下棋不求一手爽,而求不被看出。第一阶段在一笔交易里完成核心操纵,但不立刻盈利;第二阶段再提走资产。就像先把天平调倾,再回头用倾斜的天平称货拿货,既降低了被风控或观察者立刻拦截的概率,也方便复制到其他链和同类项目。 听起来像踩了系统暂停键,为啥没人按? ——王小楼 这次协议在某些约束下无法立即「全局暂停」。结果一旦有人打开了这条缝,后来者就能沿着同样的路径复制攻击。就像商场发现秤有问题却暂时不能关门,前面有人钻空子,后面就一排人跟着来。 这里面最核心的教训是啥? ——王小楼 有三条,像修桥的铁律: 取整的方向必须一致且永远「偏向系统安全」。 别指望「小误差可忽略」,因为金融系统里,误差是可编排、可放大的。提高计算精度、统一放大/缩小的规则、在关键路径上做不利于攻击者的保护性取整,是底线。 攻击者会把数学、工程和运营拼成一条产业链: 先用离线 链上仿真把参数调到极致,再用多阶段交易躲开监控。别把攻击想成「粗暴砸门」,更像「开锁匠」耐心试齿。 风险响应要有「刹车」和「减速带」: 快速告警、可控的暂停或限流、对可疑路径的实时阈值与回滚机制,能把小洞守成小洞,不至于扩成塌方。 我不懂那些公式,你能再打个比方吗? ——王小楼 把池子想成一个共同出资的果园,D 是果园的「总产能尺」,BPT 是分给股东的「地契份额」。攻击者没有砍树,而是动了量尺:把尺子的毫米刻度做了偏差,测量时总是「少算一点」。然后他先把一棵树的产量卡在尺子的临界点,再用另一棵树来回调,把「总产能尺」看起来变小,于是地契就更便宜。他再用便宜价买更多地契,最后按照正规渠道把地契兑换回果实,多出来的就是他的利润。 普通人咋判断「这类池子」是不是容易出事? ——王小楼 记住三问: 这个系统的放大/缩小(精度转换)是否方向一致?文档里有无「只下不上」的取整? 核心定价是否严重依赖取整敏感的路径(比如 GIVEN_OUT 的反推)? 是否具备紧急暂停或限流?没有刹车的快车,再小的颠簸都会变事故。 实在不懂,就把资金分散在不同协议,优先选择有实时监控、可暂停能力的产品。 啥时候该出手投资、啥时候该躲? ——王小楼 长期思维的原则是: 看机制,不看热度。 取整和精度是金融代码的地基,地基松,楼再漂亮都别住。 看应急能力,不看宣传。 谁能在一分钟里减速、限流、拉闸,谁就更值得信。 分散配置、设上限。 就像开车系安全带——你不希望用到,但必须有。 躲,是在看到「精度不一致 无法暂停」的组合;出手,是在看到「精度提升 规则统一 响应完善」的版本更新后。 这事儿会不会再发生? ——王小楼 只要有「精度—取整—定价」三者交汇的系统,就会有可被编排的缝。但行业能进步:统一取整方向、全面采用高精度算术、在关键函数外包裹保护性检查、引入模拟与形式化验证,再加上运营侧的快响应与防复制机制,能把风险压到可控范围。长期看,这类事件像疫苗,疼一次,免疫系统就更强。
3
1
4
1,659