ETH Price: $3,474.82 (+5.60%)

Contract

0xc738CDb5140d6b7F688ba05a25c8a51568622D96
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake211873842024-11-14 17:20:118 days ago1731604811IN
Syncus: Staking
0 ETH0.0093431827.44121726
Unstake211873722024-11-14 17:17:478 days ago1731604667IN
Syncus: Staking
0 ETH0.0093527126.15469847
Unstake211754962024-11-13 1:30:5910 days ago1731461459IN
Syncus: Staking
0 ETH0.0141034641.42083994
Unstake211573862024-11-10 12:51:5913 days ago1731243119IN
Syncus: Staking
0 ETH0.0065500118.56623438
Unstake211214592024-11-05 12:30:3518 days ago1730809835IN
Syncus: Staking
0 ETH0.001814035.07290815
Unstake210857832024-10-31 13:01:2323 days ago1730379683IN
Syncus: Staking
0 ETH0.003514569.96180232
Unstake210727322024-10-29 17:17:3524 days ago1730222255IN
Syncus: Staking
0 ETH0.0088957426.1261508
Unstake210718442024-10-29 14:19:4725 days ago1730211587IN
Syncus: Staking
0 ETH0.005387915.82388236
Unstake210672182024-10-28 22:48:5925 days ago1730155739IN
Syncus: Staking
0 ETH0.0041848712.29023009
Unstake208648992024-09-30 17:14:5953 days ago1727716499IN
Syncus: Staking
0 ETH0.0070796419.79877094
Unstake208278192024-09-25 13:08:2359 days ago1727269703IN
Syncus: Staking
0 ETH0.0090875525.41319654
Unstake208052872024-09-22 9:41:3562 days ago1726998095IN
Syncus: Staking
0 ETH0.0069249519.36811739
Unstake206424242024-08-30 15:55:4784 days ago1725033347IN
Syncus: Staking
0 ETH0.002497556.98461349
Unstake206240692024-08-28 2:21:1187 days ago1724811671IN
Syncus: Staking
0 ETH0.000484691.35547394
Unstake205954162024-08-24 2:15:4791 days ago1724465747IN
Syncus: Staking
0 ETH0.000643251.79885965
Unstake205645152024-08-19 18:39:1195 days ago1724092751IN
Syncus: Staking
0 ETH0.000832342.32756742
Unstake205457952024-08-17 3:55:3598 days ago1723866935IN
Syncus: Staking
0 ETH0.00037371.04506236
Unstake205426592024-08-16 17:23:1198 days ago1723828991IN
Syncus: Staking
0 ETH0.000579881.62159286
Unstake205205992024-08-13 15:28:35101 days ago1723562915IN
Syncus: Staking
0 ETH0.002059295.83734667
Unstake204881512024-08-09 2:47:47106 days ago1723171667IN
Syncus: Staking
0 ETH0.000815212.39431499
Unstake204881442024-08-09 2:46:23106 days ago1723171583IN
Syncus: Staking
0 ETH0.000822852.30101587
Unstake204833362024-08-08 10:41:47107 days ago1723113707IN
Syncus: Staking
0 ETH0.003396519.4982877
Unstake204658772024-08-06 0:14:11109 days ago1722903251IN
Syncus: Staking
0 ETH0.001190713.32981678
Unstake204508282024-08-03 21:53:11111 days ago1722721991IN
Syncus: Staking
0 ETH0.00040861.20009949
Unstake204508162024-08-03 21:50:47111 days ago1722721847IN
Syncus: Staking
0 ETH0.000387941.08488884
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SyncusStaking

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion
File 1 of 11 : SyncusStaking.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

import "./lib/SafeMath.sol";
import "./lib/Address.sol";
import "./lib/SafeERC20.sol";
import "./OwnableManagement.sol";
import "./lib/IERC20.sol";
import "./lib/ISyncus.sol";
import "./lib/IVESYNC.sol";
import "./lib/IDistributor.sol";
import "./lib/IWarmup.sol";

contract SyncusStaking is OwnableManagement {
    using SafeMath for uint256;
    using SafeMath for uint32;
    using SafeERC20 for IERC20;

    address public immutable Sync;
    address public immutable veSync;

    struct Epoch {
        uint number;
        uint distribute;
        uint32 length;
        uint32 endTime;
    }
    Epoch public epoch;

    address public distributor;

    address public locker;
    uint public totalBonus;

    address public warmupContract;
    uint public warmupPeriod;

    address taxReceiver;

    uint public taxOnStake = 250; // 2.5%
    uint public taxOnUnstake = 250; // 2.5%

    function setTaxOnStake(uint _taxOnStake) external onlyManager {
        require(_taxOnStake <= 10000, "Tax cannot be greater than 100%");
        taxOnStake = _taxOnStake;
    }

    function setTaxOnUnstake(uint _taxOnUnstake) external onlyManager {
        require(_taxOnUnstake <= 10000, "Tax cannot be greater than 100%");
        taxOnUnstake = _taxOnUnstake;
    }

    function setTaxReceiver(address _taxReceiver) external onlyManager {
        taxReceiver = _taxReceiver;
    }

    modifier onlyDistributor() {
        require(msg.sender == distributor, "Only distributor");
        _;
    }

    constructor(
        address _Sync,
        address _veSync,
        uint32 _epochLength,
        uint _firstEpochNumber,
        uint32 _firstEpochTime,
        address _taxReceiver
    ) {
        require(_Sync != address(0));
        Sync = _Sync;
        require(_veSync != address(0));
        veSync = _veSync;

        epoch = Epoch({
            length: _epochLength,
            number: _firstEpochNumber,
            endTime: _firstEpochTime,
            distribute: 0
        });

        taxReceiver = _taxReceiver;
    }

    struct Claim {
        uint deposit;
        uint gons;
        uint expiry;
        bool lock; // prevents malicious delays
    }
    mapping(address => Claim) public warmupInfo;

    /**
        @notice stake SYNC to enter warmup
        @param _amount uint
        @return bool
     */
    function stake(uint _amount, address _recipient) external returns (bool) {
        rebase();

        uint tax = _amount.mul(taxOnStake).div(10000);
        uint amountAfterTax = _amount.sub(tax);

        IERC20(Sync).safeTransferFrom(
            msg.sender,
            address(this),
            amountAfterTax
        );
        IERC20(Sync).safeTransferFrom(msg.sender, taxReceiver, tax);

        Claim memory info = warmupInfo[_recipient];
        require(!info.lock, "Deposits for account are locked");

        warmupInfo[_recipient] = Claim({
            deposit: info.deposit.add(amountAfterTax),
            gons: info.gons.add(IVESYNC(veSync).gonsForBalance(amountAfterTax)),
            expiry: epoch.number.add(warmupPeriod),
            lock: false
        });

        IERC20(veSync).safeTransfer(warmupContract, amountAfterTax);
        return true;
    }

    /**
        @notice retrieve veSYNC from warmup
        @param _recipient address
     */
    function claim(address _recipient) public {
        Claim memory info = warmupInfo[_recipient];
        if (epoch.number >= info.expiry && info.expiry != 0) {
            delete warmupInfo[_recipient];
            IWarmup(warmupContract).retrieve(
                _recipient,
                IVESYNC(veSync).balanceForGons(info.gons)
            );
        }
    }

    /**
        @notice forfeit veSYNC in warmup and retrieve SYNC
     */
    function forfeit() external {
        Claim memory info = warmupInfo[msg.sender];
        delete warmupInfo[msg.sender];

        IWarmup(warmupContract).retrieve(
            address(this),
            IVESYNC(veSync).balanceForGons(info.gons)
        );
        IERC20(Sync).safeTransfer(msg.sender, info.deposit);
    }

    /**
        @notice prevent new deposits to address (protection from malicious activity)
     */
    function toggleDepositLock() external {
        warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;
    }

    /**
        @notice redeem veSYNC for SYNC
        @param _amount uint
        @param _trigger bool
     */
    function unstake(uint _amount, bool _trigger) external {
        if (_trigger) {
            rebase();
        }
        IERC20(veSync).safeTransferFrom(msg.sender, address(this), _amount);

        uint tax = _amount.mul(taxOnUnstake).div(10000);
        uint amountAfterTax = _amount.sub(tax);

        IERC20(Sync).safeTransfer(msg.sender, amountAfterTax);
        IERC20(Sync).safeTransfer(taxReceiver, tax);
    }

    /**
        @notice returns the veSYNC index, which tracks rebase growth
        @return uint
     */
    function index() public view returns (uint) {
        return IVESYNC(veSync).index();
    }

    /**
        @notice trigger rebase if epoch over
     */
    function rebase() public {
        if (epoch.endTime <= uint32(block.timestamp)) {
            IVESYNC(veSync).rebase(epoch.distribute, epoch.number);

            epoch.endTime = epoch.endTime.add32(epoch.length);
            epoch.number++;

            if (distributor != address(0)) {
                IDistributor(distributor).distribute();
            }

            uint balance = contractBalance();
            uint staked = IVESYNC(veSync).circulatingSupply();

            if (balance <= staked) {
                epoch.distribute = 0;
            } else {
                epoch.distribute = balance.sub(staked);
            }
        }
    }

    /**
        @notice returns contract SYNC holdings, including bonuses provided
        @return uint
     */
    function contractBalance() public view returns (uint) {
        return IERC20(Sync).balanceOf(address(this)).add(totalBonus);
    }

    /**
        @notice provide bonus to locked staking contract
        @param _amount uint
     */
    function giveLockBonus(uint _amount) external {
        require(msg.sender == locker);
        totalBonus = totalBonus.add(_amount);
        IERC20(veSync).safeTransfer(locker, _amount);
    }

    /**
        @notice reclaim bonus from locked staking contract
        @param _amount uint
     */
    function returnLockBonus(uint _amount) external {
        require(msg.sender == locker);
        totalBonus = totalBonus.sub(_amount);
        IERC20(veSync).safeTransferFrom(locker, address(this), _amount);
    }

    enum CONTRACTS {
        DISTRIBUTOR,
        WARMUP,
        LOCKER
    }

    /**
        @notice sets the contract address for LP staking
        @param _contract address
     */
    function setContract(
        CONTRACTS _contract,
        address _address
    ) external onlyManager {
        if (_contract == CONTRACTS.DISTRIBUTOR) {
            // 0
            distributor = _address;
        } else if (_contract == CONTRACTS.WARMUP) {
            // 1
            require(
                warmupContract == address(0),
                "Warmup cannot be set more than once"
            );
            warmupContract = _address;
        } else if (_contract == CONTRACTS.LOCKER) {
            // 2
            require(
                locker == address(0),
                "Locker cannot be set more than once"
            );
            locker = _address;
        }
    }

    /**
     * @notice set warmup period in epoch's numbers for new stakers
     * @param _warmupPeriod uint
     */
    function setWarmup(uint _warmupPeriod) external onlyManager {
        warmupPeriod = _warmupPeriod;
    }
}

File 2 of 11 : SafeMath.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function add32(uint32 a, uint32 b) internal pure returns (uint32) {
        uint32 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function sub32(uint32 a, uint32 b) internal pure returns (uint32) {
        return sub32(a, b, "SafeMath: subtraction overflow");
    }

    function sub32(
        uint32 a,
        uint32 b,
        string memory errorMessage
    ) internal pure returns (uint32) {
        require(b <= a, errorMessage);
        uint32 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function mul32(uint32 a, uint32 b) internal pure returns (uint32) {
        if (a == 0) {
            return 0;
        }

        uint32 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    function sqrrt(uint256 a) internal pure returns (uint c) {
        if (a > 3) {
            c = a;
            uint b = add(div(a, 2), 1);
            while (b < c) {
                c = b;
                b = div(add(div(a, b), b), 2);
            }
        } else if (a != 0) {
            c = 1;
        }
    }

    function percentageAmount(
        uint256 total_,
        uint8 percentage_
    ) internal pure returns (uint256 percentAmount_) {
        return div(mul(total_, percentage_), 1000);
    }

    function substractPercentage(
        uint256 total_,
        uint8 percentageToSub_
    ) internal pure returns (uint256 result_) {
        return sub(total_, div(mul(total_, percentageToSub_), 1000));
    }

    function percentageOfTotal(
        uint256 part_,
        uint256 total_
    ) internal pure returns (uint256 percent_) {
        return div(mul(part_, 100), total_);
    }

    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2);
    }

    function quadraticPricing(
        uint256 payment_,
        uint256 multiplier_
    ) internal pure returns (uint256) {
        return sqrrt(mul(multiplier_, payment_));
    }

    function bondingCurve(
        uint256 supply_,
        uint256 multiplier_
    ) internal pure returns (uint256) {
        return mul(multiplier_, supply_);
    }
}

File 3 of 11 : Address.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard}
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(
            address(this).balance >= amount,
            "Address: insufficient balance"
        );

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data
    ) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: value}(
            data
        );
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(
            data
        );
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data
    ) internal view returns (bytes memory) {
        return
            functionStaticCall(
                target,
                data,
                "Address: low-level static call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.3._
     */
    function functionDelegateCall(
        address target,
        bytes memory data
    ) internal returns (bytes memory) {
        return
            functionDelegateCall(
                target,
                data,
                "Address: low-level delegate call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.3._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    function addressToString(
        address _address
    ) internal pure returns (string memory) {
        bytes32 _bytes = bytes32(uint256(_address));
        bytes memory HEX = "0123456789abcdef";
        bytes memory _addr = new bytes(42);

        _addr[0] = "0";
        _addr[1] = "x";

        for (uint256 i = 0; i < 20; i++) {
            _addr[2 + i * 2] = HEX[uint8(_bytes[i + 12] >> 4)];
            _addr[3 + i * 2] = HEX[uint8(_bytes[i + 12] & 0x0f)];
        }

        return string(_addr);
    }
}

File 4 of 11 : SafeERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import "./SafeMath.sol";
import "./Address.sol";
import "./IERC20.sol";

library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 11 : OwnableManagement.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import "./lib/IOwnableManagement.sol";

contract OwnableManagement is IOwnableManagement {
      address internal _owner;
    address internal _newOwner;

    event OwnershipPushed(address indexed previousOwner, address indexed newOwner);
    event OwnershipPulled(address indexed previousOwner, address indexed newOwner);

    constructor () {
        _owner = msg.sender;
        emit OwnershipPushed( address(0), _owner );
    }

    function manager() public view override returns (address) {
        return _owner;
    }

    modifier onlyManager() {
        require( _owner == msg.sender, "Ownable: caller is not the owner" );
        _;
    }

    function renounceManagement() public virtual override onlyManager() {
        emit OwnershipPushed( _owner, address(0) );
        _owner = address(0);
    }

    function pushManagement( address newOwner_ ) public virtual override onlyManager() {
        require( newOwner_ != address(0), "Ownable: new owner is the zero address");
        emit OwnershipPushed( _owner, newOwner_ );
        _newOwner = newOwner_;
    }
    
    function pullManagement() public virtual override {
        require( msg.sender == _newOwner, "Ownable: must be new owner to pull");
        emit OwnershipPulled( _owner, _newOwner );
        _owner = _newOwner;
    }
}

File 6 of 11 : IERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

interface IERC20 {
    function decimals() external view returns (uint8);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

File 7 of 11 : ISyncus.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

interface ISyncus {
    function burn(uint256 amount) external;

    function burnFrom(address account_, uint256 amount_) external;
}

File 8 of 11 : IVESYNC.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

interface IVESYNC {
    function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);

    function circulatingSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function gonsForBalance( uint amount ) external view returns ( uint );

    function balanceForGons( uint gons ) external view returns ( uint );
    
    function index() external view returns ( uint );
}

File 9 of 11 : IDistributor.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

interface IDistributor {
    function nextRewardAt(uint _rate) external view returns (uint);

    function nextRewardFor(address _recipient) external view returns (uint);

    function distribute() external returns (bool);

    function addRecipient(address _recipient, uint _rewardRate) external;

    function removeRecipient(uint _index, address _recipient) external;

    function setAdjustment(
        uint _index,
        bool _add,
        uint _rate,
        uint _target
    ) external;

    function updateCurrentRate(uint _index, uint _rate) external;
}

File 10 of 11 : IWarmup.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface IWarmup {
    function retrieve( address staker_, uint amount_ ) external;
}

File 11 of 11 : IOwnableManagement.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

interface IOwnableManagement {
    function manager() external view returns (address);

    function renounceManagement() external;

    function pushManagement(address newOwner_) external;

    function pullManagement() external;
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "istanbul",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_Sync","type":"address"},{"internalType":"address","name":"_veSync","type":"address"},{"internalType":"uint32","name":"_epochLength","type":"uint32"},{"internalType":"uint256","name":"_firstEpochNumber","type":"uint256"},{"internalType":"uint32","name":"_firstEpochTime","type":"uint32"},{"internalType":"address","name":"_taxReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPulled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPushed","type":"event"},{"inputs":[],"name":"Sync","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"distribute","type":"uint256"},{"internalType":"uint32","name":"length","type":"uint32"},{"internalType":"uint32","name":"endTime","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forfeit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"giveLockBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"locker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"pushManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"returnLockBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum SyncusStaking.CONTRACTS","name":"_contract","type":"uint8"},{"internalType":"address","name":"_address","type":"address"}],"name":"setContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxOnStake","type":"uint256"}],"name":"setTaxOnStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxOnUnstake","type":"uint256"}],"name":"setTaxOnUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxReceiver","type":"address"}],"name":"setTaxReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_warmupPeriod","type":"uint256"}],"name":"setWarmup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"taxOnStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxOnUnstake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleDepositLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_trigger","type":"bool"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"veSync","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warmupContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"warmupInfo","outputs":[{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"gons","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"lock","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warmupPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60c060405260fa600b5560fa600c5534801561001a57600080fd5b50604051611f21380380611f21833981810160405260c081101561003d57600080fd5b50805160208201516040808401516060850151608086015160a090960151600080546001600160a01b031916331780825594519697959693959294929391926001600160a01b0316917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908290a36001600160a01b0386166100be57600080fd5b6001600160601b0319606087901b166080526001600160a01b0385166100e357600080fd5b6001600160601b0319606095861b1660a0526040805160808101825284815260006020820181905263ffffffff96871692820183905293909516949095018490526002929092556003556004805464010000000090930263ffffffff60201b1963ffffffff1990941690941792909216929092179055600a80546001600160a01b03929092166001600160a01b03199092169190911790555060805160601c60a05160601c611d2c6101f5600039806104e8528061072c528061080d5280610be75280610cf35280610f945280610fd152806110bc528061124c5280611555528061169d525080610ab55280610aee5280610eae5280611033528061106b52806113d5528061163c5250611d2c6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063992125ca11610104578063d7b96d4e116100a2578063ed4acaa811610071578063ed4acaa814610466578063f39ca4bf1461046e578063f3d86e4a1461048b578063f62ae76a14610493576101da565b8063d7b96d4e14610446578063da35e06c1461044e578063deac361a14610456578063e51bde221461045e576101da565b8063af14052c116100de578063af14052c146103f3578063bfe10928146103fb578063c9f464ff14610403578063cd8de42c14610420576101da565b8063992125ca146103be5780639ebea88c146103c6578063a8dd07dc146103eb576101da565b8063481c6a751161017c578063865e6fd31161014b578063865e6fd31461034b5780638b7afe2e1461037a5780638f077b8314610382578063900cf0cf1461038a576101da565b8063481c6a75146102915780635a96ac0a146102b55780636746f4c2146102bd5780637acb77571461030b576101da565b80631e83409a116101b85780631e83409a146102235780632986c0e5146102495780633214c00c1461026357806346f68ee91461026b576101da565b806303c23670146101df578063089208d8146101fe5780630ee60fcc14610206575b600080fd5b6101fc600480360360208110156101f557600080fd5b50356104b0565b005b6101fc610514565b6101fc6004803603602081101561021c57600080fd5b50356105ab565b6101fc6004803603602081101561023957600080fd5b50356001600160a01b0316610654565b610251610809565b60408051918252519081900360200190f35b610251610895565b6101fc6004803603602081101561028157600080fd5b50356001600160a01b031661089b565b610299610988565b604080516001600160a01b039092168252519081900360200190f35b6101fc610997565b6102e3600480360360208110156102d357600080fd5b50356001600160a01b0316610a41565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6103376004803603604081101561032157600080fd5b50803590602001356001600160a01b0316610a6b565b604080519115158252519081900360200190f35b6101fc6004803603604081101561036157600080fd5b50803560ff1690602001356001600160a01b0316610d2a565b610251610ea4565b6101fc610f50565b610392610f74565b60408051948552602085019390935263ffffffff91821684840152166060830152519081900360800190f35b610299610f92565b6101fc600480360360408110156103dc57600080fd5b50803590602001351515610fb6565b61025161109a565b6101fc6110a0565b6102996112f4565b6101fc6004803603602081101561041957600080fd5b5035611303565b6101fc6004803603602081101561043657600080fd5b50356001600160a01b0316611355565b6102996113c4565b6102996113d3565b6102516113f7565b6102516113fd565b610299611403565b6101fc6004803603602081101561048457600080fd5b5035611412565b6101fc6114bb565b6101fc600480360360208110156104a957600080fd5b5035611665565b6006546001600160a01b031633146104c757600080fd5b6007546104d490826116c7565b600755600654610511906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611728565b50565b6000546001600160a01b03163314610561576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105f8576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b61271081111561064f576040805162461bcd60e51b815260206004820152601f60248201527f5461782063616e6e6f742062652067726561746572207468616e203130302500604482015290519081900360640190fd5b600b55565b61065c611bd3565b506001600160a01b0381166000908152600d602090815260409182902082516080810184528154815260018201549281019290925260028082015493830184905260039091015460ff1615156060830152549091118015906106c15750604081015115155b15610805576001600160a01b038083166000908152600d602090815260408083208381556001810184905560028101939093556003909201805460ff19169055600854848201518351637965d56d60e01b8152600481019190915292519084169363c3a2a6659387937f000000000000000000000000000000000000000000000000000000000000000090921692637965d56d92602480840193919291829003018186803b15801561077257600080fd5b505afa158015610786573d6000803e3d6000fd5b505050506040513d602081101561079c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b1580156107ec57600080fd5b505af1158015610800573d6000803e3d6000fd5b505050505b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b15801561086457600080fd5b505afa158015610878573d6000803e3d6000fd5b505050506040513d602081101561088e57600080fd5b5051905090565b600c5481565b6000546001600160a01b031633146108e8576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6001600160a01b03811661092d5760405162461bcd60e51b8152600401808060200182810382526026815260200180611c216026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6001546001600160a01b031633146109e05760405162461bcd60e51b8152600401808060200182810382526022815260200180611c6a6022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b600d6020526000908152604090208054600182015460028301546003909301549192909160ff1684565b6000610a756110a0565b6000610a98612710610a92600b548761177f90919063ffffffff16565b906117d8565b90506000610aa6858361181a565b9050610add6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308461185c565b600a54610b19906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116913391168561185c565b610b21611bd3565b506001600160a01b0384166000908152600d602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff161580156060830152610bc4576040805162461bcd60e51b815260206004820152601f60248201527f4465706f7369747320666f72206163636f756e7420617265206c6f636b656400604482015290519081900360640190fd5b604080516080810190915281518190610bdd90856116c7565b8152602001610c807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631bd39674866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50516020850151906116c7565b8152600954600254602090920191610c97916116c7565b8152600060209182018190526001600160a01b038881168252600d8352604091829020845181559284015160018401559083015160028301556060909201516003909101805460ff1916911515919091179055600854610d1c917f00000000000000000000000000000000000000000000000000000000000000008116911684611728565b600193505050505b92915050565b6000546001600160a01b03163314610d77576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6000826002811115610d8557fe5b1415610dab57600580546001600160a01b0319166001600160a01b038316179055610805565b6001826002811115610db957fe5b1415610e27576008546001600160a01b031615610e075760405162461bcd60e51b8152600401808060200182810382526023815260200180611c476023913960400191505060405180910390fd5b600880546001600160a01b0319166001600160a01b038316179055610805565b6002826002811115610e3557fe5b1415610805576006546001600160a01b031615610e835760405162461bcd60e51b8152600401808060200182810382526023815260200180611bfe6023913960400191505060405180910390fd5b600680546001600160a01b0383166001600160a01b03199091161790555050565b6000610f4b6007547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f1957600080fd5b505afa158015610f2d573d6000803e3d6000fd5b505050506040513d6020811015610f4357600080fd5b5051906116c7565b905090565b336000908152600d60205260409020600301805460ff19811660ff90911615179055565b60025460035460045463ffffffff8082169164010000000090041684565b7f000000000000000000000000000000000000000000000000000000000000000081565b8015610fc457610fc46110a0565b610ff96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308561185c565b6000611016612710610a92600c548661177f90919063ffffffff16565b90506000611024848361181a565b905061105a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611728565b600a54611094906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911684611728565b50505050565b60075481565b60045463ffffffff42811664010000000090920416116112f2577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663058ecdb46002600101546002600001546040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b15801561113257600080fd5b505af1158015611146573d6000803e3d6000fd5b505050506040513d602081101561115c57600080fd5b505060045461117e9063ffffffff64010000000082048116918116906118b616565b6004805463ffffffff929092166401000000000267ffffffff00000000199092169190911790556002805460010190556005546001600160a01b03161561123c57600560009054906101000a90046001600160a01b03166001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561120f57600080fd5b505af1158015611223573d6000803e3d6000fd5b505050506040513d602081101561123957600080fd5b50505b6000611246610ea4565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112a357600080fd5b505afa1580156112b7573d6000803e3d6000fd5b505050506040513d60208110156112cd57600080fd5b505190508082116112e2576000600355610805565b6112ec828261181a565b60035550505b565b6005546001600160a01b031681565b6000546001600160a01b03163314611350576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600955565b6000546001600160a01b031633146113a2576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60095481565b600b5481565b6008546001600160a01b031681565b6000546001600160a01b0316331461145f576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6127108111156114b6576040805162461bcd60e51b815260206004820152601f60248201527f5461782063616e6e6f742062652067726561746572207468616e203130302500604482015290519081900360640190fd5b600c55565b6114c3611bd3565b50336000818152600d602081815260408084208151608081018352815481526001820180548286019081526002840180548487015260038501805460ff8116151560608701529a8a5297875293889055908790559590915560ff1990951690925560085492518251637965d56d60e01b8152600481019190915291516001600160a01b039384169363c3a2a6659330937f000000000000000000000000000000000000000000000000000000000000000090921692637965d56d92602480840193919291829003018186803b15801561159b57600080fd5b505afa1580156115af573d6000803e3d6000fd5b505050506040513d60208110156115c557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b15801561161557600080fd5b505af1158015611629573d6000803e3d6000fd5b5050825161051192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691503390611728565b6006546001600160a01b0316331461167c57600080fd5b600754611689908261181a565b600755600654610511906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116308461185c565b600082820183811015611721576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261177a908490611919565b505050565b60008261178e57506000610d24565b8282028284828161179b57fe5b04146117215760405162461bcd60e51b8152600401808060200182810382526021815260200180611c8c6021913960400191505060405180910390fd5b600061172183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ad1565b600061172183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b73565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611094908590611919565b600082820163ffffffff8085169082161015611721576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61192b826001600160a01b0316611bcd565b61197c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106119ba5780518252601f19909201916020918201910161199b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611a1c576040519150601f19603f3d011682016040523d82523d6000602084013e611a21565b606091505b509150915081611a78576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561109457808060200190516020811015611a9457600080fd5b50516110945760405162461bcd60e51b815260040180806020018281038252602a815260200180611ccd602a913960400191505060405180910390fd5b60008183611b5d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b22578181015183820152602001611b0a565b50505050905090810190601f168015611b4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611b6957fe5b0495945050505050565b60008184841115611bc55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b22578181015183820152602001611b0a565b505050900390565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe4c6f636b65722063616e6e6f7420626520736574206d6f7265207468616e206f6e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735761726d75702063616e6e6f7420626520736574206d6f7265207468616e206f6e63654f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204b00fbe81b10c3e98649074da52c437aedff3480d2a88f67ee01c3133224a6fa64736f6c63430007050033000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f0000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc800000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006570cb7b000000000000000000000000c00ec94e7746c6b695869580d6d2db50cda86094

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063992125ca11610104578063d7b96d4e116100a2578063ed4acaa811610071578063ed4acaa814610466578063f39ca4bf1461046e578063f3d86e4a1461048b578063f62ae76a14610493576101da565b8063d7b96d4e14610446578063da35e06c1461044e578063deac361a14610456578063e51bde221461045e576101da565b8063af14052c116100de578063af14052c146103f3578063bfe10928146103fb578063c9f464ff14610403578063cd8de42c14610420576101da565b8063992125ca146103be5780639ebea88c146103c6578063a8dd07dc146103eb576101da565b8063481c6a751161017c578063865e6fd31161014b578063865e6fd31461034b5780638b7afe2e1461037a5780638f077b8314610382578063900cf0cf1461038a576101da565b8063481c6a75146102915780635a96ac0a146102b55780636746f4c2146102bd5780637acb77571461030b576101da565b80631e83409a116101b85780631e83409a146102235780632986c0e5146102495780633214c00c1461026357806346f68ee91461026b576101da565b806303c23670146101df578063089208d8146101fe5780630ee60fcc14610206575b600080fd5b6101fc600480360360208110156101f557600080fd5b50356104b0565b005b6101fc610514565b6101fc6004803603602081101561021c57600080fd5b50356105ab565b6101fc6004803603602081101561023957600080fd5b50356001600160a01b0316610654565b610251610809565b60408051918252519081900360200190f35b610251610895565b6101fc6004803603602081101561028157600080fd5b50356001600160a01b031661089b565b610299610988565b604080516001600160a01b039092168252519081900360200190f35b6101fc610997565b6102e3600480360360208110156102d357600080fd5b50356001600160a01b0316610a41565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6103376004803603604081101561032157600080fd5b50803590602001356001600160a01b0316610a6b565b604080519115158252519081900360200190f35b6101fc6004803603604081101561036157600080fd5b50803560ff1690602001356001600160a01b0316610d2a565b610251610ea4565b6101fc610f50565b610392610f74565b60408051948552602085019390935263ffffffff91821684840152166060830152519081900360800190f35b610299610f92565b6101fc600480360360408110156103dc57600080fd5b50803590602001351515610fb6565b61025161109a565b6101fc6110a0565b6102996112f4565b6101fc6004803603602081101561041957600080fd5b5035611303565b6101fc6004803603602081101561043657600080fd5b50356001600160a01b0316611355565b6102996113c4565b6102996113d3565b6102516113f7565b6102516113fd565b610299611403565b6101fc6004803603602081101561048457600080fd5b5035611412565b6101fc6114bb565b6101fc600480360360208110156104a957600080fd5b5035611665565b6006546001600160a01b031633146104c757600080fd5b6007546104d490826116c7565b600755600654610511906001600160a01b037f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc88116911683611728565b50565b6000546001600160a01b03163314610561576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105f8576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b61271081111561064f576040805162461bcd60e51b815260206004820152601f60248201527f5461782063616e6e6f742062652067726561746572207468616e203130302500604482015290519081900360640190fd5b600b55565b61065c611bd3565b506001600160a01b0381166000908152600d602090815260409182902082516080810184528154815260018201549281019290925260028082015493830184905260039091015460ff1615156060830152549091118015906106c15750604081015115155b15610805576001600160a01b038083166000908152600d602090815260408083208381556001810184905560028101939093556003909201805460ff19169055600854848201518351637965d56d60e01b8152600481019190915292519084169363c3a2a6659387937f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc890921692637965d56d92602480840193919291829003018186803b15801561077257600080fd5b505afa158015610786573d6000803e3d6000fd5b505050506040513d602081101561079c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b1580156107ec57600080fd5b505af1158015610800573d6000803e3d6000fd5b505050505b5050565b60007f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc86001600160a01b0316632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b15801561086457600080fd5b505afa158015610878573d6000803e3d6000fd5b505050506040513d602081101561088e57600080fd5b5051905090565b600c5481565b6000546001600160a01b031633146108e8576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6001600160a01b03811661092d5760405162461bcd60e51b8152600401808060200182810382526026815260200180611c216026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6001546001600160a01b031633146109e05760405162461bcd60e51b8152600401808060200182810382526022815260200180611c6a6022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b600d6020526000908152604090208054600182015460028301546003909301549192909160ff1684565b6000610a756110a0565b6000610a98612710610a92600b548761177f90919063ffffffff16565b906117d8565b90506000610aa6858361181a565b9050610add6001600160a01b037f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f01633308461185c565b600a54610b19906001600160a01b037f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f08116913391168561185c565b610b21611bd3565b506001600160a01b0384166000908152600d602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff161580156060830152610bc4576040805162461bcd60e51b815260206004820152601f60248201527f4465706f7369747320666f72206163636f756e7420617265206c6f636b656400604482015290519081900360640190fd5b604080516080810190915281518190610bdd90856116c7565b8152602001610c807f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc86001600160a01b0316631bd39674866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50516020850151906116c7565b8152600954600254602090920191610c97916116c7565b8152600060209182018190526001600160a01b038881168252600d8352604091829020845181559284015160018401559083015160028301556060909201516003909101805460ff1916911515919091179055600854610d1c917f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc88116911684611728565b600193505050505b92915050565b6000546001600160a01b03163314610d77576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6000826002811115610d8557fe5b1415610dab57600580546001600160a01b0319166001600160a01b038316179055610805565b6001826002811115610db957fe5b1415610e27576008546001600160a01b031615610e075760405162461bcd60e51b8152600401808060200182810382526023815260200180611c476023913960400191505060405180910390fd5b600880546001600160a01b0319166001600160a01b038316179055610805565b6002826002811115610e3557fe5b1415610805576006546001600160a01b031615610e835760405162461bcd60e51b8152600401808060200182810382526023815260200180611bfe6023913960400191505060405180910390fd5b600680546001600160a01b0383166001600160a01b03199091161790555050565b6000610f4b6007547f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f06001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f1957600080fd5b505afa158015610f2d573d6000803e3d6000fd5b505050506040513d6020811015610f4357600080fd5b5051906116c7565b905090565b336000908152600d60205260409020600301805460ff19811660ff90911615179055565b60025460035460045463ffffffff8082169164010000000090041684565b7f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc881565b8015610fc457610fc46110a0565b610ff96001600160a01b037f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc81633308561185c565b6000611016612710610a92600c548661177f90919063ffffffff16565b90506000611024848361181a565b905061105a6001600160a01b037f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f0163383611728565b600a54611094906001600160a01b037f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f08116911684611728565b50505050565b60075481565b60045463ffffffff42811664010000000090920416116112f2577f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc86001600160a01b031663058ecdb46002600101546002600001546040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b15801561113257600080fd5b505af1158015611146573d6000803e3d6000fd5b505050506040513d602081101561115c57600080fd5b505060045461117e9063ffffffff64010000000082048116918116906118b616565b6004805463ffffffff929092166401000000000267ffffffff00000000199092169190911790556002805460010190556005546001600160a01b03161561123c57600560009054906101000a90046001600160a01b03166001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561120f57600080fd5b505af1158015611223573d6000803e3d6000fd5b505050506040513d602081101561123957600080fd5b50505b6000611246610ea4565b905060007f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc86001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112a357600080fd5b505afa1580156112b7573d6000803e3d6000fd5b505050506040513d60208110156112cd57600080fd5b505190508082116112e2576000600355610805565b6112ec828261181a565b60035550505b565b6005546001600160a01b031681565b6000546001600160a01b03163314611350576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600955565b6000546001600160a01b031633146113a2576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031681565b7f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f081565b60095481565b600b5481565b6008546001600160a01b031681565b6000546001600160a01b0316331461145f576040805162461bcd60e51b81526020600482018190526024820152600080516020611cad833981519152604482015290519081900360640190fd5b6127108111156114b6576040805162461bcd60e51b815260206004820152601f60248201527f5461782063616e6e6f742062652067726561746572207468616e203130302500604482015290519081900360640190fd5b600c55565b6114c3611bd3565b50336000818152600d602081815260408084208151608081018352815481526001820180548286019081526002840180548487015260038501805460ff8116151560608701529a8a5297875293889055908790559590915560ff1990951690925560085492518251637965d56d60e01b8152600481019190915291516001600160a01b039384169363c3a2a6659330937f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc890921692637965d56d92602480840193919291829003018186803b15801561159b57600080fd5b505afa1580156115af573d6000803e3d6000fd5b505050506040513d60208110156115c557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b15801561161557600080fd5b505af1158015611629573d6000803e3d6000fd5b5050825161051192506001600160a01b037f000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f01691503390611728565b6006546001600160a01b0316331461167c57600080fd5b600754611689908261181a565b600755600654610511906001600160a01b037f000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc881169116308461185c565b600082820183811015611721576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261177a908490611919565b505050565b60008261178e57506000610d24565b8282028284828161179b57fe5b04146117215760405162461bcd60e51b8152600401808060200182810382526021815260200180611c8c6021913960400191505060405180910390fd5b600061172183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ad1565b600061172183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b73565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611094908590611919565b600082820163ffffffff8085169082161015611721576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61192b826001600160a01b0316611bcd565b61197c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106119ba5780518252601f19909201916020918201910161199b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611a1c576040519150601f19603f3d011682016040523d82523d6000602084013e611a21565b606091505b509150915081611a78576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561109457808060200190516020811015611a9457600080fd5b50516110945760405162461bcd60e51b815260040180806020018281038252602a815260200180611ccd602a913960400191505060405180910390fd5b60008183611b5d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b22578181015183820152602001611b0a565b50505050905090810190601f168015611b4f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611b6957fe5b0495945050505050565b60008184841115611bc55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b22578181015183820152602001611b0a565b505050900390565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe4c6f636b65722063616e6e6f7420626520736574206d6f7265207468616e206f6e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735761726d75702063616e6e6f7420626520736574206d6f7265207468616e206f6e63654f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204b00fbe81b10c3e98649074da52c437aedff3480d2a88f67ee01c3133224a6fa64736f6c63430007050033

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

000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f0000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc800000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006570cb7b000000000000000000000000c00ec94e7746c6b695869580d6d2db50cda86094

-----Decoded View---------------
Arg [0] : _Sync (address): 0xa41d2f8Ee4F47D3B860A149765A7dF8c3287b7F0
Arg [1] : _veSync (address): 0x216c9bb7380cDe431662E37e30098d838d7e1Dc8
Arg [2] : _epochLength (uint32): 28800
Arg [3] : _firstEpochNumber (uint256): 1
Arg [4] : _firstEpochTime (uint32): 1701890939
Arg [5] : _taxReceiver (address): 0xC00EC94e7746C6b695869580d6D2DB50cda86094

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000a41d2f8ee4f47d3b860a149765a7df8c3287b7f0
Arg [1] : 000000000000000000000000216c9bb7380cde431662e37e30098d838d7e1dc8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000007080
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 000000000000000000000000000000000000000000000000000000006570cb7b
Arg [5] : 000000000000000000000000c00ec94e7746c6b695869580d6d2db50cda86094


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  ]

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.