Level 31 - Stake ⏺⏺⏺

Level Setup

Stake is safe for staking native ETH and ERC20 WETH, considering the same 1:1 value of the tokens. Can you drain the contract?

To complete this level, the contract state must meet the following conditions:

  • The Stake contract's ETH balance has to be greater than 0.

  • totalStaked must be greater than the Stake contract's ETH balance.

  • You must be a staker.

  • Your staked balance must be 0.

Things that might be useful:

Level Contract

Exploit

  1. Submit instance... 🥳

Completion Message

Congratulations, you have cracked the Stake machine!

When performing low-level calls to external contracts, it is important to properly validate external call returns to determine whether the call reverted.

For more info, check out EEA EthTrust [S] Check External Calls Return requirement, and always use SafeERC20 when interacting with external ERC-20 tokens.

Notes

Last updated