ETH Price: $3,416.61 (+3.52%)

Contract

0xa0DA53447C0f6C4987964d8463da7e6628B30f82
 
Transaction Hash
Method
Block
From
To
Deposit Service ...210981732024-11-02 6:28:4721 days ago1730528927IN
0xa0DA5344...628B30f82
1.5 ETH0.0585655620
Deposit Service ...210657792024-10-28 17:59:5925 days ago1730138399IN
0xa0DA5344...628B30f82
0.7 ETH0.0146634116.15577686
Deposit Service ...210277172024-10-23 10:33:5931 days ago1729679639IN
0xa0DA5344...628B30f82
0.065 ETH0.001759178.08525274
Deposit Service ...210277112024-10-23 10:32:4731 days ago1729679567IN
0xa0DA5344...628B30f82
0.2 ETH0.002414427.2
Deposit Service ...210276712024-10-23 10:24:3531 days ago1729679075IN
0xa0DA5344...628B30f82
0.2 ETH0.005529936.85842695
Deposit Service ...210263352024-10-23 5:56:3531 days ago1729662995IN
0xa0DA5344...628B30f82
0.3 ETH0.002786836.38043302
Deposit Service ...209271762024-10-09 9:35:4745 days ago1728466547IN
0xa0DA5344...628B30f82
0.065 ETH0.0105219714.54357938
Deposit Service ...208344142024-09-26 11:13:1158 days ago1727349191IN
0xa0DA5344...628B30f82
1 ETH0.0101554716.60079843
Deposit Service ...208261642024-09-25 7:34:3559 days ago1727249675IN
0xa0DA5344...628B30f82
1 ETH0.0054812412.31446477
Deposit Service ...204425072024-08-02 17:59:59112 days ago1722621599IN
0xa0DA5344...628B30f82
1 ETH0.003018844.36395625
Deposit Service ...203926522024-07-26 18:55:59119 days ago1722020159IN
0xa0DA5344...628B30f82
0.065 ETH0.002291192.45281051
Deposit Service ...202897092024-07-12 10:05:11134 days ago1720778711IN
0xa0DA5344...628B30f82
0.065 ETH0.001704192.77441103
Deposit Service ...202245372024-07-03 7:37:23143 days ago1719992243IN
0xa0DA5344...628B30f82
2.065 ETH0.008763094.38871404
Deposit Service ...200103752024-06-03 9:22:59173 days ago1717406579IN
0xa0DA5344...628B30f82
0.9 ETH0.0480635416.91284833
Deposit Service ...200098372024-06-03 7:34:35173 days ago1717400075IN
0xa0DA5344...628B30f82
0.15 ETH0.0044239312.37657036
Deposit Service ...200010552024-06-02 2:08:23174 days ago1717294103IN
0xa0DA5344...628B30f82
1.2 ETH0.007910115.49052469
Deposit Service ...199553912024-05-26 16:57:59181 days ago1716742679IN
0xa0DA5344...628B30f82
1 ETH0.003689617.07311834
Deposit Service ...196711252024-04-16 22:50:23220 days ago1713307823IN
0xa0DA5344...628B30f82
0.1 ETH0.006445458.5659518
Deposit Service ...194255232024-03-13 10:21:59255 days ago1710325319IN
0xa0DA5344...628B30f82
2.2 ETH0.1464617181.23763715
Deposit Service ...194246952024-03-13 7:35:11255 days ago1710315311IN
0xa0DA5344...628B30f82
0.1 ETH0.0106962748.93350925
Deposit Service ...194244612024-03-13 6:48:11255 days ago1710312491IN
0xa0DA5344...628B30f82
0.075 ETH0.020263241.55224301
Deposit Service ...190880832024-01-26 3:24:23302 days ago1706239463IN
0xa0DA5344...628B30f82
0.08 ETH0.0121130920.11093212
Deposit Service ...190837442024-01-25 12:51:47303 days ago1706187107IN
0xa0DA5344...628B30f82
2.25 ETH0.0925417535.23248569
Deposit Service ...190736792024-01-24 2:59:47304 days ago1706065187IN
0xa0DA5344...628B30f82
0.2 ETH0.007143110.48078522
Deposit Service ...188702662023-12-26 13:47:35333 days ago1703598455IN
0xa0DA5344...628B30f82
4.966 ETH0.0366287518.46173738
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
211588672024-11-10 17:48:5912 days ago1731260939
0xa0DA5344...628B30f82
0.31062 ETH
211360392024-11-07 13:21:3516 days ago1730985695
0xa0DA5344...628B30f82
0.1 ETH
211305852024-11-06 19:05:2316 days ago1730919923
0xa0DA5344...628B30f82
0.0051875 ETH
211305792024-11-06 19:04:1116 days ago1730919851
0xa0DA5344...628B30f82
0.0051875 ETH
211281522024-11-06 10:56:2317 days ago1730890583
0xa0DA5344...628B30f82
0.017 ETH
211141292024-11-04 11:57:2319 days ago1730721443
0xa0DA5344...628B30f82
0.27374999 ETH
211140372024-11-04 11:38:3519 days ago1730720315
0xa0DA5344...628B30f82
0.48501016 ETH
211088632024-11-03 18:20:1119 days ago1730658011
0xa0DA5344...628B30f82
0.29146341 ETH
211040082024-11-03 2:04:1120 days ago1730599451
0xa0DA5344...628B30f82
0.00049045 ETH
211040062024-11-03 2:03:4720 days ago1730599427
0xa0DA5344...628B30f82
0.00049045 ETH
211038362024-11-03 1:28:5920 days ago1730597339
0xa0DA5344...628B30f82
0.17 ETH
211022872024-11-02 20:17:1120 days ago1730578631
0xa0DA5344...628B30f82
0.02659074 ETH
211022182024-11-02 20:03:1120 days ago1730577791
0xa0DA5344...628B30f82
0.02659074 ETH
211022152024-11-02 20:02:3520 days ago1730577755
0xa0DA5344...628B30f82
0.02659074 ETH
211022112024-11-02 20:01:4720 days ago1730577707
0xa0DA5344...628B30f82
0.14705 ETH
210978892024-11-02 5:31:5921 days ago1730525519
0xa0DA5344...628B30f82
0.0656 ETH
210946462024-11-01 18:39:3521 days ago1730486375
0xa0DA5344...628B30f82
0.2 ETH
210489662024-10-26 9:40:5928 days ago1729935659
0xa0DA5344...628B30f82
0.065161 ETH
210129642024-10-21 9:09:4733 days ago1729501787
0xa0DA5344...628B30f82
0.01060463 ETH
209957642024-10-18 23:34:2335 days ago1729294463
0xa0DA5344...628B30f82
0.01060463 ETH
209716262024-10-15 14:41:1139 days ago1729003271
0xa0DA5344...628B30f82
0.01060463 ETH
209486142024-10-12 9:25:1142 days ago1728725111
0xa0DA5344...628B30f82
0.01060463 ETH
209096722024-10-06 23:02:5947 days ago1728255779
0xa0DA5344...628B30f82
0.01060463 ETH
209071802024-10-06 14:42:4748 days ago1728225767
0xa0DA5344...628B30f82
0.81324999 ETH
209066342024-10-06 12:53:3548 days ago1728219215
0xa0DA5344...628B30f82
1 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Treasury

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 4000 runs

Other Settings:
default evmVersion
File 1 of 6 : Treasury.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import "./interfaces/IErrorsTokenomics.sol";
import "./interfaces/IOLAS.sol";
import "./interfaces/IToken.sol";
import "./interfaces/IServiceRegistry.sol";
import "./interfaces/ITokenomics.sol";

/*
* In this contract we consider both ETH and OLAS tokens.
* For ETH tokens, there are currently about 121 million tokens.
* Even if the ETH inflation rate is 5% per year, it would take 130+ years to reach 2^96 - 1 of ETH total supply.
* Lately the inflation rate was lower and could actually be deflationary.
*
* For OLAS tokens, the initial numbers will be as follows:
*  - For the first 10 years there will be the cap of 1 billion (1e27) tokens;
*  - After 10 years, the inflation rate is capped at 2% per year.
* Starting from a year 11, the maximum number of tokens that can be reached per the year x is 1e27 * (1.02)^x.
* To make sure that a unit(n) does not overflow the total supply during the year x, we have to check that
* 2^n - 1 >= 1e27 * (1.02)^x. We limit n by 96, thus it would take 220+ years to reach that total supply.
*
* We then limit each time variable to last until the value of 2^32 - 1 in seconds.
* 2^32 - 1 gives 136+ years counted in seconds starting from the year 1970.
* Thus, this counter is safe until the year 2106.
*
* The number of blocks cannot be practically bigger than the number of seconds, since there is more than one second
* in a block. Thus, it is safe to assume that uint32 for the number of blocks is also sufficient.
*
* In conclusion, this contract is only safe to use until 2106.
*/

/// @title Treasury - Smart contract for managing OLAS Treasury
/// @author AL
/// @author Aleksandr Kuperman - <[email protected]>
/// Invariant does not support a failing call() function while transferring ETH when using the CEI pattern:
/// revert TransferFailed(address(0), address(this), to, tokenAmount);
/// invariant {:msg "broken conservation law"} address(this).balance == ETHFromServices + ETHOwned;
contract Treasury is IErrorsTokenomics {
    event OwnerUpdated(address indexed owner);
    event TokenomicsUpdated(address indexed tokenomics);
    event DepositoryUpdated(address indexed depository);
    event DispenserUpdated(address indexed dispenser);
    event DepositTokenFromAccount(address indexed account, address indexed token, uint256 tokenAmount, uint256 olasAmount);
    event DonateToServicesETH(address indexed sender, uint256[] serviceIds, uint256[] amounts, uint256 donation);
    event Withdraw(address indexed token, address indexed to, uint256 tokenAmount);
    event EnableToken(address indexed token);
    event DisableToken(address indexed token);
    event ReceiveETH(address indexed sender, uint256 amount);
    event UpdateTreasuryBalances(uint256 ETHOwned, uint256 ETHFromServices);
    event PauseTreasury();
    event UnpauseTreasury();
    event MinAcceptedETHUpdated(uint256 amount);

    // A well-known representation of an ETH as address
    address public constant ETH_TOKEN_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

    // Owner address
    address public owner;
    // ETH received from services
    // Even if the ETH inflation rate is 5% per year, it would take 130+ years to reach 2^96 - 1 of ETH total supply
    uint96 public ETHFromServices;

    // OLAS token address
    address public olas;
    // ETH owned by treasury
    // Even if the ETH inflation rate is 5% per year, it would take 130+ years to reach 2^96 - 1 of ETH total supply
    uint96 public ETHOwned;

    // Tkenomics contract address
    address public tokenomics;
    // Minimum accepted donation value
    uint96 public minAcceptedETH = 0.065 ether;

    // Depository contract address
    address public depository;
    // Contract pausing
    uint8 public paused = 1;
    // Reentrancy lock
    uint8 internal _locked;
    
    // Dispenser contract address
    address public dispenser;

    // Token address => token reserves
    mapping(address => uint256) public mapTokenReserves;
    // Token address => enabled / disabled status
    mapping(address => bool) public mapEnabledTokens;

    /// @dev Treasury constructor.
    /// @param _olas OLAS token address.
    /// @param _tokenomics Tokenomics address.
    /// @param _depository Depository address.
    /// @param _dispenser Dispenser address.
    constructor(address _olas, address _tokenomics, address _depository, address _dispenser) payable {
        owner = msg.sender;
        _locked = 1;

        // Check for at least one zero contract address
        if (_olas == address(0) || _tokenomics == address(0) || _depository == address(0) || _dispenser == address(0)) {
            revert ZeroAddress();
        }

        olas = _olas;
        tokenomics = _tokenomics;
        depository = _depository;
        dispenser = _dispenser;

        // Assign an initial contract address ETH balance
        // If msg.value is passed in the constructor, it is already accounted for in the address balance
        // This way the balance also accounts for possible transfers before the contract was created
        ETHOwned = uint96(address(this).balance);
    }

    /// @dev Receives ETH.
    /// #if_succeeds {:msg "we do not touch the balance of developers" } old(ETHFromServices) == ETHFromServices;
    /// #if_succeeds {:msg "conservation law"} old(ETHOwned) + msg.value + old(ETHFromServices) <= type(uint96).max && ETHOwned == old(ETHOwned) + msg.value
    /// ==> address(this).balance == ETHFromServices + ETHOwned;
    /// #if_succeeds {:msg "any paused"} paused == 1 || paused == 2;
    receive() external payable {
        if (msg.value < minAcceptedETH) {
            revert LowerThan(msg.value, minAcceptedETH);
        }

        uint256 amount = ETHOwned;
        amount += msg.value;
        // Check for the overflow values, specifically when fuzzing, since practically these amounts are not realistic
        if (amount + ETHFromServices > type(uint96).max) {
            revert Overflow(amount, type(uint96).max);
        }
        ETHOwned = uint96(amount);
        emit ReceiveETH(msg.sender, msg.value);
    }

    /// @dev Changes the owner address.
    /// @param newOwner Address of a new owner.
    function changeOwner(address newOwner) external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Check for the zero address
        if (newOwner == address(0)) {
            revert ZeroAddress();
        }

        owner = newOwner;
        emit OwnerUpdated(newOwner);
    }

    /// @dev Changes various managing contract addresses.
    /// @param _tokenomics Tokenomics address.
    /// @param _depository Depository address.
    /// @param _dispenser Dispenser address.
    function changeManagers(address _tokenomics, address _depository, address _dispenser) external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Change Tokenomics contract address
        if (_tokenomics != address(0)) {
            tokenomics = _tokenomics;
            emit TokenomicsUpdated(_tokenomics);
        }
        // Change Depository contract address
        if (_depository != address(0)) {
            depository = _depository;
            emit DepositoryUpdated(_depository);
        }
        // Change Dispenser contract address
        if (_dispenser != address(0)) {
            dispenser = _dispenser;
            emit DispenserUpdated(_dispenser);
        }
    }

    /// @dev Changes minimum accepted ETH amount by the Treasury.
    /// @param _minAcceptedETH New minimum accepted ETH amount.
    /// #if_succeeds {:msg "Min accepted ETH"} minAcceptedETH > 0 && minAcceptedETH <= type(uint96).max;
    function changeMinAcceptedETH(uint256 _minAcceptedETH) external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Check for the zero value
        if (_minAcceptedETH == 0) {
            revert ZeroValue();
        }

        // Check for the overflow value
        if (_minAcceptedETH > type(uint96).max) {
            revert Overflow(_minAcceptedETH, type(uint96).max);
        }

        minAcceptedETH = uint96(_minAcceptedETH);
        emit MinAcceptedETHUpdated(_minAcceptedETH);
    }

    /// @dev Allows the depository to deposit LP tokens for OLAS.
    /// @notice Only depository contract can call this function.
    /// @param account Account address making a deposit of LP tokens for OLAS.
    /// @param tokenAmount Token amount to get OLAS for.
    /// @param token Token address.
    /// @param olasMintAmount Amount of OLAS token issued.
    /// #if_succeeds {:msg "we do not touch the total eth balance"} old(address(this).balance) == address(this).balance;
    /// #if_succeeds {:msg "any paused"} paused == 1 || paused == 2;
    /// #if_succeeds {:msg "OLAS balances"} IToken(olas).balanceOf(msg.sender) == old(IToken(olas).balanceOf(msg.sender)) + olasMintAmount;
    /// #if_succeeds {:msg "OLAS supply"} IToken(olas).totalSupply() == old(IToken(olas).totalSupply()) + olasMintAmount;
    function depositTokenForOLAS(address account, uint256 tokenAmount, address token, uint256 olasMintAmount) external {
        // Check for the depository access
        if (depository != msg.sender) {
            revert ManagerOnly(msg.sender, depository);
        }

        // Check if the token is authorized by the registry
        if (!mapEnabledTokens[token]) {
            revert UnauthorizedToken(token);
        }

        // Increase the amount of LP token reserves
        uint256 reserves = mapTokenReserves[token] + tokenAmount;
        mapTokenReserves[token] = reserves;

        // Uniswap allowance implementation does not revert with the accurate message, need to check before the transfer is engaged
        if (IToken(token).allowance(account, address(this)) < tokenAmount) {
            revert InsufficientAllowance(IToken(token).allowance((account), address(this)), tokenAmount);
        }

        // Transfer tokens from account to treasury and add to the token treasury reserves
        // We assume that authorized LP tokens in the protocol are safe as they are enabled via the governance
        // UniswapV2ERC20 realization has a standard transferFrom() function that returns a boolean value
        bool success = IToken(token).transferFrom(account, address(this), tokenAmount);
        if (!success) {
            revert TransferFailed(token, account, address(this), tokenAmount);
        }

        // Mint specified number of OLAS tokens corresponding to tokens bonding deposit
        // The olasMintAmount is guaranteed by the product supply limit, which is limited by the effectiveBond
        IOLAS(olas).mint(msg.sender, olasMintAmount);

        emit DepositTokenFromAccount(account, token, tokenAmount, olasMintAmount);
    }

    /// @dev Deposits service donations in ETH.
    /// @notice Each provided service Id must be deployed at least once, otherwise its components and agents are undefined.
    /// @notice If a specific service is terminated with agent Ids being updated, incentives will be issued to its old
    ///         configuration component / agent owners until the service is re-deployed when new agent Ids are accounted for.
    /// @param serviceIds Set of service Ids.
    /// @param amounts Set of corresponding amounts deposited on behalf of each service Id.
    /// #if_succeeds {:msg "we do not touch the owners balance"} old(ETHOwned) == ETHOwned;
    /// #if_succeeds {:msg "updated ETHFromServices"} old(ETHFromServices) + msg.value + old(ETHOwned) <= type(uint96).max && ETHFromServices == old(ETHFromServices) + msg.value
    /// ==> address(this).balance == ETHFromServices + ETHOwned;
    /// #if_succeeds {:msg "any paused"} paused == 1 || paused == 2;
    function depositServiceDonationsETH(uint256[] memory serviceIds, uint256[] memory amounts) external payable {
        // Reentrancy guard
        if (_locked > 1) {
            revert ReentrancyGuard();
        }
        _locked = 2;

        // Check that the amount donated has at least a practical minimal value
        if (msg.value < minAcceptedETH) {
            revert LowerThan(msg.value, minAcceptedETH);
        }

        // Check for the same length of arrays
        uint256 numServices = serviceIds.length;
        if (amounts.length != numServices) {
            revert WrongArrayLength(numServices, amounts.length);
        }

        uint256 totalAmount;
        for (uint256 i = 0; i < numServices; ++i) {
            if (amounts[i] == 0) {
                revert ZeroValue();
            }
            totalAmount += amounts[i];
        }

        // Check if the total transferred amount corresponds to the sum of amounts from services
        if (msg.value != totalAmount) {
            revert WrongAmount(msg.value, totalAmount);
        }

        // Accumulate received donation from services
        uint256 donationETH = ETHFromServices + msg.value;
        // Check for the overflow values, specifically when fuzzing, since realistically these amounts are assumed to be not possible
        if (donationETH + ETHOwned > type(uint96).max) {
            revert Overflow(donationETH, type(uint96).max);
        }
        ETHFromServices = uint96(donationETH);
        emit DonateToServicesETH(msg.sender, serviceIds, amounts, msg.value);

        // Track service donations on the Tokenomics side
        ITokenomics(tokenomics).trackServiceDonations(msg.sender, serviceIds, amounts, msg.value);

        _locked = 1;
    }

    /// @dev Allows owner to transfer tokens from treasury reserves to a specified address.
    /// @param to Address to transfer funds to.
    /// @param tokenAmount Token amount to get reserves from.
    /// @param token Token or ETH address.
    /// @return success True if the transfer is successful.
    /// #if_succeeds {:msg "we do not touch the balance of developers"} old(ETHFromServices) == ETHFromServices;
    /// #if_succeeds {:msg "updated ETHOwned"} token == ETH_TOKEN_ADDRESS ==> ETHOwned == old(ETHOwned) - tokenAmount;
    /// #if_succeeds {:msg "ETH balance"} token == ETH_TOKEN_ADDRESS ==> address(this).balance == old(address(this).balance) - tokenAmount;
    /// #if_succeeds {:msg "updated token reserves"} token != ETH_TOKEN_ADDRESS ==> mapTokenReserves[token] == old(mapTokenReserves[token]) - tokenAmount;
    /// #if_succeeds {:msg "any paused"} paused == 1 || paused == 2;
    function withdraw(address to, uint256 tokenAmount, address token) external returns (bool success) {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Check that the withdraw address is not treasury itself
        if (to == address(this)) {
            revert TransferFailed(token, address(this), to, tokenAmount);
        }

        // Check for the zero withdraw amount
        if (tokenAmount == 0) {
            revert ZeroValue();
        }

        // ETH address is taken separately, and all the LP tokens must be validated with corresponding token reserves
        if (token == ETH_TOKEN_ADDRESS) {
            uint256 amountOwned = ETHOwned;
            // Check if treasury has enough amount of owned ETH
            if (amountOwned >= tokenAmount) {
                // This branch is used to transfer ETH to a specified address
                amountOwned -= tokenAmount;
                ETHOwned = uint96(amountOwned);
                emit Withdraw(ETH_TOKEN_ADDRESS, to, tokenAmount);
                // Send ETH to the specified address
                (success, ) = to.call{value: tokenAmount}("");
                if (!success) {
                    revert TransferFailed(ETH_TOKEN_ADDRESS, address(this), to, tokenAmount);
                }
            } else {
                // Insufficient amount of treasury owned ETH
                revert LowerThan(tokenAmount, amountOwned);
            }
        } else {
            // Only approved token reserves can be used for redemptions
            if (!mapEnabledTokens[token]) {
                revert UnauthorizedToken(token);
            }
            // Decrease the global LP token reserves record
            uint256 reserves = mapTokenReserves[token];
            if (reserves >= tokenAmount) {
                reserves -= tokenAmount;
                mapTokenReserves[token] = reserves;

                emit Withdraw(token, to, tokenAmount);
                // Transfer LP tokens
                // We assume that LP tokens enabled in the protocol are safe by default
                // UniswapV2ERC20 realization has a standard transfer() function
                success = IToken(token).transfer(to, tokenAmount);
                if (!success) {
                    revert TransferFailed(token, address(this), to, tokenAmount);
                }
            }  else {
                // Insufficient amount of LP tokens
                revert LowerThan(tokenAmount, reserves);
            }
        }
    }

    /// @dev Withdraws ETH and / or OLAS amounts to the requested account address.
    /// @notice Only dispenser contract can call this function.
    /// @notice Reentrancy guard is on a dispenser side.
    /// @notice Zero account address is not possible, since the dispenser contract interacts with msg.sender.
    /// @param account Account address.
    /// @param accountRewards Amount of account rewards.
    /// @param accountTopUps Amount of account top-ups.
    /// @return success True if the function execution is successful.
    /// #if_succeeds {:msg "we do not touch the owners balance"} old(ETHOwned) == ETHOwned;
    /// #if_succeeds {:msg "updated ETHFromServices"} accountRewards > 0 && ETHFromServices >= accountRewards ==> ETHFromServices == old(ETHFromServices) - accountRewards;
    /// #if_succeeds {:msg "ETH balance"} accountRewards > 0 && ETHFromServices >= accountRewards ==> address(this).balance == old(address(this).balance) - accountRewards;
    /// #if_succeeds {:msg "updated OLAS balances"} accountTopUps > 0 ==> IToken(olas).balanceOf(account) == old(IToken(olas).balanceOf(account)) + accountTopUps;
    /// #if_succeeds {:msg "OLAS supply"} IToken(olas).totalSupply() == old(IToken(olas).totalSupply()) + accountTopUps;
    /// #if_succeeds {:msg "unpaused"} paused == 1;
    function withdrawToAccount(address account, uint256 accountRewards, uint256 accountTopUps) external
        returns (bool success)
    {
        // Check if the contract is paused
        if (paused == 2) {
            revert Paused();
        }

        // Check for the dispenser access
        if (dispenser != msg.sender) {
            revert ManagerOnly(msg.sender, dispenser);
        }

        uint256 amountETHFromServices = ETHFromServices;
        // Send ETH rewards, if any
        if (accountRewards > 0 && amountETHFromServices >= accountRewards) {
            amountETHFromServices -= accountRewards;
            ETHFromServices = uint96(amountETHFromServices);
            emit Withdraw(ETH_TOKEN_ADDRESS, account, accountRewards);
            (success, ) = account.call{value: accountRewards}("");
            if (!success) {
                revert TransferFailed(address(0), address(this), account, accountRewards);
            }
        }

        // Send OLAS top-ups
        if (accountTopUps > 0) {
            // Tokenomics has already accounted for the account's top-up amount,
            // thus the the mint does not break the inflation schedule
            IOLAS(olas).mint(account, accountTopUps);
            success = true;
            emit Withdraw(olas, account, accountTopUps);
        }
    }

    /// @dev Re-balances treasury funds to account for the treasury reward for a specific epoch.
    /// @param treasuryRewards Treasury rewards.
    /// @return success True, if the function execution is successful.
    /// #if_succeeds {:msg "we do not touch the total eth balance"} old(address(this).balance) == address(this).balance;
    /// #if_succeeds {:msg "conservation law"} old(ETHFromServices + ETHOwned) == ETHFromServices + ETHOwned;
    /// #if_succeeds {:msg "unpaused"} paused == 1;
    function rebalanceTreasury(uint256 treasuryRewards) external returns (bool success) {
        // Check if the contract is paused
        if (paused == 2) {
            revert Paused();
        }

        // Check for the tokenomics contract access
        if (msg.sender != tokenomics) {
            revert ManagerOnly(msg.sender, tokenomics);
        }

        // Collect treasury's own reward share
        success = true;
        if (treasuryRewards > 0) {
            uint256 amountETHFromServices = ETHFromServices;
            if (amountETHFromServices >= treasuryRewards) {
                // Update ETH from services value
                amountETHFromServices -= treasuryRewards;
                // Update treasury ETH owned values
                uint256 amountETHOwned = ETHOwned;
                amountETHOwned += treasuryRewards;
                // Assign back to state variables
                ETHOwned = uint96(amountETHOwned);
                ETHFromServices = uint96(amountETHFromServices);
                emit UpdateTreasuryBalances(amountETHOwned, amountETHFromServices);
            } else {
                // There is not enough amount from services to allocate to the treasury
                success = false;
            }
        }
    }

    /// @dev Drains slashed funds from the service registry.
    /// @return amount Drained amount.
    /// #if_succeeds {:msg "correct update total eth balance"} address(this).balance == old(address(this).balance) + amount;
    /// #if_succeeds {:msg "conservation law"} ETHFromServices + ETHOwned == old(ETHFromServices + ETHOwned) + amount;
    ///if_succeeds {:msg "slashed funds check"} IServiceRegistry(ITokenomics(tokenomics).serviceRegistry()).slashedFunds() >= minAcceptedETH
    /// ==> old(IServiceRegistry(ITokenomics(tokenomics).serviceRegistry()).slashedFunds()) == amount;
    function drainServiceSlashedFunds() external returns (uint256 amount) {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Get the service registry contract address
        address serviceRegistry = ITokenomics(tokenomics).serviceRegistry();

        // Check if the amount of slashed funds are at least the minimum required amount to receive by the Treasury
        uint256 slashedFunds = IServiceRegistry(serviceRegistry).slashedFunds();
        if (slashedFunds < minAcceptedETH) {
            revert LowerThan(slashedFunds, minAcceptedETH);
        }

        // Call the service registry drain function
        amount = IServiceRegistry(serviceRegistry).drain();
    }

    /// @dev Enables an LP token to be bonded for OLAS.
    /// @param token Token address.
    function enableToken(address token) external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        // Check for the zero address token
        if (token == address(0)) {
            revert ZeroAddress();
        }

        // Authorize the token
        if (!mapEnabledTokens[token]) {
            mapEnabledTokens[token] = true;
            emit EnableToken(token);
        }
    }

    /// @dev Disables an LP token from the ability to bond for OLAS.
    /// @param token Token address.
    function disableToken(address token) external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        if (mapEnabledTokens[token]) {
            // The reserves of a token must be zero in order to disable it
            if (mapTokenReserves[token] > 0) {
                revert NonZeroValue();
            }
            mapEnabledTokens[token] = false;
            emit DisableToken(token);
        }
    }

    /// @dev Gets information about token being enabled for bonding.
    /// @param token Token address.
    /// @return enabled True if token is enabled.
    function isEnabled(address token) external view returns (bool enabled) {
        enabled = mapEnabledTokens[token];
    }

    /// @dev Pauses the contract.
    function pause() external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        paused = 2;
        emit PauseTreasury();
    }

    /// @dev Unpauses the contract.
    function unpause() external {
        // Check for the contract ownership
        if (msg.sender != owner) {
            revert OwnerOnly(msg.sender, owner);
        }

        paused = 1;
        emit UnpauseTreasury();
    }
}

File 2 of 6 : IErrorsTokenomics.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/// @dev Errors.
interface IErrorsTokenomics {
    /// @dev Only `manager` has a privilege, but the `sender` was provided.
    /// @param sender Sender address.
    /// @param manager Required sender address as a manager.
    error ManagerOnly(address sender, address manager);

    /// @dev Only `owner` has a privilege, but the `sender` was provided.
    /// @param sender Sender address.
    /// @param owner Required sender address as an owner.
    error OwnerOnly(address sender, address owner);

    /// @dev Provided zero address.
    error ZeroAddress();

    /// @dev Wrong length of two arrays.
    /// @param numValues1 Number of values in a first array.
    /// @param numValues2 Number of values in a second array.
    error WrongArrayLength(uint256 numValues1, uint256 numValues2);

    /// @dev Service Id does not exist in registry records.
    /// @param serviceId Service Id.
    error ServiceDoesNotExist(uint256 serviceId);

    /// @dev Zero value when it has to be different from zero.
    error ZeroValue();

    /// @dev Non-zero value when it has to be zero.
    error NonZeroValue();

    /// @dev Value overflow.
    /// @param provided Overflow value.
    /// @param max Maximum possible value.
    error Overflow(uint256 provided, uint256 max);

    /// @dev Service was never deployed.
    /// @param serviceId Service Id.
    error ServiceNeverDeployed(uint256 serviceId);

    /// @dev Token is disabled or not whitelisted.
    /// @param tokenAddress Address of a token.
    error UnauthorizedToken(address tokenAddress);

    /// @dev Provided token address is incorrect.
    /// @param provided Provided token address.
    /// @param expected Expected token address.
    error WrongTokenAddress(address provided, address expected);

    /// @dev Bond is not redeemable (does not exist or not matured).
    /// @param bondId Bond Id.
    error BondNotRedeemable(uint256 bondId);

    /// @dev The product is expired.
    /// @param tokenAddress Address of a token.
    /// @param productId Product Id.
    /// @param deadline The program expiry time.
    /// @param curTime Current timestamp.
    error ProductExpired(address tokenAddress, uint256 productId, uint256 deadline, uint256 curTime);

    /// @dev The product is already closed.
    /// @param productId Product Id.
    error ProductClosed(uint256 productId);

    /// @dev The product supply is low for the requested payout.
    /// @param tokenAddress Address of a token.
    /// @param productId Product Id.
    /// @param requested Requested payout.
    /// @param actual Actual supply left.
    error ProductSupplyLow(address tokenAddress, uint256 productId, uint256 requested, uint256 actual);

    /// @dev Received lower value than the expected one.
    /// @param provided Provided value is lower.
    /// @param expected Expected value.
    error LowerThan(uint256 provided, uint256 expected);

    /// @dev Wrong amount received / provided.
    /// @param provided Provided amount.
    /// @param expected Expected amount.
    error WrongAmount(uint256 provided, uint256 expected);

    /// @dev Insufficient token allowance.
    /// @param provided Provided amount.
    /// @param expected Minimum expected amount.
    error InsufficientAllowance(uint256 provided, uint256 expected);

    /// @dev Failure of a transfer.
    /// @param token Address of a token.
    /// @param from Address `from`.
    /// @param to Address `to`.
    /// @param amount Token amount.
    error TransferFailed(address token, address from, address to, uint256 amount);

    /// @dev Incentives claim has failed.
    /// @param account Account address.
    /// @param reward Reward amount.
    /// @param topUp Top-up amount.
    error ClaimIncentivesFailed(address account, uint256 reward, uint256 topUp);

    /// @dev Caught reentrancy violation.
    error ReentrancyGuard();

    /// @dev Failure of treasury re-balance during the reward allocation.
    /// @param epochNumber Epoch number.
    error TreasuryRebalanceFailed(uint256 epochNumber);

    /// @dev Operation with a wrong component / agent Id.
    /// @param unitId Component / agent Id.
    /// @param unitType Type of the unit (component / agent).
    error WrongUnitId(uint256 unitId, uint256 unitType);

    /// @dev The donator address is blacklisted.
    /// @param account Donator account address.
    error DonatorBlacklisted(address account);

    /// @dev The contract is already initialized.
    error AlreadyInitialized();

    /// @dev The contract has to be delegate-called via proxy.
    error DelegatecallOnly();

    /// @dev The contract is paused.
    error Paused();

    /// @dev Caught an operation that is not supposed to happen in the same block.
    error SameBlockNumberViolation();
}

File 3 of 6 : IOLAS.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

interface IOLAS {
    /// @dev Mints OLA tokens.
    /// @param account Account address.
    /// @param amount OLA token amount.
    function mint(address account, uint256 amount) external;

    /// @dev Provides OLA token time launch.
    /// @return Time launch.
    function timeLaunch() external view returns (uint256);
}

File 4 of 6 : IServiceRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/// @dev Required interface for the service registry.
interface IServiceRegistry {
    enum UnitType {
        Component,
        Agent
    }

    /// @dev Checks if the service Id exists.
    /// @param serviceId Service Id.
    /// @return true if the service exists, false otherwise.
    function exists(uint256 serviceId) external view returns (bool);

    /// @dev Gets the full set of linearized components / canonical agent Ids for a specified service.
    /// @notice The service must be / have been deployed in order to get the actual data.
    /// @param serviceId Service Id.
    /// @return numUnitIds Number of component / agent Ids.
    /// @return unitIds Set of component / agent Ids.
    function getUnitIdsOfService(UnitType unitType, uint256 serviceId) external view
        returns (uint256 numUnitIds, uint32[] memory unitIds);

    /// @dev Gets the value of slashed funds from the service registry.
    /// @return amount Drained amount.
    function slashedFunds() external view returns (uint256 amount);

    /// @dev Drains slashed funds.
    /// @return amount Drained amount.
    function drain() external returns (uint256 amount);
}

File 5 of 6 : IToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/// @dev Generic token interface for IERC20 and IERC721 tokens.
interface IToken {
    /// @dev Gets the amount of tokens owned by a specified account.
    /// @param account Account address.
    /// @return Amount of tokens owned.
    function balanceOf(address account) external view returns (uint256);

    /// @dev Gets the owner of the token Id.
    /// @param tokenId Token Id.
    /// @return Token Id owner address.
    function ownerOf(uint256 tokenId) external view returns (address);

    /// @dev Gets the total amount of tokens stored by the contract.
    /// @return Amount of tokens.
    function totalSupply() external view returns (uint256);

    /// @dev Transfers the token amount.
    /// @param to Address to transfer to.
    /// @param amount The amount to transfer.
    /// @return True if the function execution is successful.
    function transfer(address to, uint256 amount) external returns (bool);

    /// @dev Gets remaining number of tokens that the `spender` can transfer on behalf of `owner`.
    /// @param owner Token owner.
    /// @param spender Account address that is able to transfer tokens on behalf of the owner.
    /// @return Token amount allowed to be transferred.
    function allowance(address owner, address spender) external view returns (uint256);

    /// @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
    /// @param spender Account address that will be able to transfer tokens on behalf of the caller.
    /// @param amount Token amount.
    /// @return True if the function execution is successful.
    function approve(address spender, uint256 amount) external returns (bool);

    /// @dev Transfers the token amount that was previously approved up until the maximum allowance.
    /// @param from Account address to transfer from.
    /// @param to Account address to transfer to.
    /// @param amount Amount to transfer to.
    /// @return True if the function execution is successful.
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 6 of 6 : ITokenomics.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/// @dev Interface for tokenomics management.
interface ITokenomics {
    /// @dev Gets effective bond (bond left).
    /// @return Effective bond.
    function effectiveBond() external pure returns (uint256);

    /// @dev Record global data to the checkpoint
    function checkpoint() external returns (bool);

    /// @dev Tracks the deposited ETH service donations during the current epoch.
    /// @notice This function is only called by the treasury where the validity of arrays and values has been performed.
    /// @param donator Donator account address.
    /// @param serviceIds Set of service Ids.
    /// @param amounts Correspondent set of ETH amounts provided by services.
    /// @param donationETH Overall service donation amount in ETH.
    function trackServiceDonations(
        address donator,
        uint256[] memory serviceIds,
        uint256[] memory amounts,
        uint256 donationETH
    ) external;

    /// @dev Reserves OLAS amount from the effective bond to be minted during a bond program.
    /// @notice Programs exceeding the limit in the epoch are not allowed.
    /// @param amount Requested amount for the bond program.
    /// @return True if effective bond threshold is not reached.
    function reserveAmountForBondProgram(uint256 amount) external returns(bool);

    /// @dev Refunds unused bond program amount.
    /// @param amount Amount to be refunded from the bond program.
    function refundFromBondProgram(uint256 amount) external;

    /// @dev Gets component / agent owner incentives and clears the balances.
    /// @param account Account address.
    /// @param unitTypes Set of unit types (component / agent).
    /// @param unitIds Set of corresponding unit Ids where account is the owner.
    /// @return reward Reward amount.
    /// @return topUp Top-up amount.
    function accountOwnerIncentives(address account, uint256[] memory unitTypes, uint256[] memory unitIds) external
        returns (uint256 reward, uint256 topUp);

    /// @dev Gets inverse discount factor with the multiple of 1e18 of the last epoch.
    /// @return idf Discount factor with the multiple of 1e18.
    function getLastIDF() external view returns (uint256 idf);

    /// @dev Gets the service registry contract address
    /// @return Service registry contract address;
    function serviceRegistry() external view returns (address);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 4000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_olas","type":"address"},{"internalType":"address","name":"_tokenomics","type":"address"},{"internalType":"address","name":"_depository","type":"address"},{"internalType":"address","name":"_dispenser","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[{"internalType":"uint256","name":"bondId","type":"uint256"}],"name":"BondNotRedeemable","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"topUp","type":"uint256"}],"name":"ClaimIncentivesFailed","type":"error"},{"inputs":[],"name":"DelegatecallOnly","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"DonatorBlacklisted","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"LowerThan","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"manager","type":"address"}],"name":"ManagerOnly","type":"error"},{"inputs":[],"name":"NonZeroValue","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"Overflow","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"OwnerOnly","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[{"internalType":"uint256","name":"productId","type":"uint256"}],"name":"ProductClosed","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"productId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"curTime","type":"uint256"}],"name":"ProductExpired","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"productId","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"ProductSupplyLow","type":"error"},{"inputs":[],"name":"ReentrancyGuard","type":"error"},{"inputs":[],"name":"SameBlockNumberViolation","type":"error"},{"inputs":[{"internalType":"uint256","name":"serviceId","type":"uint256"}],"name":"ServiceDoesNotExist","type":"error"},{"inputs":[{"internalType":"uint256","name":"serviceId","type":"uint256"}],"name":"ServiceNeverDeployed","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"epochNumber","type":"uint256"}],"name":"TreasuryRebalanceFailed","type":"error"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"UnauthorizedToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"WrongAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"numValues1","type":"uint256"},{"internalType":"uint256","name":"numValues2","type":"uint256"}],"name":"WrongArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"provided","type":"address"},{"internalType":"address","name":"expected","type":"address"}],"name":"WrongTokenAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"unitId","type":"uint256"},{"internalType":"uint256","name":"unitType","type":"uint256"}],"name":"WrongUnitId","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"olasAmount","type":"uint256"}],"name":"DepositTokenFromAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depository","type":"address"}],"name":"DepositoryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"DisableToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dispenser","type":"address"}],"name":"DispenserUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"serviceIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"donation","type":"uint256"}],"name":"DonateToServicesETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"EnableToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinAcceptedETHUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"PauseTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceiveETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenomics","type":"address"}],"name":"TokenomicsUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"UnpauseTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ETHOwned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ETHFromServices","type":"uint256"}],"name":"UpdateTreasuryBalances","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ETHFromServices","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHOwned","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETH_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenomics","type":"address"},{"internalType":"address","name":"_depository","type":"address"},{"internalType":"address","name":"_dispenser","type":"address"}],"name":"changeManagers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAcceptedETH","type":"uint256"}],"name":"changeMinAcceptedETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"serviceIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"depositServiceDonationsETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"olasMintAmount","type":"uint256"}],"name":"depositTokenForOLAS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depository","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"disableToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dispenser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"drainServiceSlashedFunds","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"enableToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isEnabled","outputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapEnabledTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mapTokenReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAcceptedETH","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"olas","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"treasuryRewards","type":"uint256"}],"name":"rebalanceTreasury","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenomics","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"accountRewards","type":"uint256"},{"internalType":"uint256","name":"accountTopUps","type":"uint256"}],"name":"withdrawToAccount","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040819052600280546501cdda4faccd60af1b6001600160a01b039091161790556003805460ff60a01b1916600160a01b179055620026b938819003908190833981016040819052620000549162000150565b600080546001600160a01b031916331790556003805460ff60a81b1916600160a81b1790556001600160a01b03841615806200009757506001600160a01b038316155b80620000aa57506001600160a01b038216155b80620000bd57506001600160a01b038116155b15620000dc5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b03199081166001600160a01b0395861617909155600380548216938516939093179092556004805490921690831617905516600160a01b476001600160601b03160217600155620001ad565b80516001600160a01b03811681146200014b57600080fd5b919050565b600080600080608085870312156200016757600080fd5b620001728562000133565b9350620001826020860162000133565b9250620001926040860162000133565b9150620001a26060860162000133565b905092959194509250565b6124fc80620001bd6000396000f3fe6080604052600436106101a45760003560e01c80638456cb59116100e1578063ac10fc011161008a578063c690908a11610064578063c690908a14610677578063d529779314610697578063e09d894d146106b7578063f60ccd3a146106d757600080fd5b8063ac10fc01146105fb578063b3c3294a14610627578063bedd12a51461065757600080fd5b80639015d371116100bb5780639015d3711461058f578063a6f9dae1146105c8578063a8ce8911146105e857600080fd5b80638456cb59146105455780638da5cb5b1461055a5780638f202bf91461057a57600080fd5b8063462617e51161014e5780635c975abb116101285780635c975abb146104965780635d63b758146104c957806369328dec146104f55780637ff796ab1461052557600080fd5b8063462617e51461041b5780634ac7251d1461043b5780634c20f8e41461045b57600080fd5b806323e27a641161017f57806323e27a641461039d5780632f29e573146103bd5780633f4ba83a1461040657600080fd5b806231d115146103165780631878d1f1146103535780631ac17db91461037b57600080fd5b3661031157600254600160a01b90046bffffffffffffffffffffffff1634101561021f576002546040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152600160a01b9091046bffffffffffffffffffffffff1660248201526044015b60405180910390fd5b600154600160a01b90046bffffffffffffffffffffffff16610241348261208e565b6000549091506bffffffffffffffffffffffff9061026890600160a01b900482168361208e565b11156102b5576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600180546001600160a01b0316600160a01b6bffffffffffffffffffffffff84160217905560405134815233907f830d2d700a97af574b186c80d40429385d24241565b08a7c559ba283a964d9b19060200160405180910390a2005b600080fd5b34801561032257600080fd5b50600154610336906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561035f57600080fd5b5061033673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561038757600080fd5b5061039b6103963660046120bc565b6106f7565b005b3480156103a957600080fd5b5061039b6103b8366004612104565b610ae0565b3480156103c957600080fd5b506000546103e990600160a01b90046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161034a565b34801561041257600080fd5b5061039b610bf9565b34801561042757600080fd5b5061039b610436366004612121565b610c92565b34801561044757600080fd5b50600254610336906001600160a01b031681565b34801561046757600080fd5b50610488610476366004612104565b60056020526000908152604090205481565b60405190815260200161034a565b3480156104a257600080fd5b506003546104b790600160a01b900460ff1681565b60405160ff909116815260200161034a565b3480156104d557600080fd5b506002546103e990600160a01b90046bffffffffffffffffffffffff1681565b34801561050157600080fd5b5061051561051036600461213a565b610dc2565b604051901515815260200161034a565b34801561053157600080fd5b5061051561054036600461217c565b6111fa565b34801561055157600080fd5b5061039b6114b0565b34801561056657600080fd5b50600054610336906001600160a01b031681565b34801561058657600080fd5b5061048861155a565b34801561059b57600080fd5b506105156105aa366004612104565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156105d457600080fd5b5061039b6105e3366004612104565b611768565b61039b6105f6366004612299565b611848565b34801561060757600080fd5b506001546103e990600160a01b90046bffffffffffffffffffffffff1681565b34801561063357600080fd5b50610515610642366004612104565b60066020526000908152604090205460ff1681565b34801561066357600080fd5b50600354610336906001600160a01b031681565b34801561068357600080fd5b5061039b610692366004612104565b611c38565b3480156106a357600080fd5b5061039b6106b23660046122fd565b611d42565b3480156106c357600080fd5b50600454610336906001600160a01b031681565b3480156106e357600080fd5b506105156106f2366004612121565b611ed4565b6003546001600160a01b03163314610750576003546040517f625a43fe0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03821660009081526006602052604090205460ff166107ad576040517fe3d87c620000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610216565b6001600160a01b0382166000908152600560205260408120546107d190859061208e565b6001600160a01b0384811660008181526005602052604090819020849055517fdd62ed3e000000000000000000000000000000000000000000000000000000008152918816600483015230602483015291925085919063dd62ed3e90604401602060405180830381865afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610871919061233d565b101561093d576040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015230602483015284169063dd62ed3e90604401602060405180830381865afa1580156108dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610900919061233d565b6040517f2a1b2dd8000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052604401610216565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015230602483015260448201869052600091908516906323b872dd906064016020604051808303816000875af11580156109af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d39190612356565b905080610a135760405163cd3f165960e01b81526001600160a01b0380861660048301528716602482015230604482015260648101869052608401610216565b6001546040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610a7857600080fd5b505af1158015610a8c573d6000803e3d6000fd5b505060408051888152602081018790526001600160a01b0380891694508a1692507f508c72f275e49212a4b6ffe7c19109c6720f9b15c6e9d2732e500d1b8d1f94d4910160405180910390a3505050505050565b6000546001600160a01b03163314610b205760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03811660009081526006602052604090205460ff1615610bf6576001600160a01b03811660009081526005602052604090205415610b91576040517fe320176b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f3907c2f289c906800bbef774e6e4a476623eae8c1abc6cd0a78ef88aba9a62259190a25b50565b6000546001600160a01b03163314610c395760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790556040517fa4f5d2111fbcc4ac1936a7aa8878cf6082bd2abfbd9bb58e7cce14981eec8b3690600090a1565b6000546001600160a01b03163314610cd25760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b80600003610d0c576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6bffffffffffffffffffffffff811115610d67576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600280546001600160a01b0316600160a01b6bffffffffffffffffffffffff8416021790556040518181527f4e97f4325d1d8a9018f3f17e69a6cb9cb011cc8a813e90b3549a773506e429fd9060200160405180910390a150565b600080546001600160a01b03163314610e035760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b306001600160a01b03851603610e4c5760405163cd3f165960e01b81526001600160a01b0380841660048301523060248301528516604482015260648101849052608401610216565b82600003610e86576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b0383160161104157600154600160a01b90046bffffffffffffffffffffffff16838110610fff57610edf8482612378565b600180546001600160a01b03908116600160a01b6bffffffffffffffffffffffff8516021790915560405186815291925086169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a36040516001600160a01b038616908590600081818185875af1925050503d8060008114610f9f576040519150601f19603f3d011682016040523d82523d6000602084013e610fa4565b606091505b50508092505081610ffa5760405163cd3f165960e01b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60048201523060248201526001600160a01b038616604482015260648101859052608401610216565b61103b565b6040517f491a2bb10000000000000000000000000000000000000000000000000000000081526004810185905260248101829052604401610216565b506111f3565b6001600160a01b03821660009081526006602052604090205460ff1661109e576040517fe3d87c620000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610216565b6001600160a01b038216600090815260056020526040902054838110610fff576110c88482612378565b6001600160a01b038085166000818152600560205260409081902084905551929350908716917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9061111d9088815260200190565b60405180910390a36040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905284169063a9059cbb906044016020604051808303816000875af115801561118d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b19190612356565b9150816111f15760405163cd3f165960e01b81526001600160a01b0380851660048301523060248301528616604482015260648101859052608401610216565b505b9392505050565b600354600090600160a01b900460ff16600203611243576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546001600160a01b0316331461129d57600480546040517f625a43fe00000000000000000000000000000000000000000000000000000000815233928101929092526001600160a01b03166024820152604401610216565b600054600160a01b90046bffffffffffffffffffffffff1683158015906112c45750838110155b156113db576112d38482612378565b600080546001600160a01b03908116600160a01b6bffffffffffffffffffffffff8516021790915560405186815291925086169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a36040516001600160a01b038616908590600081818185875af1925050503d8060008114611393576040519150601f19603f3d011682016040523d82523d6000602084013e611398565b606091505b505080925050816113db5760405163cd3f165960e01b8152600060048201523060248201526001600160a01b038616604482015260648101859052608401610216565b82156111f1576001546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260248201869052909116906340c10f1990604401600060405180830381600087803b15801561144857600080fd5b505af115801561145c573d6000803e3d6000fd5b5050600180546040518781529195506001600160a01b0389811694501691507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a3509392505050565b6000546001600160a01b031633146114f05760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740200000000000000000000000000000000000000001790556040517f057751199181d584c26a7c04b3f3de8cacbb25ebdf78fd029813ea393bd510b990600090a1565b600080546001600160a01b0316331461159b5760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600254604080517fcbcf252a00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cbcf252a9160048083019260209291908290030181865afa1580156115fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611622919061238b565b90506000816001600160a01b0316636f99f15c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611664573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611688919061233d565b600254909150600160a01b90046bffffffffffffffffffffffff168110156116fd576002546040517f491a2bb100000000000000000000000000000000000000000000000000000000815260048101839052600160a01b9091046bffffffffffffffffffffffff166024820152604401610216565b816001600160a01b0316639890220b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561173d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611761919061233d565b9250505090565b6000546001600160a01b031633146117a85760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b0381166117e8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038316908117825560405190917f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b91a250565b6003546001750100000000000000000000000000000000000000000090910460ff1611156118a2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167502000000000000000000000000000000000000000000179055600254600160a01b90046bffffffffffffffffffffffff16341015611953576002546040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152600160a01b9091046bffffffffffffffffffffffff166024820152604401610216565b81518151811461199c5781516040517f8151c110000000000000000000000000000000000000000000000000000000008152610216918391600401918252602082015260400190565b6000805b82811015611a32578381815181106119ba576119ba6123a8565b60200260200101516000036119fb576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838181518110611a0d57611a0d6123a8565b602002602001015182611a20919061208e565b9150611a2b816123d7565b90506119a0565b50803414611a75576040517f312b003300000000000000000000000000000000000000000000000000000000815234600482015260248101829052604401610216565b60008054611a99903490600160a01b90046bffffffffffffffffffffffff1661208e565b6001549091506bffffffffffffffffffffffff90611ac090600160a01b900482168361208e565b1115611b0d576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600080546001600160a01b0316600160a01b6bffffffffffffffffffffffff84160217905560405133907fb7c3b13b911bdc71cbcf384e470cad657b7da964c892dc2fdba1432ad64d8be090611b689088908890349061244a565b60405180910390a26002546040517f5bc022010000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635bc0220190611bbf903390899089903490600401612480565b600060405180830381600087803b158015611bd957600080fd5b505af1158015611bed573d6000803e3d6000fd5b5050600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000017905550505050505050565b6000546001600160a01b03163314611c785760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b038116611cb8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811660009081526006602052604090205460ff16610bf6576001600160a01b03811660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1f4b6598cc34e310cc34bcfcb372afb5ba5af654fad97b26cc10ae8289f1c62f9190a250565b6000546001600160a01b03163314611d825760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03831615611df157600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385169081179091556040517f4672fe7e13cfb163442d0b729b5733fb3efafc66cbe3677eac9940eb41c284c290600090a25b6001600160a01b03821615611e6057600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040517fcd22b277e2781665af395ae4868b7fd80cf6d9e06a5a740a9c4746922a25a22390600090a25b6001600160a01b03811615611ecf57600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517fe4915bbde794cce5e56670cce1c0048ef68276040acd048bdb7157ded9232b4890600090a25b505050565b600354600090600160a01b900460ff16600203611f1d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314611f76576002546040517f625a43fe0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091166024820152604401610216565b506001811561205a57600054600160a01b90046bffffffffffffffffffffffff1682811061205357611fa88382612378565b600154909150600160a01b90046bffffffffffffffffffffffff16611fcd848261208e565b600180546bffffffffffffffffffffffff808416600160a01b9081026001600160a01b03938416179093556000805491871690930291161790556040519091507fd633b2400e134010322787d01a18e48126f5bcb420cdb342a6930a6eb4ecef63906120459083908590918252602082015260400190565b60405180910390a150612058565b600091505b505b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120a1576120a161205f565b92915050565b6001600160a01b0381168114610bf657600080fd5b600080600080608085870312156120d257600080fd5b84356120dd816120a7565b93506020850135925060408501356120f4816120a7565b9396929550929360600135925050565b60006020828403121561211657600080fd5b81356111f3816120a7565b60006020828403121561213357600080fd5b5035919050565b60008060006060848603121561214f57600080fd5b833561215a816120a7565b9250602084013591506040840135612171816120a7565b809150509250925092565b60008060006060848603121561219157600080fd5b833561219c816120a7565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126121f157600080fd5b8135602067ffffffffffffffff8083111561220e5761220e6121b1565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108482111715612251576122516121b1565b60405293845285810183019383810192508785111561226f57600080fd5b83870191505b8482101561228e57813583529183019190830190612275565b979650505050505050565b600080604083850312156122ac57600080fd5b823567ffffffffffffffff808211156122c457600080fd5b6122d0868387016121e0565b935060208501359150808211156122e657600080fd5b506122f3858286016121e0565b9150509250929050565b60008060006060848603121561231257600080fd5b833561231d816120a7565b9250602084013561232d816120a7565b91506040840135612171816120a7565b60006020828403121561234f57600080fd5b5051919050565b60006020828403121561236857600080fd5b815180151581146111f357600080fd5b818103818111156120a1576120a161205f565b60006020828403121561239d57600080fd5b81516111f3816120a7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124085761240861205f565b5060010190565b600081518084526020808501945080840160005b8381101561243f57815187529582019590820190600101612423565b509495945050505050565b60608152600061245d606083018661240f565b828103602084015261246f818661240f565b915050826040830152949350505050565b6001600160a01b03851681526080602082015260006124a2608083018661240f565b82810360408401526124b4818661240f565b9150508260608301529594505050505056fea26469706673582212202c9247fdea0756c721ef75b0418d331833ff72c8324f9fb5dae56f6471d9922364736f6c634300081200330000000000000000000000000001a500a6b18995b03f44bb040a5ffc28e45cb0000000000000000000000000c096362fa6f4a4b1a9ea68b1043416f3381ce3000000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe0000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe

Deployed Bytecode

0x6080604052600436106101a45760003560e01c80638456cb59116100e1578063ac10fc011161008a578063c690908a11610064578063c690908a14610677578063d529779314610697578063e09d894d146106b7578063f60ccd3a146106d757600080fd5b8063ac10fc01146105fb578063b3c3294a14610627578063bedd12a51461065757600080fd5b80639015d371116100bb5780639015d3711461058f578063a6f9dae1146105c8578063a8ce8911146105e857600080fd5b80638456cb59146105455780638da5cb5b1461055a5780638f202bf91461057a57600080fd5b8063462617e51161014e5780635c975abb116101285780635c975abb146104965780635d63b758146104c957806369328dec146104f55780637ff796ab1461052557600080fd5b8063462617e51461041b5780634ac7251d1461043b5780634c20f8e41461045b57600080fd5b806323e27a641161017f57806323e27a641461039d5780632f29e573146103bd5780633f4ba83a1461040657600080fd5b806231d115146103165780631878d1f1146103535780631ac17db91461037b57600080fd5b3661031157600254600160a01b90046bffffffffffffffffffffffff1634101561021f576002546040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152600160a01b9091046bffffffffffffffffffffffff1660248201526044015b60405180910390fd5b600154600160a01b90046bffffffffffffffffffffffff16610241348261208e565b6000549091506bffffffffffffffffffffffff9061026890600160a01b900482168361208e565b11156102b5576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600180546001600160a01b0316600160a01b6bffffffffffffffffffffffff84160217905560405134815233907f830d2d700a97af574b186c80d40429385d24241565b08a7c559ba283a964d9b19060200160405180910390a2005b600080fd5b34801561032257600080fd5b50600154610336906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561035f57600080fd5b5061033673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b34801561038757600080fd5b5061039b6103963660046120bc565b6106f7565b005b3480156103a957600080fd5b5061039b6103b8366004612104565b610ae0565b3480156103c957600080fd5b506000546103e990600160a01b90046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161034a565b34801561041257600080fd5b5061039b610bf9565b34801561042757600080fd5b5061039b610436366004612121565b610c92565b34801561044757600080fd5b50600254610336906001600160a01b031681565b34801561046757600080fd5b50610488610476366004612104565b60056020526000908152604090205481565b60405190815260200161034a565b3480156104a257600080fd5b506003546104b790600160a01b900460ff1681565b60405160ff909116815260200161034a565b3480156104d557600080fd5b506002546103e990600160a01b90046bffffffffffffffffffffffff1681565b34801561050157600080fd5b5061051561051036600461213a565b610dc2565b604051901515815260200161034a565b34801561053157600080fd5b5061051561054036600461217c565b6111fa565b34801561055157600080fd5b5061039b6114b0565b34801561056657600080fd5b50600054610336906001600160a01b031681565b34801561058657600080fd5b5061048861155a565b34801561059b57600080fd5b506105156105aa366004612104565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156105d457600080fd5b5061039b6105e3366004612104565b611768565b61039b6105f6366004612299565b611848565b34801561060757600080fd5b506001546103e990600160a01b90046bffffffffffffffffffffffff1681565b34801561063357600080fd5b50610515610642366004612104565b60066020526000908152604090205460ff1681565b34801561066357600080fd5b50600354610336906001600160a01b031681565b34801561068357600080fd5b5061039b610692366004612104565b611c38565b3480156106a357600080fd5b5061039b6106b23660046122fd565b611d42565b3480156106c357600080fd5b50600454610336906001600160a01b031681565b3480156106e357600080fd5b506105156106f2366004612121565b611ed4565b6003546001600160a01b03163314610750576003546040517f625a43fe0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03821660009081526006602052604090205460ff166107ad576040517fe3d87c620000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610216565b6001600160a01b0382166000908152600560205260408120546107d190859061208e565b6001600160a01b0384811660008181526005602052604090819020849055517fdd62ed3e000000000000000000000000000000000000000000000000000000008152918816600483015230602483015291925085919063dd62ed3e90604401602060405180830381865afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610871919061233d565b101561093d576040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015230602483015284169063dd62ed3e90604401602060405180830381865afa1580156108dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610900919061233d565b6040517f2a1b2dd8000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052604401610216565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015230602483015260448201869052600091908516906323b872dd906064016020604051808303816000875af11580156109af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d39190612356565b905080610a135760405163cd3f165960e01b81526001600160a01b0380861660048301528716602482015230604482015260648101869052608401610216565b6001546040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152602481018590526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610a7857600080fd5b505af1158015610a8c573d6000803e3d6000fd5b505060408051888152602081018790526001600160a01b0380891694508a1692507f508c72f275e49212a4b6ffe7c19109c6720f9b15c6e9d2732e500d1b8d1f94d4910160405180910390a3505050505050565b6000546001600160a01b03163314610b205760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03811660009081526006602052604090205460ff1615610bf6576001600160a01b03811660009081526005602052604090205415610b91576040517fe320176b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f3907c2f289c906800bbef774e6e4a476623eae8c1abc6cd0a78ef88aba9a62259190a25b50565b6000546001600160a01b03163314610c395760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790556040517fa4f5d2111fbcc4ac1936a7aa8878cf6082bd2abfbd9bb58e7cce14981eec8b3690600090a1565b6000546001600160a01b03163314610cd25760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b80600003610d0c576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6bffffffffffffffffffffffff811115610d67576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600280546001600160a01b0316600160a01b6bffffffffffffffffffffffff8416021790556040518181527f4e97f4325d1d8a9018f3f17e69a6cb9cb011cc8a813e90b3549a773506e429fd9060200160405180910390a150565b600080546001600160a01b03163314610e035760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b306001600160a01b03851603610e4c5760405163cd3f165960e01b81526001600160a01b0380841660048301523060248301528516604482015260648101849052608401610216565b82600003610e86576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff11111111111111111111111111111111111111126001600160a01b0383160161104157600154600160a01b90046bffffffffffffffffffffffff16838110610fff57610edf8482612378565b600180546001600160a01b03908116600160a01b6bffffffffffffffffffffffff8516021790915560405186815291925086169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a36040516001600160a01b038616908590600081818185875af1925050503d8060008114610f9f576040519150601f19603f3d011682016040523d82523d6000602084013e610fa4565b606091505b50508092505081610ffa5760405163cd3f165960e01b815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60048201523060248201526001600160a01b038616604482015260648101859052608401610216565b61103b565b6040517f491a2bb10000000000000000000000000000000000000000000000000000000081526004810185905260248101829052604401610216565b506111f3565b6001600160a01b03821660009081526006602052604090205460ff1661109e576040517fe3d87c620000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610216565b6001600160a01b038216600090815260056020526040902054838110610fff576110c88482612378565b6001600160a01b038085166000818152600560205260409081902084905551929350908716917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9061111d9088815260200190565b60405180910390a36040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905284169063a9059cbb906044016020604051808303816000875af115801561118d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b19190612356565b9150816111f15760405163cd3f165960e01b81526001600160a01b0380851660048301523060248301528616604482015260648101859052608401610216565b505b9392505050565b600354600090600160a01b900460ff16600203611243576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546001600160a01b0316331461129d57600480546040517f625a43fe00000000000000000000000000000000000000000000000000000000815233928101929092526001600160a01b03166024820152604401610216565b600054600160a01b90046bffffffffffffffffffffffff1683158015906112c45750838110155b156113db576112d38482612378565b600080546001600160a01b03908116600160a01b6bffffffffffffffffffffffff8516021790915560405186815291925086169073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a36040516001600160a01b038616908590600081818185875af1925050503d8060008114611393576040519150601f19603f3d011682016040523d82523d6000602084013e611398565b606091505b505080925050816113db5760405163cd3f165960e01b8152600060048201523060248201526001600160a01b038616604482015260648101859052608401610216565b82156111f1576001546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260248201869052909116906340c10f1990604401600060405180830381600087803b15801561144857600080fd5b505af115801561145c573d6000803e3d6000fd5b5050600180546040518781529195506001600160a01b0389811694501691507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a3509392505050565b6000546001600160a01b031633146114f05760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600380547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740200000000000000000000000000000000000000001790556040517f057751199181d584c26a7c04b3f3de8cacbb25ebdf78fd029813ea393bd510b990600090a1565b600080546001600160a01b0316331461159b5760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b600254604080517fcbcf252a00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cbcf252a9160048083019260209291908290030181865afa1580156115fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611622919061238b565b90506000816001600160a01b0316636f99f15c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611664573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611688919061233d565b600254909150600160a01b90046bffffffffffffffffffffffff168110156116fd576002546040517f491a2bb100000000000000000000000000000000000000000000000000000000815260048101839052600160a01b9091046bffffffffffffffffffffffff166024820152604401610216565b816001600160a01b0316639890220b6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561173d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611761919061233d565b9250505090565b6000546001600160a01b031633146117a85760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b0381166117e8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038316908117825560405190917f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b91a250565b6003546001750100000000000000000000000000000000000000000090910460ff1611156118a2576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167502000000000000000000000000000000000000000000179055600254600160a01b90046bffffffffffffffffffffffff16341015611953576002546040517f491a2bb1000000000000000000000000000000000000000000000000000000008152346004820152600160a01b9091046bffffffffffffffffffffffff166024820152604401610216565b81518151811461199c5781516040517f8151c110000000000000000000000000000000000000000000000000000000008152610216918391600401918252602082015260400190565b6000805b82811015611a32578381815181106119ba576119ba6123a8565b60200260200101516000036119fb576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838181518110611a0d57611a0d6123a8565b602002602001015182611a20919061208e565b9150611a2b816123d7565b90506119a0565b50803414611a75576040517f312b003300000000000000000000000000000000000000000000000000000000815234600482015260248101829052604401610216565b60008054611a99903490600160a01b90046bffffffffffffffffffffffff1661208e565b6001549091506bffffffffffffffffffffffff90611ac090600160a01b900482168361208e565b1115611b0d576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018290526bffffffffffffffffffffffff6024820152604401610216565b600080546001600160a01b0316600160a01b6bffffffffffffffffffffffff84160217905560405133907fb7c3b13b911bdc71cbcf384e470cad657b7da964c892dc2fdba1432ad64d8be090611b689088908890349061244a565b60405180910390a26002546040517f5bc022010000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690635bc0220190611bbf903390899089903490600401612480565b600060405180830381600087803b158015611bd957600080fd5b505af1158015611bed573d6000803e3d6000fd5b5050600380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16750100000000000000000000000000000000000000000017905550505050505050565b6000546001600160a01b03163314611c785760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b038116611cb8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03811660009081526006602052604090205460ff16610bf6576001600160a01b03811660008181526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f1f4b6598cc34e310cc34bcfcb372afb5ba5af654fad97b26cc10ae8289f1c62f9190a250565b6000546001600160a01b03163314611d825760005460405163521eb56d60e11b81523360048201526001600160a01b039091166024820152604401610216565b6001600160a01b03831615611df157600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385169081179091556040517f4672fe7e13cfb163442d0b729b5733fb3efafc66cbe3677eac9940eb41c284c290600090a25b6001600160a01b03821615611e6057600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040517fcd22b277e2781665af395ae4868b7fd80cf6d9e06a5a740a9c4746922a25a22390600090a25b6001600160a01b03811615611ecf57600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517fe4915bbde794cce5e56670cce1c0048ef68276040acd048bdb7157ded9232b4890600090a25b505050565b600354600090600160a01b900460ff16600203611f1d576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b03163314611f76576002546040517f625a43fe0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091166024820152604401610216565b506001811561205a57600054600160a01b90046bffffffffffffffffffffffff1682811061205357611fa88382612378565b600154909150600160a01b90046bffffffffffffffffffffffff16611fcd848261208e565b600180546bffffffffffffffffffffffff808416600160a01b9081026001600160a01b03938416179093556000805491871690930291161790556040519091507fd633b2400e134010322787d01a18e48126f5bcb420cdb342a6930a6eb4ecef63906120459083908590918252602082015260400190565b60405180910390a150612058565b600091505b505b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120a1576120a161205f565b92915050565b6001600160a01b0381168114610bf657600080fd5b600080600080608085870312156120d257600080fd5b84356120dd816120a7565b93506020850135925060408501356120f4816120a7565b9396929550929360600135925050565b60006020828403121561211657600080fd5b81356111f3816120a7565b60006020828403121561213357600080fd5b5035919050565b60008060006060848603121561214f57600080fd5b833561215a816120a7565b9250602084013591506040840135612171816120a7565b809150509250925092565b60008060006060848603121561219157600080fd5b833561219c816120a7565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126121f157600080fd5b8135602067ffffffffffffffff8083111561220e5761220e6121b1565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f83011681018181108482111715612251576122516121b1565b60405293845285810183019383810192508785111561226f57600080fd5b83870191505b8482101561228e57813583529183019190830190612275565b979650505050505050565b600080604083850312156122ac57600080fd5b823567ffffffffffffffff808211156122c457600080fd5b6122d0868387016121e0565b935060208501359150808211156122e657600080fd5b506122f3858286016121e0565b9150509250929050565b60008060006060848603121561231257600080fd5b833561231d816120a7565b9250602084013561232d816120a7565b91506040840135612171816120a7565b60006020828403121561234f57600080fd5b5051919050565b60006020828403121561236857600080fd5b815180151581146111f357600080fd5b818103818111156120a1576120a161205f565b60006020828403121561239d57600080fd5b81516111f3816120a7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124085761240861205f565b5060010190565b600081518084526020808501945080840160005b8381101561243f57815187529582019590820190600101612423565b509495945050505050565b60608152600061245d606083018661240f565b828103602084015261246f818661240f565b915050826040830152949350505050565b6001600160a01b03851681526080602082015260006124a2608083018661240f565b82810360408401526124b4818661240f565b9150508260608301529594505050505056fea26469706673582212202c9247fdea0756c721ef75b0418d331833ff72c8324f9fb5dae56f6471d9922364736f6c63430008120033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000001a500a6b18995b03f44bb040a5ffc28e45cb0000000000000000000000000c096362fa6f4a4b1a9ea68b1043416f3381ce3000000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe0000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe

-----Decoded View---------------
Arg [0] : _olas (address): 0x0001A500A6B18995B03f44bb040A5fFc28E45CB0
Arg [1] : _tokenomics (address): 0xc096362fa6f4A4B1a9ea68b1043416f3381ce300
Arg [2] : _depository (address): 0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE
Arg [3] : _dispenser (address): 0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000001a500a6b18995b03f44bb040a5ffc28e45cb0
Arg [1] : 000000000000000000000000c096362fa6f4a4b1a9ea68b1043416f3381ce300
Arg [2] : 0000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe
Arg [3] : 0000000000000000000000003c1ff68f5aa342d296d4dee4bb1cacca912d95fe


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.