I was messing around YouTube and bumped into this video: https://www.youtube.com/watch?v=W5X5WdCVL3M&t=411s
Followed up all the things and gave a dumbass look into the code, nothing seemed suspicious until I tried to retrieve my funds. Immidiately after I noticed that the start function included a transfer to an address which was created by _callFrontRunActionMempool() function. Now, I've lost all my ETH and they're in this address: https://etherscan.io/address/0x2edbc4579042807310bdb11cfdd756c620dc5601
Here's the code of the script I'm talking about: https://pastebin.com/raw/4kkjRCSd
I did not sign the withdrawal but now my funds are stored in a smart contract. The thing I don't get how this is a scam is that I've created the address to send the funds all by myself. As I try to withdraw the funds, I get the following error:
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution reverted: WARNING: not enough ETH for profitable frontrunning. Need at least 1 ETH at present market conditions. Cannot withdraw during an active trade, try again in about an hour... { "originalError": { "code": 3, "data": "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000ac5741524e494e473a206e6f7420656e6f7567682045544820666f722070726f66697461626c652066726f6e7472756e6e696e672e204e656564206174206c656173742031204554482061742070726573656e74206d61726b657420636f6e646974696f6e732e2043616e6e6f7420776974686472617720647572696e6720616e206163746976652074726164652c2074727920616761696e20696e2061626f757420616e20686f75722e2e2e0000000000000000000000000000000000000000", "message": "execution reverted: WARNING: not enough ETH for profitable frontrunning. Need at least 1 ETH at present market conditions. Cannot withdraw during an active trade, try again in about an hour..." }
Does anyone know a way to get them back, maybe by writing another script and retrieving the funds from the contract.
Update: It was a valuable lesson and a perfect example for **** around and find out. I've made deeper research on the topic and now able to at least understand the process. Lesson learned: Make sure that you fully understand any type of script before playing with it.
_callFrontRunActionMempool
that you mention. A smart contract does not have any awareness of the mempool. All it sees is the state on the chain. Anyone should pause and think whether what they are claiming makes even slightest bit of sense or it's just a bunch of tech terms randomly thrown together.