Skip to content
Business logic Write-up Advanced

Rocketpool And Lido Frontrunning Bug Fix Review

A malicious node operator could front-run a staking pool's deposit to the Ethereum deposit contract with their own deposit data for the same validator key, using their own withdrawal credentials. This allowed the attacker to steal most of the pool users' staked ETH.

immunefi.com

Published on immunefi.com

Whitehat Dmitri Tsumak, founder of StakeWise, submitted a critical vulnerability on October 5th that affected the RocketPool and Lido Finance staking platforms. The vulnerability allowed for the node operator to steal user deposits.

The author, on immunefi.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The deposit contract and beacon chain process deposits in order and allow multiple deposits for the same validator key, so a front-run deposit with the same key but different withdrawal credentials can set the withdrawal address before the pool's deposit.

What the attacker needed

Be a node operator in the staking pool; ability to front-run transactions; pool submits deposit for validator

The fix

Lido implemented a temporary fix by lowering staking limits to currently staked amounts, and RocketPool was working on a fix with auditors before public launch.

How it was found

  1. Become a node operator in the staking pool.
  2. Generate deposit data with the same validator public key, minimal deposit, and attacker's withdrawal credentials.
  3. Wait for the pool to submit 32 ETH to the deposit contract for that validator.
  4. Front-run the pool's deposit by calling deposit() with the prepared data.
  5. The pool's deposit then increases the attacker's balance, giving them control of the funds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Staking pools let many people combine their money to earn rewards. A node operator is the person who runs the computer that validates transactions. The bug let that operator trick the system into sending the pool's money to themselves instead of the pool.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.