ETH Price: $2,341.11 (-1.30%)

Contract

0xEA2803368b8BABa22d841294D33ee5aF8Bafd5A6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Disable Auto Rep...181419772023-09-15 13:40:47384 days ago1694785247IN
0xEA280336...F8Bafd5A6
0 ETH0.0003805916.61335202
Disable Auto Rep...181136852023-09-11 14:23:59388 days ago1694442239IN
0xEA280336...F8Bafd5A6
0 ETH0.0005550624.22898496
Execute181124922023-09-11 10:23:35388 days ago1694427815IN
0xEA280336...F8Bafd5A6
0 ETH0.01902741.94231718
Enable Auto Repa...180359262023-08-31 17:03:23399 days ago1693501403IN
0xEA280336...F8Bafd5A6
0 ETH0.006471567.43257005
Enable Auto Repa...180190092023-08-29 8:12:11401 days ago1693296731IN
0xEA280336...F8Bafd5A6
0 ETH0.0021110722
Disable Auto Rep...180188982023-08-29 7:49:47401 days ago1693295387IN
0xEA280336...F8Bafd5A6
0 ETH0.0003956917.27246069
Enable Auto Repa...180137372023-08-28 14:28:11402 days ago1693232891IN
0xEA280336...F8Bafd5A6
0 ETH0.0033948235.37382529
Enable Auto Repa...180021002023-08-26 23:23:11403 days ago1693092191IN
0xEA280336...F8Bafd5A6
0 ETH0.0013114913.66567477
Enable Auto Repa...179927512023-08-25 15:58:59405 days ago1692979139IN
0xEA280336...F8Bafd5A6
0 ETH0.0025149326.20540664
Enable Auto Repa...179926322023-08-25 15:35:11405 days ago1692977711IN
0xEA280336...F8Bafd5A6
0 ETH0.0031908933.2488926
Enable Auto Repa...179748542023-08-23 3:54:35407 days ago1692762875IN
0xEA280336...F8Bafd5A6
0 ETH0.0005819314.89916341
Enable Auto Repa...179577102023-08-20 18:21:47410 days ago1692555707IN
0xEA280336...F8Bafd5A6
0 ETH0.0017274618
Enable Auto Repa...179480052023-08-19 9:43:35411 days ago1692438215IN
0xEA280336...F8Bafd5A6
0 ETH0.0013749914.32735781
Enable Auto Repa...179476022023-08-19 8:22:35411 days ago1692433355IN
0xEA280336...F8Bafd5A6
0 ETH0.001271813.25381924
Enable Auto Repa...179432062023-08-18 17:37:23412 days ago1692380243IN
0xEA280336...F8Bafd5A6
0 ETH0.0017553344.9417461
Enable Auto Repa...179427412023-08-18 16:03:59412 days ago1692374639IN
0xEA280336...F8Bafd5A6
0 ETH0.0044833646.71636321
Enable Auto Repa...179406842023-08-18 9:08:11412 days ago1692349691IN
0xEA280336...F8Bafd5A6
0 ETH0.0020153721
Enable Auto Repa...179400292023-08-18 6:55:47412 days ago1692341747IN
0xEA280336...F8Bafd5A6
0 ETH0.0017368318.1
Enable Auto Repa...179394022023-08-18 4:49:35412 days ago1692334175IN
0xEA280336...F8Bafd5A6
0 ETH0.0015629216.28762421
Enable Auto Repa...179219152023-08-15 18:06:11415 days ago1692122771IN
0xEA280336...F8Bafd5A6
0 ETH0.0024703240
Enable Auto Repa...179174682023-08-15 3:09:35415 days ago1692068975IN
0xEA280336...F8Bafd5A6
0 ETH0.0006303115.05411118
Enable Auto Repa...179165682023-08-15 0:08:47415 days ago1692058127IN
0xEA280336...F8Bafd5A6
0 ETH0.001558216.2364032
Enable Auto Repa...179086932023-08-13 21:42:11416 days ago1691962931IN
0xEA280336...F8Bafd5A6
0 ETH0.0013761314.34100934
Enable Auto Repa...179010242023-08-12 20:00:11417 days ago1691870411IN
0xEA280336...F8Bafd5A6
0 ETH0.0016400317.08906276
Enable Auto Repa...178640982023-08-07 15:59:11423 days ago1691423951IN
0xEA280336...F8Bafd5A6
0 ETH0.0041648743.40310978
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:
CollateralRatioGuardian

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : CollateralRatioGuardian.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

import "./ILybra.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract CollateralRatioGuardian is Ownable {
    ILybra public immutable lybra;
    AggregatorV3Interface internal priceFeed =
        AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);

    mapping (address => RepaymentSetting) public userRepaymentSettings;
    uint256 public fee = 200 * 1e18;

    struct RepaymentSetting {
        uint256 triggerCollateralRatio;
        uint256 expectedCollateralRatio;
        bool active;
    }

    event UserActivatedAutoRepayment(address indexed user, uint256 triggerCollateralRatio, uint256 expectedCollateralRatio);
    event UserDeactivatedAutoRepayment(address indexed user);
    event ServiceFeeChanged(uint256 newFee, uint256 time);
    event ExecuteAutoRepayment(address indexed user, address keeper, uint256 repayAmount, uint256 fee, uint256 time);

    constructor(address _lybra) {
        lybra = ILybra(_lybra);
    }

    /**
    * @notice Allows the admin to modify the service fee, with a maximum of 500 eUSD.
    * @dev Only the admin is allowed to call this function to modify the service fee.
    * @param _fee The new service fee amount. Must be between 100 and 500 eUSD.
    */
    function setFee(uint256 _fee) external onlyOwner {
        require(_fee <= 500 * 1e18 && _fee >= 100 * 1e18, "Fee must be between 100 and 500 eUSD");
        fee = _fee;
        emit ServiceFeeChanged(_fee, block.timestamp);
    }

    /**
    * @notice Enables the user to activate the automatic repayment feature.
    * @dev The user can enable the automatic repayment feature by calling this function.
    * @param expectedCollateralRatio The expected collateralization rate. Must be greater than the trigger collateralization rate and the safe collateralization rate specified by the Lybra contract.
    * @param triggerCollateralRatio The trigger collateralization rate. Must be greater than the bad collateralization rate specified by the Lybra contract.
    */
    function enableAutoRepayment(uint256 triggerCollateralRatio, uint256 expectedCollateralRatio) external {
        require(expectedCollateralRatio > triggerCollateralRatio, "The expectedCollateralRatio needs to be higher than the triggerCollateralRatio.");
        require(triggerCollateralRatio > lybra.badCollateralRate(), "The triggerCollateralRatio needs to be higher than lybra.badCollateralRatio.");
        require(expectedCollateralRatio >= lybra.safeCollateralRate(), "The expectedCollateralRatio needs to be greater than or equal to lybra.safeCollateralRatio");
        userRepaymentSettings[msg.sender] = RepaymentSetting(triggerCollateralRatio, expectedCollateralRatio, true);
        emit UserActivatedAutoRepayment(msg.sender, triggerCollateralRatio, expectedCollateralRatio);
    }

    /**
    * @notice Allows the user to disable the automatic repayment feature.
    */
    function disableAutoRepayment() external {
        require(userRepaymentSettings[msg.sender].active == true, "The automatic repayment is not enabled.");
         userRepaymentSettings[msg.sender].active = false;
         emit UserDeactivatedAutoRepayment(msg.sender);
    }

    /**
    * @notice Retrieves the real-time price of ETH using Chainlink.
    * @return The real-time price of ETH.convert the return value from Chainlink to 18 decimals.
    */
    function getEtherPrice() public view returns (uint256) {
        // prettier-ignore
        (
            /* uint80 roundID */,
            int price,
            /*uint startedAt*/,
            /*uint timeStamp*/,
            /*uint80 answeredInRound*/
        ) = priceFeed.latestRoundData();
        require(price > 0, "The ChainLink return value must be greater than 0.");
        return uint256(price * 1e10);
    }

    
    /**
    * @dev Allows any third-party keeper to trigger automatic repayment for a user.
    * Requirements:
    * `user` must have enabled the automatic repayment feature.
    * Current collateral ratio of the user must be less than or equal to userSetting.triggerCollateralRatio.
    * `user` must have authorized this contract to spend eUSD in an amount greater than the repayment amount + fee.
    */
    function execute(address user) external {
        RepaymentSetting memory userSetting = userRepaymentSettings[user];
        require(userSetting.active == true, "The user has not enabled the automatic repayment");
        uint256 userCollateralRatio = getCollateralRatio(user);
        require(userCollateralRatio <= userSetting.triggerCollateralRatio, "The user's collateralRate is not below the trigger collateralRate");

        uint256 targetDebt = (lybra.depositedEther(user) * getEtherPrice()) * 100 / userSetting.expectedCollateralRatio;
        uint256 repayAmount = lybra.getBorrowedOf(user) - targetDebt ;
        lybra.transferFrom(user, address(this), repayAmount + fee);
        lybra.burn(user, repayAmount);
        uint256 balance = lybra.balanceOf(address(this)) < fee ? lybra.balanceOf(address(this)):fee;
        lybra.transfer(msg.sender, balance);
        emit ExecuteAutoRepayment(user, msg.sender, repayAmount, balance, block.timestamp);
    }

    /**
    * @dev Returns whether it is possible to invoke the automatic repayment function on behalf of `user`.
    * @return True if it is possible to invoke the automatic repayment function on behalf of `user`, otherwise false.
    */
    function checkExecutionFeasibility(address user) external view returns(bool) {
        RepaymentSetting memory userSetting = userRepaymentSettings[user];
        if(userSetting.active != true) return false;
        uint256 userCollateralRatio = getCollateralRatio(user);
        if(userCollateralRatio > userSetting.triggerCollateralRatio) return false;

        uint256 targetDebt = (lybra.depositedEther(user) * getEtherPrice()) * 100 / userSetting.expectedCollateralRatio;
        uint256 totalAmount = lybra.getBorrowedOf(user) - targetDebt + fee;
        if(lybra.allowance(user, address(this)) < totalAmount || lybra.balanceOf(user) < totalAmount) return false;
        return true;
    }

    /**
    * @dev Retrieves the current collateral ratio of `user`.
    */
    function getCollateralRatio(address user) public view returns (uint256) {
        if (lybra.getBorrowedOf(user) == 0) return 1e22;
        return
            (lybra.depositedEther(user) * getEtherPrice()) * 100 /
            lybra.getBorrowedOf(user);
    }
    
}

File 2 of 6 : Ownable.sol
// 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);
    }
}

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

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

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

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

File 4 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 5 of 6 : ILybra.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

interface ILybra {
    function totalSupply() external view returns (uint256);

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

    function sharesOf(address account) external view returns (uint256);

    function totalDepositedEther() external view returns (uint256);

    function badCollateralRate() external view returns (uint256);

    function burn(address onBehalfOf, uint256 amount) external;

    function safeCollateralRate() external view returns (uint256);

    function redemptionFee() external view returns (uint256);

    function keeperRate() external view returns (uint256);

    function depositedEther(address user) external view returns (uint256);

    function getBorrowedOf(address user) external view returns (uint256);

    function isRedemptionProvider(address user) external view returns (bool);

    function allowance(address owner, address spender) external view returns (uint256);

    function transfer(
        address _recipient,
        uint256 _amount
    ) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    function transferShares(
        address _recipient,
        uint256 _sharesAmount
    ) external returns (uint256);

    function getSharesByMintedEUSD(
        uint256 _EUSDAmount
    ) external view returns (uint256);

    function getMintedEUSDByShares(
        uint256 _sharesAmount
    ) external view returns (uint256);
}

File 6 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lybra","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"keeper","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"ExecuteAutoRepayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"ServiceFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"triggerCollateralRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expectedCollateralRatio","type":"uint256"}],"name":"UserActivatedAutoRepayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"UserDeactivatedAutoRepayment","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"checkExecutionFeasibility","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableAutoRepayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"triggerCollateralRatio","type":"uint256"},{"internalType":"uint256","name":"expectedCollateralRatio","type":"uint256"}],"name":"enableAutoRepayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getCollateralRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEtherPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lybra","outputs":[{"internalType":"contract ILybra","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRepaymentSettings","outputs":[{"internalType":"uint256","name":"triggerCollateralRatio","type":"uint256"},{"internalType":"uint256","name":"expectedCollateralRatio","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"}]

60a0604052600180546001600160a01b031916735f4ec3df9cbd43714fe2740f5e3616155c5b8419179055680ad78ebc5ac620000060035534801561004357600080fd5b50604051611777380380611777833981016040819052610062916100cc565b61006b3361007c565b6001600160a01b03166080526100fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100de57600080fd5b81516001600160a01b03811681146100f557600080fd5b9392505050565b6080516115f061018760003960008181610204015281816102ba015281816103c50152818161058b0152818161062e015281816106c0015281816108b801528181610968015281816109e301528181610abf01528181610b4001528181610bcd01528181610c5f01528181610ea401528181610f5701528181611002015261109501526115f06000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ae48fdfa1161008c578063dce65d1d11610066578063dce65d1d14610195578063ddca3f43146101e3578063f2fde38b146101ec578063fccabef3146101ff57600080fd5b8063ae48fdfa14610162578063bcf16b7314610185578063ca7c4dba1461018d57600080fd5b80631303515b146100d457806315a3ba43146100e95780634b64e4921461010f57806369fe0e2d14610122578063715018a6146101355780638da5cb5b1461013d575b600080fd5b6100e76100e2366004611400565b610226565b005b6100fc6100f7366004611422565b61056a565b6040519081526020015b60405180910390f35b6100e761011d366004611422565b610750565b6100e7610130366004611452565b610d2f565b6100e7610df1565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610106565b610175610170366004611422565b610e05565b6040519015158152602001610106565b6100e7611121565b6100fc6111dd565b6101c66101a3366004611422565b600260208190526000918252604090912080546001820154919092015460ff1683565b604080519384526020840192909252151590820152606001610106565b6100fc60035481565b6100e76101fa366004611422565b6112dd565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b8181116102b85760405162461bcd60e51b815260206004820152604f60248201527f546865206578706563746564436f6c6c61746572616c526174696f206e65656460448201527f7320746f20626520686967686572207468616e2074686520747269676765724360648201526e37b63630ba32b930b62930ba34b79760891b608482015260a4015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ac0799dd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a919061146b565b82116103c35760405162461bcd60e51b815260206004820152604c60248201527f5468652074726967676572436f6c6c61746572616c526174696f206e6565647360448201527f20746f20626520686967686572207468616e206c796272612e626164436f6c6c60648201526b30ba32b930b62930ba34b79760a11b608482015260a4016102af565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632d4719406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610445919061146b565b8110156104e05760405162461bcd60e51b815260206004820152605a60248201527f546865206578706563746564436f6c6c61746572616c526174696f206e65656460448201527f7320746f2062652067726561746572207468616e206f7220657175616c20746f60648201527f206c796272612e73616665436f6c6c61746572616c526174696f000000000000608482015260a4016102af565b6040805160608101825283815260208082018481526001838501818152336000818152600280875290889020965187559351928601929092555193909101805460ff191693151593909317909255825185815290810184905290917f45fb47e5143c87db5c20a91157578a5d47ed3e7ef825710694b6cb9c71eafd27910160405180910390a25050565b60405162b5b06160e31b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906305ad830890602401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f8919061146b565b600003610610575069021e19e0c9bab2400000919050565b60405162b5b06160e31b81526001600160a01b0383811660048301527f000000000000000000000000000000000000000000000000000000000000000016906305ad830890602401602060405180830381865afa158015610675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610699919061146b565b6106a16111dd565b604051632417695160e11b81526001600160a01b0385811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063482ed2a290602401602060405180830381865afa158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b919061146b565b610735919061149a565b61074090606461149a565b61074a91906114b1565b92915050565b6001600160a01b0381166000908152600260208181526040928390208351606081018552815481526001808301549382019390935292015460ff1615159282018390529091146107fb5760405162461bcd60e51b815260206004820152603060248201527f546865207573657220686173206e6f7420656e61626c6564207468652061757460448201526f1bdb585d1a58c81c995c185e5b595b9d60821b60648201526084016102af565b60006108068361056a565b825190915081111561088a5760405162461bcd60e51b815260206004820152604160248201527f5468652075736572277320636f6c6c61746572616c52617465206973206e6f7460448201527f2062656c6f7720746865207472696767657220636f6c6c61746572616c5261746064820152606560f81b608482015260a4016102af565b600082602001516108996111dd565b604051632417695160e11b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063482ed2a290602401602060405180830381865afa1580156108ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610923919061146b565b61092d919061149a565b61093890606461149a565b61094291906114b1565b60405162b5b06160e31b81526001600160a01b03868116600483015291925060009183917f0000000000000000000000000000000000000000000000000000000000000000909116906305ad830890602401602060405180830381865afa1580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d5919061146b565b6109df91906114d3565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd863060035485610a2091906114e6565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9891906114f9565b50604051632770a7eb60e21b81526001600160a01b038681166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac90604401600060405180830381600087803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152306004820152600093509091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab919061146b565b10610bb857600354610c40565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c40919061146b565b60405163a9059cbb60e01b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610cb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd491906114f9565b5060408051338152602081018490529081018290524260608201526001600160a01b038716907f642db74229132d675fd9192b825041b1033e58c1b38f6aec064c1b555611dad09060800160405180910390a2505050505050565b610d37611356565b681b1ae4d6e2ef5000008111158015610d59575068056bc75e2d631000008110155b610db15760405162461bcd60e51b8152602060048201526024808201527f466565206d757374206265206265747765656e2031303020616e642035303020604482015263195554d160e21b60648201526084016102af565b6003819055604080518281524260208201527f6447894e1284d506804c4712de29291e4bac8c5f165551941531389054d06742910160405180910390a150565b610df9611356565b610e0360006113b0565b565b6001600160a01b03811660009081526002602081815260408084208151606081018352815481526001808301549482019490945293015460ff16151590830181905214610e555750600092915050565b6000610e608461056a565b8251909150811115610e76575060009392505050565b60008260200151610e856111dd565b604051632417695160e11b81526001600160a01b0388811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063482ed2a290602401602060405180830381865afa158015610eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061146b565b610f19919061149a565b610f2490606461149a565b610f2e91906114b1565b60035460405162b5b06160e31b81526001600160a01b03888116600483015292935060009284917f0000000000000000000000000000000000000000000000000000000000000000909116906305ad830890602401602060405180830381865afa158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc4919061146b565b610fce91906114d3565b610fd891906114e6565b604051636eb1769f60e11b81526001600160a01b03888116600483015230602483015291925082917f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e90604401602060405180830381865afa158015611049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d919061146b565b108061110457506040516370a0823160e01b81526001600160a01b03878116600483015282917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611102919061146b565b105b156111155750600095945050505050565b50600195945050505050565b336000908152600260208190526040909120015460ff1615156001146111995760405162461bcd60e51b815260206004820152602760248201527f546865206175746f6d617469632072657061796d656e74206973206e6f7420656044820152663730b13632b21760c91b60648201526084016102af565b336000818152600260208190526040808320909101805460ff19169055517f2dd72a99526e0cc438b10f1be4d92aa5a8537cf7fdd5dbed3dbb1a791a1fd6109190a2565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611257919061153a565b505050915050600081136112c85760405162461bcd60e51b815260206004820152603260248201527f54686520436861696e4c696e6b2072657475726e2076616c7565206d7573742060448201527131329033b932b0ba32b9103a3430b710181760711b60648201526084016102af565b6112d7816402540be40061158a565b91505090565b6112e5611356565b6001600160a01b03811661134a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102af565b611353816113b0565b50565b6000546001600160a01b03163314610e035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102af565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561141357600080fd5b50508035926020909101359150565b60006020828403121561143457600080fd5b81356001600160a01b038116811461144b57600080fd5b9392505050565b60006020828403121561146457600080fd5b5035919050565b60006020828403121561147d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074a5761074a611484565b6000826114ce57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561074a5761074a611484565b8082018082111561074a5761074a611484565b60006020828403121561150b57600080fd5b8151801515811461144b57600080fd5b805169ffffffffffffffffffff8116811461153557600080fd5b919050565b600080600080600060a0868803121561155257600080fd5b61155b8661151b565b945060208601519350604086015192506060860151915061157e6080870161151b565b90509295509295909350565b80820260008212600160ff1b841416156115a6576115a6611484565b818105831482151761074a5761074a61148456fea26469706673582212203b1913aabac704c058dbe30f513ad8bca48604581c9e2346b2c8bae6cba6bc1464736f6c6343000811003300000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ae48fdfa1161008c578063dce65d1d11610066578063dce65d1d14610195578063ddca3f43146101e3578063f2fde38b146101ec578063fccabef3146101ff57600080fd5b8063ae48fdfa14610162578063bcf16b7314610185578063ca7c4dba1461018d57600080fd5b80631303515b146100d457806315a3ba43146100e95780634b64e4921461010f57806369fe0e2d14610122578063715018a6146101355780638da5cb5b1461013d575b600080fd5b6100e76100e2366004611400565b610226565b005b6100fc6100f7366004611422565b61056a565b6040519081526020015b60405180910390f35b6100e761011d366004611422565b610750565b6100e7610130366004611452565b610d2f565b6100e7610df1565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610106565b610175610170366004611422565b610e05565b6040519015158152602001610106565b6100e7611121565b6100fc6111dd565b6101c66101a3366004611422565b600260208190526000918252604090912080546001820154919092015460ff1683565b604080519384526020840192909252151590820152606001610106565b6100fc60035481565b6100e76101fa366004611422565b6112dd565b61014a7f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada37181565b8181116102b85760405162461bcd60e51b815260206004820152604f60248201527f546865206578706563746564436f6c6c61746572616c526174696f206e65656460448201527f7320746f20626520686967686572207468616e2074686520747269676765724360648201526e37b63630ba32b930b62930ba34b79760891b608482015260a4015b60405180910390fd5b7f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3716001600160a01b031663ac0799dd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a919061146b565b82116103c35760405162461bcd60e51b815260206004820152604c60248201527f5468652074726967676572436f6c6c61746572616c526174696f206e6565647360448201527f20746f20626520686967686572207468616e206c796272612e626164436f6c6c60648201526b30ba32b930b62930ba34b79760a11b608482015260a4016102af565b7f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3716001600160a01b0316632d4719406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610445919061146b565b8110156104e05760405162461bcd60e51b815260206004820152605a60248201527f546865206578706563746564436f6c6c61746572616c526174696f206e65656460448201527f7320746f2062652067726561746572207468616e206f7220657175616c20746f60648201527f206c796272612e73616665436f6c6c61746572616c526174696f000000000000608482015260a4016102af565b6040805160608101825283815260208082018481526001838501818152336000818152600280875290889020965187559351928601929092555193909101805460ff191693151593909317909255825185815290810184905290917f45fb47e5143c87db5c20a91157578a5d47ed3e7ef825710694b6cb9c71eafd27910160405180910390a25050565b60405162b5b06160e31b81526001600160a01b0382811660048301526000917f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371909116906305ad830890602401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f8919061146b565b600003610610575069021e19e0c9bab2400000919050565b60405162b5b06160e31b81526001600160a01b0383811660048301527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada37116906305ad830890602401602060405180830381865afa158015610675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610699919061146b565b6106a16111dd565b604051632417695160e11b81526001600160a01b0385811660048301527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371169063482ed2a290602401602060405180830381865afa158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b919061146b565b610735919061149a565b61074090606461149a565b61074a91906114b1565b92915050565b6001600160a01b0381166000908152600260208181526040928390208351606081018552815481526001808301549382019390935292015460ff1615159282018390529091146107fb5760405162461bcd60e51b815260206004820152603060248201527f546865207573657220686173206e6f7420656e61626c6564207468652061757460448201526f1bdb585d1a58c81c995c185e5b595b9d60821b60648201526084016102af565b60006108068361056a565b825190915081111561088a5760405162461bcd60e51b815260206004820152604160248201527f5468652075736572277320636f6c6c61746572616c52617465206973206e6f7460448201527f2062656c6f7720746865207472696767657220636f6c6c61746572616c5261746064820152606560f81b608482015260a4016102af565b600082602001516108996111dd565b604051632417695160e11b81526001600160a01b0387811660048301527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371169063482ed2a290602401602060405180830381865afa1580156108ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610923919061146b565b61092d919061149a565b61093890606461149a565b61094291906114b1565b60405162b5b06160e31b81526001600160a01b03868116600483015291925060009183917f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371909116906305ad830890602401602060405180830381865afa1580156109b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d5919061146b565b6109df91906114d3565b90507f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3716001600160a01b03166323b872dd863060035485610a2091906114e6565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9891906114f9565b50604051632770a7eb60e21b81526001600160a01b038681166004830152602482018390527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3711690639dc29fac90604401600060405180830381600087803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152306004820152600093509091506001600160a01b037f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada37116906370a0823190602401602060405180830381865afa158015610b87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bab919061146b565b10610bb857600354610c40565b6040516370a0823160e01b81523060048201527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3716001600160a01b0316906370a0823190602401602060405180830381865afa158015610c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c40919061146b565b60405163a9059cbb60e01b8152336004820152602481018290529091507f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada3716001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610cb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd491906114f9565b5060408051338152602081018490529081018290524260608201526001600160a01b038716907f642db74229132d675fd9192b825041b1033e58c1b38f6aec064c1b555611dad09060800160405180910390a2505050505050565b610d37611356565b681b1ae4d6e2ef5000008111158015610d59575068056bc75e2d631000008110155b610db15760405162461bcd60e51b8152602060048201526024808201527f466565206d757374206265206265747765656e2031303020616e642035303020604482015263195554d160e21b60648201526084016102af565b6003819055604080518281524260208201527f6447894e1284d506804c4712de29291e4bac8c5f165551941531389054d06742910160405180910390a150565b610df9611356565b610e0360006113b0565b565b6001600160a01b03811660009081526002602081815260408084208151606081018352815481526001808301549482019490945293015460ff16151590830181905214610e555750600092915050565b6000610e608461056a565b8251909150811115610e76575060009392505050565b60008260200151610e856111dd565b604051632417695160e11b81526001600160a01b0388811660048301527f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371169063482ed2a290602401602060405180830381865afa158015610eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f919061146b565b610f19919061149a565b610f2490606461149a565b610f2e91906114b1565b60035460405162b5b06160e31b81526001600160a01b03888116600483015292935060009284917f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371909116906305ad830890602401602060405180830381865afa158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc4919061146b565b610fce91906114d3565b610fd891906114e6565b604051636eb1769f60e11b81526001600160a01b03888116600483015230602483015291925082917f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371169063dd62ed3e90604401602060405180830381865afa158015611049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d919061146b565b108061110457506040516370a0823160e01b81526001600160a01b03878116600483015282917f00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371909116906370a0823190602401602060405180830381865afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611102919061146b565b105b156111155750600095945050505050565b50600195945050505050565b336000908152600260208190526040909120015460ff1615156001146111995760405162461bcd60e51b815260206004820152602760248201527f546865206175746f6d617469632072657061796d656e74206973206e6f7420656044820152663730b13632b21760c91b60648201526084016102af565b336000818152600260208190526040808320909101805460ff19169055517f2dd72a99526e0cc438b10f1be4d92aa5a8537cf7fdd5dbed3dbb1a791a1fd6109190a2565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611257919061153a565b505050915050600081136112c85760405162461bcd60e51b815260206004820152603260248201527f54686520436861696e4c696e6b2072657475726e2076616c7565206d7573742060448201527131329033b932b0ba32b9103a3430b710181760711b60648201526084016102af565b6112d7816402540be40061158a565b91505090565b6112e5611356565b6001600160a01b03811661134a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102af565b611353816113b0565b50565b6000546001600160a01b03163314610e035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102af565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561141357600080fd5b50508035926020909101359150565b60006020828403121561143457600080fd5b81356001600160a01b038116811461144b57600080fd5b9392505050565b60006020828403121561146457600080fd5b5035919050565b60006020828403121561147d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761074a5761074a611484565b6000826114ce57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561074a5761074a611484565b8082018082111561074a5761074a611484565b60006020828403121561150b57600080fd5b8151801515811461144b57600080fd5b805169ffffffffffffffffffff8116811461153557600080fd5b919050565b600080600080600060a0868803121561155257600080fd5b61155b8661151b565b945060208601519350604086015192506060860151915061157e6080870161151b565b90509295509295909350565b80820260008212600160ff1b841416156115a6576115a6611484565b818105831482151761074a5761074a61148456fea26469706673582212203b1913aabac704c058dbe30f513ad8bca48604581c9e2346b2c8bae6cba6bc1464736f6c63430008110033

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

00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371

-----Decoded View---------------
Arg [0] : _lybra (address): 0x97de57eC338AB5d51557DA3434828C5DbFaDA371

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000097de57ec338ab5d51557da3434828c5dbfada371


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.