Booster

Description:

Multi-signature wallet contract requiring multiple confirmations for transaction execution.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "src/Booster.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
                                                                                                                                               
/*

☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal

Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.


                                                      @                               
                                                     @@:                              
                                                    @@@::                             
                                                  ==@@@::::                           
                                                 ===@@@:::::                          
                                                ===+@@+::::::                         
                                               ====@@@::::::::                        
                                              =====@@@:::::::::                       
                                             ======@@@::::::::::                      
                                            =======@@@:::::::::::                     
                                           =======*@@+::::::::::::                    
                                          ========@@@::::::::::::::                   
                                        ==========@@@::::::::::::::::                 
                                       ===========@@@:::::::::::::::::                
                                      ============@@@::::::::::::::::::               
                                     ============*@@=:::::::::::::::::::              
                                    =============@@@:::::::::::::::::::::             
                                   =====@@@======@@@::::::::@@@:::::::::::            
                                  ======@@@======@@@::::::::@@@::::::::::::           
                                 =======@@@======@@@::::::::@@@:::::::::::::          
                                =================@@=:::::::::::::::::::::::::         
                              ==================%@@::::::::::::::::::::::::::::       
                             ===================@@@:::::::::::::::::::::::::::::      
                            ====================@@@::::::::::::::::::::::::::::::     
                           =====================@@@:::::::::::::::::::::::::::::::    
                          =====================+@@-::::::::::::::::::::::::::::::::   
                         ======================@@@@@@@@@@@@@@*::::::::::::::::::::::  
                        =======================@@@@@@@@@@@@@@:::::::::::::::::::::::: 
                       ===================================@@@:::::::::::::::::::::::::
                         =================================@@@:::::::::::::::::::::::  
                          =========@@@@===================@@@::::::::@@@*::::::::::   
                           =========@@@@@@@==============*@@:::::%@@@@@:::::::::::    
                             ===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::      
                              ==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::       
                               ==========================@@@::::::::::::::::::        
                                 ========================@@@::::::::::::::::          
                                  ======================@@@::::::::::::::::           
                                   =====================@@@:::::::::::::::            
                                     ===================@@@:::::::::::::              
                                      ==================@@@::::::::::::               
                                       ================*@@=:::::::::::                
                                         ==============@@@::::::::::                  
                                          =============@@@:::::::::                   
                                           ============@@@::::::::                    
                                             ==========@@#::::::                      
                                              ========@@@::::::                       
                                               =======@@@:::::                        
                                                 =====@@@:::                          
                                                  ====@@@::                           
                                                   ==*@@-:                            
                                                    =@@@:                             
                                                      @                 
                                                

                        
                                         @@@                                                                 
 @@@@@@@@@@@@@@@@@@@                 @@@@@@@                            =======                   ========   
  @@@@@@@@@@@@@@@@@@                   @@@@@                         ====     =====            =====   ===== 
    @@@@@         @@                   @@@@                       =====          ====         ====       === 
    @@@@@          @                   @@@@                      ====             =====      ====         ===
    @@@@@                              @@@@                     ====               =====     ====          ==
    @@@@@                  @@          @@@@                    =====               =====     =====           
    @@@@@       @        @@@@          @@@@      @             =====                =====    =======         
    @@@@@       @@     @@@@@@@@@@@@    @@@@  @@@@@@@@         =====                 =====     =========      
    @@@@@@@@@@@@@        @@@@          @@@@@@    @@@@@        =====                 =====       =========    
    @@@@@      @@        @@@@          @@@@@      @@@@@       =====                 =====         =========  
    @@@@@       @@       @@@@          @@@@        @@@@       =====                 =====           ======== 
    @@@@@                @@@@          @@@@        @@@@       ======                =====              ======
    @@@@@                @@@@          @@@@        @@@@        =====               =====                =====
    @@@@@                @@@@          @@@@        @@@@         =====              =====    ==          =====
    @@@@@           @@   @@@@          @@@@        @@@@          ====             =====     ===         =====
    @@@@@          @@@   @@@@@         @@@@        @@@@           =====          ====       ====        ==== 
   @@@@@@@@@@@@@@@@@@    @@@@@@@@@@   @@@@@@      @@@@@@            =====      ====          =====    =====  
@@@@@@@@@@@@@@@@@@@@       @@@@@@    @@@@@@@@@  @@@@@@@@@              ==========              =========     

   
*/ 

import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IEOS20.sol";

interface IEthPrice {
    function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

contract Booster is Ownable {   
  // Contracts States Mappings Events
    IEOS20 public mainToken;
    IEthPrice public ethUsdFeed;

    uint updateTimeForEthPrice = 4 days;
   
    uint256 public boostApyMultiplier = 20;
    uint256 public boostApyDenominator = 1;

    uint256 public totalBurned; 
    uint public hourCost = 3e18; // 1 dollar
   
    mapping(address => uint256) public boostStartTime; // Effective start time
    mapping(address => uint256) public boostSeconds;
    mapping(address => uint256) public tokensBurned;
    mapping(uint => mapping(address => address)) public boosterUser; // Effective end time
    mapping(address => uint256) public boosterUserCount;
    mapping(address => uint256) public lastTimeClaimedBonus;
    mapping(address => uint256) public userBoostBonuses;
    mapping(address => uint256) public savedBonusPonziTokens;
   
    event BoostApplied(address indexed token, uint256 burnAmount);

    mapping(address => uint256) public usdSpentOnBoost;
    
    constructor() {
        ethUsdFeed = IEthPrice(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419); // ETH/USD on Ethereum mainnet
    }

  // View

    function getEthPrice() public view returns (uint) {
        (uint80 roundId, int256 price, , uint256 updatedAt, uint80 answeredInRound) = ethUsdFeed.latestRoundData();
        require(price > 0, "bad price");
        require(answeredInRound >= roundId, "stale round");
        require(updatedAt != 0 && block.timestamp - updatedAt < updateTimeForEthPrice, "stale price");
        return uint(price);
    }
    function getEosPriceEth() public view returns (uint) {
        (uint112 reserve0, uint112 reserve1) = mainToken.getReserves();
        return mainToken.getQuote(1e18, reserve0, reserve1);
    }
    function getEosPriceInUsd() public view returns (uint) {
        return getEosPriceEth() * getEthPrice()/ 1e8;
    }
    function getCostPerSecondWithPrice() public view returns (uint) {
        return hourCost / 3600;
    }
    function getTokensForHourBoost() public view returns (uint) {
        return 1e18 / getEosPriceInUsd() * 1e18;
    }
    function predictBoostSeconds(uint amount) public view returns (uint) {
        return (amount * getEosPriceInUsd()) / getCostPerSecondWithPrice() / 1e18;
    }
  // Boost
    function boostToken(address _token, uint256 _burnAmount) external {
        require(_burnAmount > 0, "Amount must be greater than 0");
        require(predictBoostSeconds(_burnAmount) > 1, "Amount must greater or equal to boost second cost.");
        require(_token != address(0), "Invalid token address");
        mainToken.transferFrom(msg.sender, address(this), _burnAmount);
        mainToken.burn(_burnAmount);

        if (getBoostDuration(_token) > 0) {
            boostSeconds[_token] += predictBoostSeconds(_burnAmount);
        } else {
            boostStartTime[_token] = block.timestamp;
            boostSeconds[_token] = predictBoostSeconds(_burnAmount);
        }
        
        usdSpentOnBoost[_token] += _burnAmount * getEosPriceInUsd() / 1e18;
        tokensBurned[_token] += _burnAmount;
        totalBurned += _burnAmount;
        boosterUserCount[_token]++;
        boosterUser[boosterUserCount[_token]][_token] = msg.sender;

        if(pendingBonusEOS(msg.sender) > 0) {
            savedBonusPonziTokens[msg.sender] = pendingBonusEOS(msg.sender);
        }
        lastTimeClaimedBonus[msg.sender] = block.timestamp;
        userBoostBonuses[msg.sender] += _burnAmount;

        emit BoostApplied(_token, _burnAmount);
    }
    function getBoostDuration(address _token) public view returns (uint256) {
        if (boostStartTime[_token] != 0 && boostSeconds[_token] != 0) {
            if (boostStartTime[_token] + boostSeconds[_token] > block.timestamp) {
                return (boostStartTime[_token] +  boostSeconds[_token])
                    - block.timestamp;
            } else {
                return 0;
            }
        } else {
            return 0;
        }
    }
  // Mint
    function mintEOS() public {
        uint toMint = pendingBonusEOS(msg.sender);
        if(toMint > 0){
            savedBonusPonziTokens[msg.sender] = 0;
            lastTimeClaimedBonus[msg.sender] = block.timestamp;
            mainToken.mintBonus(toMint, msg.sender);
        }
    }
    function pendingBonusEOS(address _user) public view returns (uint256) {
        uint256 time = mainToken.ponziStart() > lastTimeClaimedBonus[_user] ? mainToken.ponziStart() : lastTimeClaimedBonus[_user];
        uint256 bonus = (((userBoostBonuses[_user] * mainToken.apy() / 10000 ) *
        boostApyMultiplier / boostApyDenominator) / 86400) * 
        (block.timestamp - time) + savedBonusPonziTokens[_user];
        return bonus;       
    }
    function viewBonusTokensPerSecond(address _user) public view returns (uint256) {
        return (((userBoostBonuses[_user] * mainToken.apy() / 10000 ) * boostApyMultiplier) / boostApyDenominator) / 86400;
    }
  // Admin
    function setUpdateTimeForEthPrice(uint256 _updateTimeForEthPrice) public onlyOwner {
        updateTimeForEthPrice = _updateTimeForEthPrice;
    }
    function setHourCost(uint256 _hourCost) public onlyOwner {
        hourCost = _hourCost;
    }
    function setboostApyMultiplier(uint256 _boostApyMultiplier) public onlyOwner {
        boostApyMultiplier = _boostApyMultiplier;
    }
    function setboostApyDenominator(uint256 _boostApyDenominator) public onlyOwner {
        boostApyDenominator = _boostApyDenominator;
    }
    function recoverTokens(address _token, uint toWithdraw) public onlyOwner{
        IEOS20 token = IEOS20(_token);
        token.transfer(owner(), toWithdraw);
    }
    function recoverEth(address payable _user, uint toWithdraw) public onlyOwner{
        (bool success,) = _user.call{value: toWithdraw}("");
    }
    function setMainTokenAddress(address _eos) public onlyOwner {
        mainToken = IEOS20(_eos);
    }
    function setEthPriceFeed(address _ethUsdFeed) public onlyOwner {
        ethUsdFeed = IEthPrice(_ethUsdFeed);
    }
    function setTokensBurned(address _token, uint amount) public onlyOwner{
        tokensBurned[_token] = amount;
    }
    function setBoostStartTime(address _token, uint _time) public onlyOwner{
        boostStartTime[_token] = _time;
    }
    function setTotalBurned(uint _burned) public onlyOwner {
        totalBurned = _burned;
    }
  // Receive
    receive() external payable {}
}"
    },
    "lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
"
    },
    "interfaces/IEOS20.sol": {
      "content": "pragma solidity ^0.8.0;
interface IEOS20 {
  // FOR ETH OS
    function initializeToken(address owner, address router, address deployer, uint256 _devDeadline) external;
    function setSpecs(
        uint256 _devFeePercent,
        uint256 _maxDailyPumpRate,
        uint256 _reflectionsPercent,
        uint256 _liquidityPercent,
        uint256 _reaperDeathTime,
        uint256 _cooldown,
        uint256 _winAmountPercent,
        uint256 _apy,
        uint256 _burnPercentBuy,
        uint256 _burnPercentSell
    ) external;    
    function transferOwnershipOfTheToken(address) external;
    function openTrading(bool _tradingOpen) external;
    
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function owner() external view returns (address);
    function timeCreated() external view returns (uint256);
    function deploymentBlock() external view returns (uint);
    function uniswapV2Pair() external view returns (address);
    function uniswapV2Router() external view returns (address);
    
    function antiBot() external view returns (bool);
    function maxWalletPercent() external view returns (uint);
    
    function toggleYield(bool toggle) external;
    function tradingOpen() external view returns (bool);
    function yieldOn() external view returns (bool);

    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function allowance(address owner, address spender) external view returns (uint256);
    function transfer(address _to, uint256 _value) external returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
    function approve(address _spender, uint256 _value) external returns (bool success);

    function totalShares() external view returns (uint256);
    function burn(uint256 _amount) external;
    function getReserves() external view returns (uint112, uint112);
    function getQuote(uint256 amountA, uint256 reserveA, uint256 reserveB) external view returns (uint256);
    function lastBuyTimestamp() external view returns (uint256);

    function reflectionsPercent() external view returns (uint256);
    function liquidityPercent() external view returns (uint256);
    function winAmountPercent() external view returns (uint256);
    function devFeePercent() external view returns (uint256);
    function burnPercentageBuy() external view returns (uint256);
    function burnPercentageSell() external view returns (uint256);
    function deathTime() external view returns (uint256);
    function apy() external view returns (uint256);

    function share(address user) external view returns (uint256);
    function shares(address user) external view returns (uint256);
    function ethAccumulated(address user) external view returns (uint256);
    function ethAccumulatedForUi(address _user) external view returns (uint256);
    function ethWithdrawn(address user) external view returns (uint256);
    function ethWithdrawnForUi(address user) external view returns (uint256);
    function totalEthDistributed() external view returns (uint256);
    function devWithdrawn() external view returns (uint256);
    function lpAdded() external view returns (uint256);

    function pendingPonziTokens(address _user) external view returns (uint256);
    function devClaimableEth() external view returns (uint256);
    function lastPumpTimestamp() external view returns (uint256);
    function maxDailyPumpRate() external view returns (uint256);
    function pumpIsPublic() external view returns (bool);

    function firstReceivedBlockTimeStamp(address) external view returns (uint256);
    function immortal(address _user) external view returns (bool);
    function deathStartedTimestamp() external view returns (uint256);
   
    function cooldown() external view returns (uint256);
    function winAmount() external view returns (uint256);
    function currentWinner() external view returns (address);

    function ponziStart() external view returns (uint256);
    function mintBonus(uint256 amount, address _user) external;
    
    function setMaxWallet(bool _antiBot, uint256 _maxWallet) external;
    function volumeAmount() external view returns (uint256);
    
}

"
    },
    "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
"
    }
  },
  "settings": {
    "remappings": [
      "forge-std/=lib/forge-std/src/",
      "@openzeppelin/=lib/openzeppelin-contracts/",
      "@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
      "@uniswap/=lib/universal-router/node_modules/@uniswap/",
      "ds-test/=lib/forge-std/lib/ds-test/src/",
      "erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
      "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
      "hardhat/=lib/v4-core/node_modules/hardhat/",
      "openzeppelin-contracts/=lib/openzeppelin-contracts/",
      "permit2/=lib/permit2/",
      "solmate/=lib/universal-router/lib/solmate/",
      "universal-router/=lib/universal-router/",
      "v4-core/=lib/v4-core/src/",
      "v4-periphery/=lib/v4-periphery/"
    ],
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "ipfs",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "paris",
    "viaIR": false
  }
}}

Tags:
ERC20, Multisig, Burnable, Liquidity, Yield, Multi-Signature, Factory|addr:0x4d94ca1cd854a06af132baf0af9012763eb739b6|verified:true|block:23383083|tx:0xfd0e4c37e90c5aa9ea1a054a05cab774e8df9e374d4f0c010ed8afafd64ad638|first_check:1758119116

Submitted on: 2025-09-17 16:25:18

Comments

Log in to comment.

No comments yet.