here's a short description for people not involved in crypto world.
There's a Metamask crypto wallet that was connected to BNB network, and used to stake some tokens (freeze them for long time to get rewards). This wallet somehow got hacked and private key was extracted (either by a malicious plugin, or phishing link, or smart contracts - whatever). Now, every time this wallet gets a BNB deposit, it gets instantly drained to 0 by a sweeper bot.
So, the question is...
How does one withdraw staked tokens without losing them?
Below there are a few things that came to my mind - but I'm not an expert in web3/dapps/smart contracts.
- Use flashbot network! https://github.com/flashbots/searcher-sponsored-tx
Yeah... but this only works for Ethereum ERC-20, and not for BNB. BNB chain does not have MEV implemented, so according to me, it is not possible to create a "burner bot" that would prevent an attacker to fund the wallet and withdraw unstaked tokens.
- Use smart contract, create a sponsor wallet with BNB, and set a beneficiary wallet address, and use it to unstake coins, and then use it one more time to withdraw them.
Sounds simple... but this is a theory. Question is... how to do it in practice.
- Use smart contract to transfer BNB to affected wallet. It would potentially be invisible to a sweeper bot, as most of them are monitoring the transactions for specific wallet address, and smart contract would not create a transaction. It would "push" the amount to that wallet inside a block, directly to the blockchain.
Again, sounds simple, and could be tested. Question is... how to do it in practice.
I've seen quite a few similar subjects - and none of them had a real solution. In fact, most of them were closed with info that "BNB chain does not support MEV - end of story".
I am really open to any suggestions, guidances, learning how to deploy such smart contracts, in order to unstake and recover these tokens.
Would there be anyone with such skills, willing to help and share some other ideas?