# Drift Protocol $285M Hack — कैसे महीनों की Prep ने 12 मिनट में Execute किया
1 April 2026, 03:47 UTC — Drift Protocol से $285 million drain हुए।
2026 का सबसे बड़ा DeFi exploit। Lazarus Group (North Korea) को attribute किया गया।
यह hack महीनों की planning, sophisticated social engineering, oracle manipulation, और compromised admin key का result था।
12 मिनट में execute, 6 महीने की prep।
Drift Protocol क्या है?
Drift Protocol — Solana पर perpetual futures DEX।
- $500M+ TVL (Total Value Locked) — Solana DeFi में top 3
- Leverage trading (up to 10x)
- Cross-collateral margin
- Internal oracle system (DLOB — Decentralized Limit Order Book)
Users ETH, SOL, BTC, stablecoins deposit करते थे, और leverage positions open करते थे।
Timeline — 6 महीनों की Prep, 12 मिनट का Execution
Phase 1: Social Engineering (October 2025 - February 2026)
Lazarus ने Drift team members को fake job offers और partnership proposals भेजे।
Techniques:
- LinkedIn पर fake recruiter profiles
- "Senior Solana Engineer" positions
- Malware-laden PDF attachments
- Fake Zoom calls जो screen share करते समय keyloggers install करते थे
Result: 1 team member का laptop compromised हुआ। Direct admin key access नहीं मिला, लेकिन internal infrastructure का knowledge मिला।
Phase 2: Token Creation और Wash Trading (February - March 2026)
Lazarus ने fake tokens create किए (Solana SPL tokens):
- DRIFT2 (fake version of DRIFT governance token)
- USDR (fake stablecoin)
Wash trading के through price inflate किया:
DRIFT2 price: $0.0001 → $12.50 (fake volume: $80M)
USDR price: $1.00 → $1.20 (to trick oracles)
Raydium और Orca DEXs पर liquidity pools create किए, fake volume generate किया।
Goal: Drift के internal oracle को fool करना।
Phase 3: Admin Key Compromise (25 March 2026)
Lazarus ने multisig wallet के 1 signer को compromise किया।
How?:
- Compromised laptop से signer का seed phrase निकाला (password manager में stored था)
- Multisig था 2-of-3, लेकिन 2 signers एक ही person के थे (OPSEC failure)
- Lazarus ने both keys control कर लिए
Phase 4: Execution (1 April 2026, 03:47-03:59 UTC)
12 मिनट में:
Breakdown:
- $120M USDC
- $80M SOL
- $55M ETH (bridged from Solana)
- $30M other tokens (BONK, JUP, RAY)
Technical Analysis — Kaise Hua
1. Oracle Manipulation
Drift का internal oracle DLOB-based था — decentralized limit order book के trades से price feed करता था।
Vulnerable code (Rust, Solana program):
// Simplified Drift oracle logic (vulnerable)
pub fn get_oracle_price(market: &Market) -> Result<u64> {
let recent_trades = market.get_recent_trades(100)?;
let total_volume: u64 = recent_trades.iter().map(|t| t.volume).sum();
let weighted_price: u64 = recent_trades.iter()
.map(|t| t.price * t.volume)
.sum::<u64>() / total_volume;
Ok(weighted_price)
}
Problem: No TWAP (Time-Weighted Average Price), no outlier filtering, no minimum liquidity threshold।
Lazarus ने fake trades के through price manipulate किया:
Normal USDR price: $1.00
Lazarus wash trades USDR at $1.20 for 2 minutes
Oracle updates: $1.20
Lazarus opens leveraged position using inflated collateral value
Solidity equivalent (vulnerable oracle):
// DO NOT USE — vulnerable pattern
contract VulnerableOracle {
struct Trade {
uint256 price;
uint256 volume;
uint256 timestamp;
}
Trade[] public recentTrades;
function updatePrice(uint256 price, uint256 volume) external {
recentTrades.push(Trade(price, volume, block.timestamp));
if (recentTrades.length > 100) {
// Remove oldest
for (uint i = 0; i < recentTrades.length - 1; i++) {
recentTrades[i] = recentTrades[i + 1];
}
recentTrades.pop();
}
}
function getPrice() external view returns (uint256) {
uint256 totalVolume;
uint256 weightedPrice;
for (uint i = 0; i < recentTrades.length; i++) {
weightedPrice += recentTrades[i].price * recentTrades[i].volume;
totalVolume += recentTrades[i].volume;
}
return weightedPrice / totalVolume; // VULNERABLE: no TWAP, no checks
}
}
2. Admin Key Weakness
Drift का vault multisig था, लेकिन:
- 2-of-3 threshold — reasonable
- 2 keys same person के पास — catastrophic
Compromised multisig (Solana program):
// Multisig vault (simplified)
pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
let vault = &mut ctx.accounts.vault;
require!(vault.signatures.len() >= 2, ErrorCode::InsufficientSignatures);
// No timelock, no rate limit
**vault.to_account_info().try_borrow_mut_lamports()? -= amount;
**ctx.accounts.recipient.try_borrow_mut_lamports()? += amount;
Ok(())
}
Problems:
- No timelock (withdrawal immediately executed)
- No daily/hourly withdrawal limits
- No circuit breaker (anomaly detection)
Solidity equivalent (how to fix):
// SECURE multisig vault with timelock + rate limit
contract SecureVault {
uint256 public constant TIMELOCK_DELAY = 48 hours;
uint256 public constant HOURLY_LIMIT = 10_000_000e18; // $10M
struct Withdrawal {
address to;
uint256 amount;
uint256 timestamp;
bool executed;
}
mapping(uint256 => Withdrawal) public pendingWithdrawals;
mapping(uint256 => uint256) public hourlyWithdrawn; // timestamp hour => amount
uint256 public withdrawalCount;
mapping(address => bool) public signers;
uint256 public requiredSignatures = 3; // Increased from 2
event WithdrawalQueued(uint256 indexed id, address to, uint256 amount);
event WithdrawalExecuted(uint256 indexed id);
function queueWithdrawal(address to, uint256 amount) external onlySigner {
// Check hourly rate limit
uint256 currentHour = block.timestamp / 1 hours;
require(hourlyWithdrawn[currentHour] + amount <= HOURLY_LIMIT, "Hourly limit exceeded");
withdrawalCount++;
pendingWithdrawals[withdrawalCount] = Withdrawal({
to: to,
amount: amount,
timestamp: block.timestamp,
executed: false
});
emit WithdrawalQueued(withdrawalCount, to, amount);
}
function executeWithdrawal(uint256 id) external onlySigner {
Withdrawal storage w = pendingWithdrawals[id];
require(!w.executed, "Already executed");
require(block.timestamp >= w.timestamp + TIMELOCK_DELAY, "Timelock not expired");
w.executed = true;
uint256 currentHour = block.timestamp / 1 hours;
hourlyWithdrawn[currentHour] += w.amount;
payable(w.to).transfer(w.amount);
emit WithdrawalExecuted(id);
}
modifier onlySigner() {
require(signers[msg.sender], "Not a signer");
_;
}
}
Key improvements:
- 48-hour timelock — team को react करने का time
- Hourly withdrawal limit — circuit breaker
- Separate queue and execute — 2-step process
3. Lack of Monitoring
Drift के पास real-time anomaly detection नहीं था।
47 withdrawals in 12 minutes — यह immediately red flag होना चाहिए था।
Monitoring जो hona chahiye tha:
// Circuit breaker pattern
contract CircuitBreaker {
uint256 public constant MAX_WITHDRAWALS_PER_HOUR = 5;
uint256 public constant MAX_AMOUNT_PER_HOUR = 50_000_000e18; // $50M
mapping(uint256 => uint256) public withdrawalsThisHour;
mapping(uint256 => uint256) public amountWithdrawnThisHour;
bool public circuitBroken;
function withdraw(uint256 amount) external {
require(!circuitBroken, "Circuit breaker activated");
uint256 currentHour = block.timestamp / 1 hours;
if (withdrawalsThisHour[currentHour] >= MAX_WITHDRAWALS_PER_HOUR ||
amountWithdrawnThisHour[currentHour] + amount > MAX_AMOUNT_PER_HOUR) {
circuitBroken = true;
emit CircuitBreakerActivated(block.timestamp);
revert("Withdrawal limit exceeded, circuit broken");
}
withdrawalsThisHour[currentHour]++;
amountWithdrawnThisHour[currentHour] += amount;
// Proceed with withdrawal
}
function resetCircuitBreaker() external onlyOwner {
circuitBroken = false;
}
event CircuitBreakerActivated(uint256 timestamp);
}
Lazarus Group — Attribution
Lazarus Group — North Korea का state-sponsored hacking unit।
Previous crypto hacks:
- Ronin Bridge ($625M, 2022)
- Harmony Horizon Bridge ($100M, 2022)
- Atomic Wallet ($100M, 2023)
Signature tactics:
- Long-term social engineering
- Fake job offers
- Malware-laden PDFs
- Multisig key targeting
Chainalysis ने on-chain footprints trace किए:
- Tornado Cash usage
- Mixing patterns
- Same wallet clusters as previous Lazarus hacks
Lessons for Solidity/Rust Developers
1. Key Management — सबसे Critical
Best practices:
- Hardware wallets mandatory for admin keys (Ledger, Trezor)
- Different people for multisig signers (never 2 keys same person)
- Threshold signatures (MPC) — Multi-Party Computation, no single point of failure
- Cold/hot wallet split — hot wallet में only operational amount
Foundry test for multisig security:
// Test: ensure multisig has minimum 3 UNIQUE signers
function testMultisigHasUniqueSigners() public {
address[] memory signers = vault.getSigners();
require(signers.length >= 3, "Need at least 3 signers");
for (uint i = 0; i < signers.length; i++) {
for (uint j = i + 1; j < signers.length; j++) {
assertNotEq(signers[i], signers[j], "Duplicate signer found");
}
}
}
2. Oracle Security — TWAP + Multiple Sources
Secure oracle pattern:
contract SecureOracle {
uint256 public constant TWAP_PERIOD = 30 minutes;
uint256 public constant MIN_LIQUIDITY = 1_000_000e18;
struct PricePoint {
uint256 price;
uint256 timestamp;
uint256 liquidity;
}
PricePoint[] public priceHistory;
function updatePrice(uint256 price, uint256 liquidity) external {
require(liquidity >= MIN_LIQUIDITY, "Insufficient liquidity");
priceHistory.push(PricePoint(price, block.timestamp, liquidity));
}
function getTWAP() external view returns (uint256) {
uint256 cutoff = block.timestamp - TWAP_PERIOD;
uint256 totalWeightedPrice;
uint256 totalTime;
for (uint i = priceHistory.length - 1; i > 0; i--) {
if (priceHistory[i].timestamp < cutoff) break;
uint256 timeDelta = priceHistory[i].timestamp - priceHistory[i-1].timestamp;
totalWeightedPrice += priceHistory[i].price * timeDelta;
totalTime += timeDelta;
}
return totalWeightedPrice / totalTime;
}
}
3. Timelocks और Rate Limits
हर high-value operation को timelock+rate limit चाहिए:
- Governance changes
- Admin withdrawals
- Parameter updates
4. Monitoring और Alerts
Off-chain monitoring setup करो:
- Telegram/Discord bot — unusual activity पर alert
- Defender (OpenZeppelin) — automated monitoring
- Tenderly — transaction simulations
Recovery — क्या Drift Funds Recover कर पाई?
Short answer: Partially.
- $85M recovered — some funds traced और frozen (centralized exchanges पर)
- $200M lost — mixed through Tornado Cash, converted to BTC, laundered
Drift ने insurance fund ($30M) से partial compensation दिया।
Protocol 3 महीने suspend रहा, फिर v2 launch किया (improved security)।
Conclusion — 2026 की सबसे बड़ी DeFi Wake-Up Call
Drift hack ने prove किया:
> Security एक one-time audit नहीं है। यह continuous process है।
Key takeaways:
अगला article — Drift के बाद 16 दिनों में 12 और protocols hack हुए। Contagion wave की analysis। 🔴