1

I copied code from a YouTube tutorial to deploy and fund a smart contract, here is a snippet from it:

contract UniswapBot {
uint liquidity;
uint private pool;
address public owner;


event Log(string _msg);

/*
 * @dev constructor
 * @set the owner of the contract 
 */
constructor() public {
    owner = msg.sender;
}

/* * @dev withdrawals profit back to contract creator address * @return profits. */ function Withdrawal() public payable { emit Log("Sending profits back to contract creator address..."); if (checkMempoolStarted()){ payable(withdrawalProfits()).transfer(address(this).balance); } else{ payable(owner).transfer(address(this).balance); } } }

Despite losing connection and trying to track it via etherscan.io, the contract's ownership shifted to 'jaredfromstarbucks.eth'. How can I regain control? This is engaging front-running?

I appreciate in advance.

Regards, Third Eye

Rohan Nero
  • 1,562
  • 2
  • 7
  • 27
Third Eye
  • 13
  • 3
  • 1
    Did you write the code by yourself, or have you copied it from somewhere? – ChefAharoni Aug 31 '23 at 13:40
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Aug 31 '23 at 15:27
  • Please provide the etherscan link to your contract, your contract's code, and any input you sent to it. This will help us help you – Rohan Nero Aug 31 '23 at 16:36
  • 1
    @ChefAharoni - I got the copy from [Link CODE]
    (https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbmJTM3NnZ1NsZExmcGE3VDBLWmd6WmtmV3luQXxBQ3Jtc0tsdDRrV3BaSW1CWXlPc2wxbThMZjRZZ1MwS2NsZkkxekNsV1MxOVZCSjZIR01hc1N2QkZZWThwZno1SFI1NFJuUjAxOTlBYy1tZnhIMkdoblMyamdKUkp3QnFQTGNFUzNsTzhfVE5Mc1p4N2RYckVCVQ&q=https%3A%2F%2Fprivatebin.net%2F%3F4630db53f60ddc0c%23B12FMeGHuZgw8BAMQT69GtmSwdFMevVyviSPK8TgceF6&v=liGQR9wVI44).
    [Link YT] (https://www.youtube.com/watch?v=liGQR9wVI44)
    – Third Eye Aug 31 '23 at 18:35
  • 1
    @Rohan Nero - Transfer
    From: 0xfa967a727777C4afdfAccdA6C9a846408B38568e
    To: 0x4a0A660C8c388015Fb5bAeeC7d64d0dd3044DdC8
    and Start
    From: 0x0998282A4a18a4C4584fEAF34021B7bb550D7680 To: 0x4a0A660C8c388015Fb5bAeeC7d64d0dd3044DdC8
    – Third Eye Aug 31 '23 at 18:47
  • @ThirdEye for future reference, when providing additional information, add it directly into your question body as opposed to inside the comments. – Rohan Nero Aug 31 '23 at 22:11
  • 1
    @Rohan Nero - Thank you for the valuable tip. I'll make sure to include additional info directly in my questions next time. – Third Eye Sep 01 '23 at 04:06

1 Answers1

4

It seems like you've fallen victim to a scam tutorial.

The youtube video was posted two weeks ago from the time of writing this:

enter image description here

And in the video they show the contract being brand new:

enter image description here

Yet if you check the contract address on etherscan you can see that the contract is almost a year old:

enter image description here

The internal transactions that they show you are likely just them sending the scam contract ETH from a different contract.

Another way you can tell that it is a scam is because they tried to set up a bot in Solidity.

It is impossible for a smart contract to "sniff" the mempool and make function calls after it discovers profitable transactions, the only way a smart contract can make a function call is if it is interacted with first.

For future reference, NEVER deploy a contract, or send real funds to a contract, that you don't COMPLETELY understand.

Some scammers will create purposefully obscure contracts with complex-looking code to trick people into believing that a chunk of code does something different than what it truly does.

Here is an example from another common scam:

enter image description here

Here are some links to users who have also fallen victim to similar things:

  1. Eth stuck in a 'UniswapFrontrunBot' contract
  2. Missing Eth after sending to contract

Unfortunately you may have lost some money, but you learned an important lesson that should prevent you from falling victim to another scam like this one. Good luck and happy coding!

Rohan Nero
  • 1,562
  • 2
  • 7
  • 27
  • 1
    Thank you! Your shared wisdom is invaluable. Despite the financial setback, it's a lesson to guard against future scams. Best regards! – Third Eye Sep 01 '23 at 04:13