SharedStake Hack
What happened
Remaining members of the SharedStake core team said an insider, who had been given access to a bug report about a flaw in the team's SGT timelock contracts, used that flaw to take locked SGT out early. The flaw had been reported through Immunefi and let the beneficiary of the timelocked funds move them before their release date. The withdrawals ran across several transactions on June 19 and June 23, 2021 and were worth about $500,000. SGT fell roughly 95%, and the team told users to withdraw SGT and vETH2 liquidity from its mining contracts and the Saddle ETH-vETH2 pool. Immunefi put the SharedStake bug bounty program on hold pending an exploit investigation.
On-chain transactions:
- First use on mainnet (June 19):
0x9400daa8711b4326e7b3bb7a4874099e5c7fe801c8b1488ff91bd6e5de332c9f - Further timelock calls (June 23):
0x68dcf70e021684c414ec7512fd58b84098a020d62459b23f690f76a6ca6f38c5,0x466bca01f2648ea855a018edce701d8bb9ca1b53853b076dfe15da7ea379cf39,0x2dff7aa6b1f1f128b60504a5f195589597590765baf8d7607540fe3712328313
Some of the proceeds were swapped into USDC and vETH2.
How it happened
- The team's SGT allocation sat in timelock contracts meant to release tokens to a beneficiary on a schedule, with a
transfersAllowedflag that was still false. - The timelock exposed a generic
call(address to, uint256 value, bytes data)function to its beneficiary. The contract did not restrict which target or calldata could be used. - On June 19 and June 23, 2021, the beneficiary address used
call()to make the timelock callapproveon the old SGT token contract, granting the caller an allowance over the timelock's locked SGT. The timelock's ownCallevent loggedtransfersAllowedas false while this happened. - With the allowance in place, the locked SGT could be pulled out with ordinary ERC-20 transfers before the schedule allowed it, about $500,000 worth in total. A final call on June 23 reset the allowance to zero.
- The SGT was sold and the price fell about 95%.
Protocol details
Security review history
- CertiK View report
Evidence
- report Post-mortem medium.com
- transaction Etherscan transaction 0x9400daa8...c9f etherscan.io
- transaction Etherscan transaction 0x68dcf70e...8c5 etherscan.io
- transaction Etherscan transaction 0x2dff7aa6...313 etherscan.io
- transaction etherscan.io transaction 0x466b…cf39 etherscan.io
- code Immunefi Web3-Security-Library BugFixReviews README (SharedStake entry) github.com
- analysis DeFiLlama defillama.com
- analysis SharedStake Down 95% After Insider Exploit thedefiant.io
- analysis Developer 'rug pulls' Ethereum DeFi project SharedStake, SGT token falls 95% cryptoslate.com
- analysis Immunefi SharedStake bug bounty page immunefi.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.