Description:
Decentralized Finance (DeFi) protocol contract providing Swap functionality.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.29;
interface IERC20 {
function transfer(address to, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function WETH() external pure returns (address);
function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);
}
contract TripleSellBurner {
address public owner;
// Token addresses
address constant OWLNEKO = 0x44A3d4CDefD2c3002b743c16fd4952E53e16FF1b;
address constant RDP = 0x1401Aec9a8cf3090045a67bD07FEACfFBc31B50C;
address constant SUPERBOWL = 0x2cdCE6F390C181632d749E52e75AFA838b204D20;
// Router
IUniswapV2Router02 constant router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// Sell amounts (100 tokens each)
uint256 constant RDP_SELL_AMOUNT = 100 * 10**18;
uint256 constant OWLNEKO_SELL_AMOUNT = 100 * 10**18;
uint256 constant SUPERBOWL_SELL_AMOUNT = 100 * 10**18;
// Slippage settings based on your tax rates
uint256 constant RDP_SLIPPAGE = 9000; // 10% slippage (5% tax + buffer)
uint256 constant SUPERBOWL_SLIPPAGE = 8000; // 20% slippage (10% tax + buffer)
uint256 constant OWLNEKO_SLIPPAGE = 9500; // 5% slippage (0% tax + buffer)
modifier onlyOwner() {
require(msg.sender == owner, "Not owner");
_;
}
constructor() {
owner = msg.sender;
// Approve router to spend tokens
IERC20(RDP).approve(address(router), type(uint256).max);
IERC20(OWLNEKO).approve(address(router), type(uint256).max);
IERC20(SUPERBOWL).approve(address(router), type(uint256).max);
}
// Sell 100 RDP tokens (5% tax)
function sellRDP() external onlyOwner {
require(IERC20(RDP).balanceOf(address(this)) >= RDP_SELL_AMOUNT, "Insufficient RDP");
address[] memory path = new address[](2);
path[0] = RDP;
path[1] = router.WETH();
uint256[] memory amounts = router.getAmountsOut(RDP_SELL_AMOUNT, path);
uint256 minOut = (amounts[1] * RDP_SLIPPAGE) / 10000;
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
RDP_SELL_AMOUNT,
minOut,
path,
address(this),
block.timestamp
);
}
// Sell 100 OWLNEKO tokens (0% tax)
function sellOwlneko() external onlyOwner {
require(IERC20(OWLNEKO).balanceOf(address(this)) >= OWLNEKO_SELL_AMOUNT, "Insufficient OWLNEKO");
address[] memory path = new address[](2);
path[0] = OWLNEKO;
path[1] = router.WETH();
uint256[] memory amounts = router.getAmountsOut(OWLNEKO_SELL_AMOUNT, path);
uint256 minOut = (amounts[1] * OWLNEKO_SLIPPAGE) / 10000;
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
OWLNEKO_SELL_AMOUNT,
minOut,
path,
address(this),
block.timestamp
);
}
// Sell 100 SUPERBOWL tokens (10% tax)
function sellSuperbowl() external onlyOwner {
require(IERC20(SUPERBOWL).balanceOf(address(this)) >= SUPERBOWL_SELL_AMOUNT, "Insufficient SUPERBOWL");
address[] memory path = new address[](2);
path[0] = SUPERBOWL;
path[1] = router.WETH();
uint256[] memory amounts = router.getAmountsOut(SUPERBOWL_SELL_AMOUNT, path);
uint256 minOut = (amounts[1] * SUPERBOWL_SLIPPAGE) / 10000;
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
SUPERBOWL_SELL_AMOUNT,
minOut,
path,
address(this),
block.timestamp
);
}
// Sell ALL tokens in one transaction
function sellAll() external onlyOwner {
// Sell RDP
if (IERC20(RDP).balanceOf(address(this)) >= RDP_SELL_AMOUNT) {
address[] memory pathRDP = new address[](2);
pathRDP[0] = RDP;
pathRDP[1] = router.WETH();
uint256[] memory amountsRDP = router.getAmountsOut(RDP_SELL_AMOUNT, pathRDP);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
RDP_SELL_AMOUNT,
(amountsRDP[1] * RDP_SLIPPAGE) / 10000,
pathRDP,
address(this),
block.timestamp
);
}
// Sell OWLNEKO
if (IERC20(OWLNEKO).balanceOf(address(this)) >= OWLNEKO_SELL_AMOUNT) {
address[] memory pathOWL = new address[](2);
pathOWL[0] = OWLNEKO;
pathOWL[1] = router.WETH();
uint256[] memory amountsOWL = router.getAmountsOut(OWLNEKO_SELL_AMOUNT, pathOWL);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
OWLNEKO_SELL_AMOUNT,
(amountsOWL[1] * OWLNEKO_SLIPPAGE) / 10000,
pathOWL,
address(this),
block.timestamp
);
}
// Sell SUPERBOWL
if (IERC20(SUPERBOWL).balanceOf(address(this)) >= SUPERBOWL_SELL_AMOUNT) {
address[] memory pathSBL = new address[](2);
pathSBL[0] = SUPERBOWL;
pathSBL[1] = router.WETH();
uint256[] memory amountsSBL = router.getAmountsOut(SUPERBOWL_SELL_AMOUNT, pathSBL);
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
SUPERBOWL_SELL_AMOUNT,
(amountsSBL[1] * SUPERBOWL_SLIPPAGE) / 10000,
pathSBL,
address(this),
block.timestamp
);
}
}
// Check token balances
function getBalances() external view returns (uint256, uint256, uint256) {
return (
IERC20(RDP).balanceOf(address(this)),
IERC20(OWLNEKO).balanceOf(address(this)),
IERC20(SUPERBOWL).balanceOf(address(this))
);
}
// Withdraw ETH from contract
function withdrawETH() external onlyOwner {
payable(owner).transfer(address(this).balance);
}
// Withdraw tokens from contract
function withdrawTokens(address token, uint256 amount) external onlyOwner {
IERC20(token).transfer(owner, amount);
}
receive() external payable {}
}
Submitted on: 2025-10-13 10:04:38
Comments
Log in to comment.
No comments yet.