Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x4481a1cCd2a09F70e7F83840dFf1ABF649b9D979
Balance 0 ETH
Nonce 1
Code Size 3407 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3407 bytes
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063b8466c2211610066578063b8466c2214610208578063e30c397814610223578063f2fde38b14610234578063f35dad401461024757600080fd5b80638da5cb5b146101ae57806390884e0d146101bf578063ad5c4648146101d2578063b0ca2e62146101ed57600080fd5b806361d027b3116100d357806361d027b314610150578063715018a61461018357806379ba50971461018b5780637cc9a3731461019357600080fd5b806316078d04146101055780634ecc1f77146101205780635fe978ef1461013d57806360303ff414610146575b600080fd5b61010d610250565b6040519081526020015b60405180910390f35b60035461012d9060ff1681565b6040519015158152602001610117565b61010d60055481565b61014e6103f2565b005b61016b735295434f968957dfd98ea89be08ee6b220ca6e1c81565b6040516001600160a01b039091168152602001610117565b61014e61049a565b61014e6104ae565b61016b73d7fc610f6595b3aa6e24466b5ca166d10a0fbdcb81565b6000546001600160a01b031661016b565b61014e6101cd366004610c1a565b61053c565b61016b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b61016b731bb9b64927e0c5e207c9db4093b3738eef5d844781565b61016b737abcfda9adb27d2291a189d7153af91d5975f1f881565b6001546001600160a01b031661016b565b61014e610242366004610c33565b610a68565b61010d60045481565b6040516370a0823160e01b8152737abcfda9adb27d2291a189d7153af91d5975f1f860048201526000908190731bb9b64927e0c5e207c9db4093b3738eef5d8447906370a0823190602401602060405180830381865afa1580156102b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dc9190610c63565b731bb9b64927e0c5e207c9db4093b3738eef5d84476001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561032e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103529190610c63565b61035c9190610c92565b905061036c81633b9aca00610cab565b73d7fc610f6595b3aa6e24466b5ca166d10a0fbdcb6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e29190610c63565b6103ec9190610cc2565b91505090565b6103fa610ae6565b60035460ff16156104525760405162461bcd60e51b815260206004820152600e60248201527f416c72656164792061637469766500000000000000000000000000000000000060448201526064015b60405180910390fd5b6003805460ff1916600117905561046c4262ed4e00610cc2565b6005556040517f7fdccba02106e1447ff6ab0a20e4e4d4dfed3e5972d036b1ef8fc1644bde573790600090a1565b6104a2610ae6565b6104ac6000610b40565b565b60015433906001600160a01b031681146105305760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152608401610449565b61053981610b40565b50565b610544610b66565b60035460ff166105965760405162461bcd60e51b815260206004820152601660248201527f526564656d7074696f6e204e6f742053746172746564000000000000000000006044820152606401610449565b42600554116105e75760405162461bcd60e51b815260206004820152601060248201527f526564656d7074696f6e20456e646564000000000000000000000000000000006044820152606401610449565b6040516370a0823160e01b8152737abcfda9adb27d2291a189d7153af91d5975f1f86004820152600090731bb9b64927e0c5e207c9db4093b3738eef5d8447906370a0823190602401602060405180830381865afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106719190610c63565b731bb9b64927e0c5e207c9db4093b3738eef5d84476001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e79190610c63565b6106f19190610c92565b9050600061070382633b9aca00610cab565b73d7fc610f6595b3aa6e24466b5ca166d10a0fbdcb6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107799190610c63565b6107839190610cc2565b905060008161079a85670de0b6b3a7640000610cab565b6107a49190610cd5565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810186905290915073d7fc610f6595b3aa6e24466b5ca166d10a0fbdcb906323b872dd906064016020604051808303816000875af115801561081e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108429190610cf7565b506040517f42966c680000000000000000000000000000000000000000000000000000000081526004810185905273d7fc610f6595b3aa6e24466b5ca166d10a0fbdcb906342966c6890602401600060405180830381600087803b1580156108a957600080fd5b505af11580156108bd573d6000803e3d6000fd5b50506040516370a0823160e01b8152735295434f968957dfd98ea89be08ee6b220ca6e1c60048201526000925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506370a0823190602401602060405180830381865afa158015610927573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094b9190610c63565b90506000670de0b6b3a76400006109628484610cab565b61096c9190610cd5565b6040517fbc20c23e00000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2600482015233602482015260448101829052909150735295434f968957dfd98ea89be08ee6b220ca6e1c9063bc20c23e90606401600060405180830381600087803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050508560046000828254610a1f9190610cc2565b909155505060405186815233907f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b93699060200160405180910390a250505050506105396001600255565b610a70610ae6565b600180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091168117909155610aae6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146104ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610449565b6001805473ffffffffffffffffffffffffffffffffffffffff1916905561053981610bbd565b6002805403610bb75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610449565b60028055565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610c2c57600080fd5b5035919050565b600060208284031215610c4557600080fd5b81356001600160a01b0381168114610c5c57600080fd5b9392505050565b600060208284031215610c7557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ca557610ca5610c7c565b92915050565b8082028115828204841417610ca557610ca5610c7c565b80820180821115610ca557610ca5610c7c565b600082610cf257634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610d0957600080fd5b81518015158114610c5c57600080fdfea26469706673582212207acbae4213c2456c16f8bf80edcb3960379cb41763db37b594f3915d1555a7e264736f6c634300081c0033

Verified Source Code Full Match

Compiler: v0.8.28+commit.7893614a EVM: paris Optimization: Yes (1000 runs)
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
Ownable2Step.sol 57 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}
ReentrancyGuard.sol 77 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
ReedemKERN.sol 80 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.28;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IKERN {
    function burn(uint256 amount) external;
}

interface ITreasury {
    function transferFromTreasury(address _token, address _to, uint256 _amount) external;
}

contract RedeemKERN is Ownable2Step, ReentrancyGuard {
    /// @notice Bool if redemptions are active
    bool public redemptionActive;

    /// @notice WETH address
    address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
    /// @notice Address of VEC
    address public constant VEC = 0x1BB9b64927e0C5e207C9DB4093b3738Eef5D8447;
    /// @notice Address of KERN
    address public constant KERN = 0xD7fC610F6595b3aA6E24466b5cA166D10a0fbdcb;
    /// @notice Address of treasury
    address public constant treasury = 0x5295434F968957dFd98eA89be08EE6b220ca6e1C;
    /// @notice Address of old vest
    address public constant oldVest = 0x7aBcfdA9ADb27d2291a189d7153aF91D5975f1F8;

    /// @notice Total redeemed
    uint256 public totalRedeemed;
    /// @notice Timestamp redeemable till
    uint256 public redeemableTill;

    /// EVENTS ///

    event SetRedemtionActive();
    event Redeemed(address indexed who, uint256 amount);

    /// CONSTRUCTOR ///

    constructor() Ownable2Step() {}

    /// OWNABLE ///

    /// @notice  Set redemptions to active
    function setRedemtionActive() external onlyOwner {
        require(!redemptionActive, "Already active");
        redemptionActive = true;
        redeemableTill = block.timestamp + 180 days;
        emit SetRedemtionActive();
    }

    /// USER FUNCTIONS ///

    /// @notice         Burn KERN and redeem proportionate amount of treasury
    /// @param _amount  Amount of KERN to burn
    function burnAndRedeem(uint256 _amount) external nonReentrant {
        require(redemptionActive, "Redemption Not Started");
        require(redeemableTill > block.timestamp, "Redemption Ended");
        uint256 _VECSupplyOutstanding = IERC20(VEC).totalSupply() - IERC20(VEC).balanceOf(oldVest);
        uint256 _total = IERC20(KERN).totalSupply() + (_VECSupplyOutstanding * 1e9);
        uint256 percent = (1e18 * _amount) / _total;
        IERC20(KERN).transferFrom(msg.sender, address(this), _amount);
        IKERN(KERN).burn(_amount);
        uint256 tokenSupply = IERC20(WETH).balanceOf(treasury);
        uint256 toSend = (tokenSupply * percent) / 1e18;
        ITreasury(treasury).transferFromTreasury(WETH, msg.sender, toSend);
        totalRedeemed += _amount;
        emit Redeemed(msg.sender, _amount);
    }

    /// EXTERNAL ///

    function totalOutstanding() external view returns (uint256 _total) {
        uint256 _VECSupplyOutstanding = IERC20(VEC).totalSupply() - IERC20(VEC).balanceOf(oldVest);
        _total = IERC20(KERN).totalSupply() + (_VECSupplyOutstanding * 1e9);
    }
}

Read Contract

KERN 0x7cc9a373 → address
VEC 0xb0ca2e62 → address
WETH 0xad5c4648 → address
oldVest 0xb8466c22 → address
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address
redeemableTill 0x5fe978ef → uint256
redemptionActive 0x4ecc1f77 → bool
totalOutstanding 0x16078d04 → uint256
totalRedeemed 0xf35dad40 → uint256
treasury 0x61d027b3 → address

Write Contract 5 functions

These functions modify contract state and require a wallet transaction to execute.

acceptOwnership 0x79ba5097
No parameters
burnAndRedeem 0x90884e0d
uint256 _amount
renounceOwnership 0x715018a6
No parameters
setRedemtionActive 0x60303ff4
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address