Sui DeFi lending protocol Scallop is hacked, with a vulnerability in the old contract leading to 150k SUI stolen

SUI-1,88%
LTC-1,56%

Sui on-chain DeFi lending protocol Scallop issued a security incident notice on its official X account (@Scallop_io), confirming that the platform was attacked. Scallop said that the team found that a side contract related to the sSUI rewards pool was exploited, resulting in a loss of about 150k SUI. Scallop emphasized that the affected contracts have been frozen, the core contract remains safe, and only the sSUI rewards pool was impacted.

In a subsequent update, Scallop further stated: “The core contract has been unfrozen, and all operations have been restored. This issue is not related to the core protocol; it is limited to a deprecated rewards contract. User deposits are not affected. All funds are safe, and the deposit and withdrawal functions have resumed normal operation.” The team promised to share more details and to continuously monitor and strengthen protocol security.

Former NEAR core member Vadim: The problem lies in an old package from 17 months ago

Regarding this incident, former NEAR core developer Vadim (@zacodil) published an in-depth technical analysis on X, revealing the details of the vulnerability. Vadim pointed out that the attacker knew exactly which deprecated package to call. "It’s not the code currently running, and it’s not the SDK path—it’s an old V2 from November 2023 that went unused for months. That means it was either deeply reverse-engineered, or someone already knew where to look. This vulnerability has been lurking for 17 months.

Vadim explained that spool tracks an index that grows as rewards are allocated. When each user account is staked, it should have recorded the last_index at that moment, so the formula for the points earned is: staked amount × (current_index − last_index); users can only earn rewards from the time they joined.

But in the deprecated V2 package, when a brand-new spool_account is created, last_index is not initialized and remains 0. Therefore, when update_points runs, the calculation result becomes: points = staked amount × (current_index − 0) = staked amount × the full historical index. The user is credited with all rewards accumulated since the spool was created in August 2023.

Vadim provided specific data: the spool index grew to 1.19 billion over 20 months. The attacker staked 136k sSUI and instantly received a credit of 162 trillion points. Because the rewards pool uses a 1:1 conversion ratio (both numerator and denominator are 1), 162 trillion points directly converts into rewards worth 162k SUI. But the rewards pool only had 150k SUI, so it was drained entirely.

All April on-chain security incidents occurred in surrounding systems

Vadim explained that normal users use the SDK to use the new package, and the new package has fixed the last_index synchronization issue. The reason the old V2 package still remains on-chain is because Sui packages are immutable. — Once published, every old version can be called forever. The shared Spool and RewardsPool objects accept calls from any version, and the attacker bypassed the SDK to directly hit the old code path.

Vadim categorized this as a “Sui outdated package type vulnerability.” He pointed out that the correct fix requires adding a version field to the shared object and adding an assert!(version == CURRENT_VERSION) check in every function. Without this mechanism, every previously published package version will forever remain an active attack surface.

Vadim further noted that most attack incidents this month did not occur in the core protocol code, but in surrounding systems:

KelpDAO: RPC infrastructure

Litecoin: MWEB privacy layer

Aethir: access control for peripheral adapters

Scallop: forgotten deprecated package

This article about the hacking of the Sui on-chain DeFi lending protocol Scallop, where a vulnerability in an old contract led to 150k SUI being stolen, first appeared on Chain News ABMedia.

Disclaimer: The information on this page may come from third parties and does not represent the views or opinions of Gate. The content displayed on this page is for reference only and does not constitute any financial, investment, or legal advice. Gate does not guarantee the accuracy or completeness of the information and shall not be liable for any losses arising from the use of this information. Virtual asset investments carry high risks and are subject to significant price volatility. You may lose all of your invested principal. Please fully understand the relevant risks and make prudent decisions based on your own financial situation and risk tolerance. For details, please refer to Disclaimer.

Related Articles

AI Agents Drive Crypto Payments Demand, x402 Processes 165M Transactions

Gate News message, April 27 — Jesse Pollak, an executive at a major CEX, has argued that autonomous AI agents are creating a new "demand center" for crypto payments, requiring software-native payment infrastructure. On April 20, it was announced that the x402 ecosystem had processed more than 165

GateNews1m ago

Developer Proposes Bitcoin Hard Fork to eCash With 1:1 Distribution, Sparks Debate Over Satoshi Address Allocation

Gate News message, April 27 — Developer Paul Sztorc has proposed a Bitcoin hard fork scheduled for August 2026 at block height 964,000 to create a new blockchain called eCash, according to CoinDesk. The fork will distribute eCash to users holding BTC at a 1:1 ratio and introduce Drivechains

GateNews41m ago

Western Union Remittance Q1 earnings call confirms: USDPT stablecoin launches in early May

According to remarks made by Western Union President and CEO Devin McGranahan during the company’s first-quarter earnings call on April 24, Western Union confirmed that its USDPT stablecoin is currently in the final preparation stage and is expected to go live in May.

MarketWhisper1h ago

Justin Sun calls TRON the world’s first post-quantum attack-resistant network, with the mainnet going live in Q3 of 2026.

TRON founder Justin Sun announced on X on April 26 that TRON plans to enable anti-quantum attack functionality on the testnet in the second quarter, with a mainnet launch planned for the third quarter. In the post, Justin Sun referred to this upgrade plan as “the world’s first anti-quantum attack network.” Although quantum threats are still largely theoretical for now, Ethereum, Solana, and others have already published post-quantum cryptography (PQC) upgrade plans or timelines.

MarketWhisper1h ago

DeFi United’s crowdfunding campaign raises 102,000+ ETH, with AAVE rebounding to $100

According to the official DeFi United page, the multi-protocol relief fund DeFi United, initiated and led by Aave service providers, has raised more than 102k ETH as of April 27. The goal is to cover the bad-debt shortfall created in the Aave V3 market after the April 18 Kelp DAO cross-chain bridge attack incident. AAVE briefly broke above $100 before falling back.

MarketWhisper2h ago

Vcitychain DPoS Mainnet Goes Live with Self-Developed Consensus System

Gate News message, April 27 — Vcitychain, a commercial-grade blockchain, officially launched its DPoS mainnet today, transitioning to a self-developed Delegated Proof of Stake (DPoS) consensus system. The upgrade aims to enhance network performance, increase decentralization, and improve on-chain g

GateNews2h ago
Comment
0/400
No comments