Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding Ethereum Wallet Ownership and Potential Recovery of Unclaimed ETH #1

Open
wVindice opened this issue Oct 28, 2024 · 1 comment

Comments

@wVindice
Copy link

Dear @re2005, @renasboy

I hope this message finds you well.

I am reaching out to confirm if you are the owner of the Ethereum wallet address 0x3a44fc70077511f4ea72171dd000021a2133158e. If so, I would like to bring to your attention that I have identified three inactive smart contracts named ETHLottery that appear to have a balance totaling 2.017 ETH. The contract addresses are as follows:

  • 0x2c46664818784A86eE0E371fa951d1bFa083944e - Balance: 1.54 ETH
  • 0x4F6079f46f4FD13BDbACCC48E8106621d29AFbbE - Balance: 0.38 ETH
  • 0xC5559887f94EA5c406b3f6D582dC738C4cF0eAcE - Balance: 0.097 ETH

If you are the owner of these contracts, it may be possible to recover the funds using the destruct() function, as outlined in the contract:

function destruct() isClosed isOwner {
    Destroy();
    selfdestruct(owner);
}

To execute this, the contract must satisfy the following condition for the isClosed modifier:

modifier isClosed() {
    require(!open);
    _;
}

This can be achieved by ensuring the contract balance exceeds the jackpot amount, through the following function:

function play(bytes1 _byte) payable isOpen isPaid returns (bool) {
    bettings[_byte].push(msg.sender);
    if (this.balance >= jackpot) {
        uint256 owner_fee_amount = (this.balance * owner_fee) / 100;
        if (!owner.send(owner_fee_amount)) {
            return false;
        }
        open = false;
        result_block = block.number + 10;
        Open(open);
    }
    Balance(this.balance);
    Play(msg.sender, _byte, now);
    return true;
}

In summary, when the contract balance meets the jackpot threshold, you can call the destruct() function to withdraw the ETH.

If you do not have enough ETH to meet the jackpot threshold, another option would be to create an intermediary smart contract to execute a flash loan. This would temporarily provide the required ETH to meet the balance requirement, allowing you to close and withdraw from the ETHLottery contracts. Afterward, you can repay the flash loan by withdrawing the ETH using the accumulate() function in the intermediary contract:



function accumulate() isOriginalOwner isClosed isAccumulated {
    accumulate_to = msg.sender;
    if (msg.sender.send(this.balance)) {
        Accumulate(msg.sender, this.balance);
    }
}

If needed, I can provide a suitable intermediary contract to handle this process, along with a demonstration using a forked network on Hardhat.

If this recovery is successful, I would be sincerely grateful if you could consider sharing a small portion as a token of appreciation for discovering this opportunity.

Thank you very much for your time and consideration, and please let me know if you would like to discuss further.

Best regards,

@re2005
Copy link
Owner

re2005 commented Oct 28, 2024

Yes @wVindice you are absolutely right.

You can see in the past that I've tried already to destroy this contract:

https://etherscan.io/address/0x3a44fc70077511f4ea72171dd000021a2133158e

Would be interesting to see how can we recover the founds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants