FRAX Price: $1.04 (+7.69%)

Contract

0x5eFcE1D6C8A71870Ee5b6850CaAe64405bA509C6

Overview

FRAX Balance | FXTL Balance

0 FRAX | 93,301 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Token Transfers found.

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VariableInterestRate

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 10000 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: ISC
pragma solidity 0.8.23;

// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// ====================== VariableInterestRate ========================
// ====================================================================

import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { IVariableInterestRate } from "./interfaces/IVariableInterestRate.sol";

/// @title A formula for calculating interest rates as a function of utilization and time
/// @author Frax Finance (https://github.com/FraxFinance)
/// @notice A Contract for calculating interest rates as a function of utilization and time
contract VariableInterestRate is IVariableInterestRate {
    using Strings for uint256;

    /// @notice The name suffix for the interest rate calculator
    string public suffix;

    // Utilization Settings
    /// @notice The minimum utilization wherein no adjustment to full utilization and vertex rates occurs
    uint256 public immutable MIN_TARGET_UTIL;
    /// @notice The maximum utilization wherein no adjustment to full utilization and vertex rates occurs
    uint256 public immutable MAX_TARGET_UTIL;
    /// @notice The utilization at which the slope increases
    uint256 public immutable VERTEX_UTILIZATION;
    /// @notice The second utilization at which the slope increases
    uint256 public immutable VERTEX_2_UTILIZATION;
    /// @notice precision of utilization calculations
    uint256 public constant UTIL_PREC = 1e5; // 5 decimals

    // Interest Rate Settings (all rates are per second), 365.24 days per year
    /// @notice The minimum interest rate (per second) when utilization is 100%
    uint256 public immutable MIN_FULL_UTIL_RATE; // 18 decimals
    /// @notice The maximum interest rate (per second) when utilization is 100%
    uint256 public immutable MAX_FULL_UTIL_RATE; // 18 decimals
    /// @notice The interest rate (per second) when utilization is 0%
    uint256 public immutable ZERO_UTIL_RATE; // 18 decimals
    /// @notice The interest rate half life in seconds, determines rate of adjustments to rate curve
    uint256 public immutable RATE_HALF_LIFE; // 1 decimals
    /// @notice The percent of the delta between max and min at the first kink
    uint256 public immutable VERTEX_RATE_PERCENT; // 18 decimals
    /// @notice The percent of the delta between max and min at the second kink
    uint256 public immutable VERTEX_2_RATE_PERCENT; // 18 decimals
    /// @notice The precision of interest rate calculations
    uint256 public constant RATE_PREC = 1e18; // 18 decimals

    error MaxUtilizationTooLow();
    error MaxFullUtilizationTooLow();
    error DivideByZero();
    error VertexUtilizationTooHigh();
    error UtilizationRateTooHigh();
    error Vertex2UtilizationTooLow();

    /// @param _params Abi Encoding of the following schema:
    /// param _suffix The suffix of the contract name
    /// param _vertexUtilization The utilization at which the slope increases
    /// param _vertex2Utilization The utilization at which the slope increases
    /// param _vertexRatePercentOfDelta The percent of the delta between max and min, defines vertex rate
    /// param _vertex2RatePercentOfDelta The percent of delta between the
    /// param _minUtil The minimum utilization wherein no adjustment to full utilization and vertex rates occurs
    /// param _maxUtil The maximum utilization wherein no adjustment to full utilization and vertex rates occurs
    /// param _zeroUtilizationRate The interest rate (per second) when utilization is 0%
    /// param _minFullUtilizationRate The minimum interest rate at 100% utilization
    /// param _maxFullUtilizationRate The maximum interest rate at 100% utilization
    /// param _rateHalfLife The half life parameter for interest rate adjustments
    constructor(bytes memory _params) {
        (
            suffix,
            VERTEX_UTILIZATION,
            VERTEX_2_UTILIZATION,
            VERTEX_RATE_PERCENT,
            VERTEX_2_RATE_PERCENT,
            MIN_TARGET_UTIL,
            MAX_TARGET_UTIL,
            ZERO_UTIL_RATE,
            MIN_FULL_UTIL_RATE,
            MAX_FULL_UTIL_RATE,
            RATE_HALF_LIFE
        ) = abi.decode(
            _params,
            (string, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256)
        );
        if (MAX_TARGET_UTIL <= MIN_TARGET_UTIL) {
            revert MaxUtilizationTooLow();
        }
        if (MAX_FULL_UTIL_RATE <= MIN_FULL_UTIL_RATE) {
            revert MaxFullUtilizationTooLow();
        }

        if (VERTEX_UTILIZATION > UTIL_PREC) {
            revert VertexUtilizationTooHigh();
        }

        if (VERTEX_2_UTILIZATION > UTIL_PREC) {
            revert VertexUtilizationTooHigh();
        }

        if (VERTEX_2_UTILIZATION <= VERTEX_UTILIZATION) {
            revert Vertex2UtilizationTooLow();
        }

        if (
            MAX_TARGET_UTIL == 0 ||
            RATE_HALF_LIFE == 0 ||
            VERTEX_UTILIZATION == 0 ||
            VERTEX_UTILIZATION == UTIL_PREC ||
            VERTEX_2_UTILIZATION == 0 ||
            VERTEX_2_UTILIZATION == UTIL_PREC ||
            MAX_TARGET_UTIL == UTIL_PREC
        ) {
            revert DivideByZero();
        }

        if (MAX_TARGET_UTIL > UTIL_PREC || MAX_FULL_UTIL_RATE > RATE_PREC) {
            revert UtilizationRateTooHigh();
        }
    }

    /// @notice The ```name``` function returns the name of the rate contract
    /// @return memory name of contract
    function name() external view returns (string memory) {
        return string.concat("Variable Rate V3 ", suffix);
    }

    /// @notice The ```version``` function returns the semantic version of the rate contract
    /// @dev Follows semantic versioning
    /// @return _major Major version
    /// @return _minor Minor version
    /// @return _patch Patch version
    function version() external pure returns (uint256 _major, uint256 _minor, uint256 _patch) {
        _major = 3;
        _minor = 0;
        _patch = 1;
    }

    /// @notice The ```getFullUtilizationInterest``` function calculate the new maximum interest rate, i.e. rate when utilization is 100%
    /// @dev Given in interest per second
    /// @param _deltaTime The elapsed time since last update given in seconds
    /// @param _utilization The utilization %, given with 5 decimals of precision
    /// @param _fullUtilizationInterest The interest value when utilization is 100%, given with 18 decimals of precision
    /// @return _newFullUtilizationInterest The new maximum interest rate
    function getFullUtilizationInterest(
        uint256 _deltaTime,
        uint256 _utilization,
        uint64 _fullUtilizationInterest
    ) internal view returns (uint64 _newFullUtilizationInterest) {
        if (_utilization < MIN_TARGET_UTIL) {
            // 18 decimals
            uint256 _deltaUtilization = ((MIN_TARGET_UTIL - _utilization) * 1e18) / MIN_TARGET_UTIL;
            // 36 decimals
            uint256 _decayGrowth = (RATE_HALF_LIFE * 1e36) + (_deltaUtilization * _deltaUtilization * _deltaTime);
            // 18 decimals
            _newFullUtilizationInterest = uint64((_fullUtilizationInterest * (RATE_HALF_LIFE * 1e36)) / _decayGrowth);
        } else if (_utilization > MAX_TARGET_UTIL) {
            // 18 decimals
            uint256 _deltaUtilization = ((_utilization - MAX_TARGET_UTIL) * 1e18) / (UTIL_PREC - MAX_TARGET_UTIL);
            // 36 decimals
            uint256 _decayGrowth = (RATE_HALF_LIFE * 1e36) + (_deltaUtilization * _deltaUtilization * _deltaTime);
            // 18 decimals
            _newFullUtilizationInterest = uint64((_fullUtilizationInterest * _decayGrowth) / (RATE_HALF_LIFE * 1e36));
        } else {
            _newFullUtilizationInterest = _fullUtilizationInterest;
        }
        if (_newFullUtilizationInterest > MAX_FULL_UTIL_RATE) {
            _newFullUtilizationInterest = uint64(MAX_FULL_UTIL_RATE);
        } else if (_newFullUtilizationInterest < MIN_FULL_UTIL_RATE) {
            _newFullUtilizationInterest = uint64(MIN_FULL_UTIL_RATE);
        }
    }

    /// @notice The ```getNewRate``` function calculates interest rates using two linear functions f(utilization)
    /// @param _deltaTime The elapsed time since last update, given in seconds
    /// @param _utilization The utilization %, given with 5 decimals of precision
    /// @param _oldFullUtilizationInterest The interest value when utilization is 100%, given with 18 decimals of precision
    /// @return _newRatePerSec The new interest rate, 18 decimals of precision
    /// @return _newFullUtilizationInterest The new max interest rate, 18 decimals of precision
    function getNewRate(
        uint256 _deltaTime,
        uint256 _utilization,
        uint64 _oldFullUtilizationInterest
    ) external view returns (uint64 _newRatePerSec, uint64 _newFullUtilizationInterest) {
        _newFullUtilizationInterest = getFullUtilizationInterest(_deltaTime, _utilization, _oldFullUtilizationInterest);

        // _vertexInterest is calculated as the percentage of the delta between min and max interest
        uint256 _vertexInterest = (((_newFullUtilizationInterest - ZERO_UTIL_RATE) * VERTEX_RATE_PERCENT) / RATE_PREC) +
            ZERO_UTIL_RATE;
        uint256 _vertex2Interest = (((_newFullUtilizationInterest - ZERO_UTIL_RATE) * VERTEX_2_RATE_PERCENT) /
            RATE_PREC) + ZERO_UTIL_RATE;
        if (_utilization < VERTEX_UTILIZATION) {
            // For readability, the following formula is equivalent to:
            // uint256 _slope = ((_vertexInterest - ZERO_UTIL_RATE) * UTIL_PREC) / VERTEX_UTILIZATION;
            // _newRatePerSec = uint64(ZERO_UTIL_RATE + ((_utilization * _slope) / UTIL_PREC));
            _newRatePerSec = uint64(
                ZERO_UTIL_RATE + (_utilization * (_vertexInterest - ZERO_UTIL_RATE)) / VERTEX_UTILIZATION
            );
        } else if (_utilization < VERTEX_2_UTILIZATION) {
            // For readability, the following formula is equivalent to:
            // uint256 _slope = (((_vertex2Interest - _vertexInterest) * UTIL_PREC) / (VERTEX_2_UTILIZATION - VERTEX_UTILIZATION));
            // _newRatePerSec = uint64(_vertexInterest + (((_utilization - VERTEX_UTILIZATION) * _slope) / UTIL_PREC));
            _newRatePerSec = uint64(
                _vertexInterest +
                    ((_utilization - VERTEX_UTILIZATION) * ((_vertex2Interest - _vertexInterest))) /
                    ((VERTEX_2_UTILIZATION - VERTEX_UTILIZATION))
            );
        } else {
            // For readability, the following formula is equivalent to:
            // uint256 _slope = (((_newFullUtilizationInterest - _vertex2Interest) * UTIL_PREC) / (UTIL_PREC - VERTEX_2_UTILIZATION));
            // _newRatePerSec = uint64(_vertex2Interest + (((_utilization - VERTEX_2_UTILIZATION) * _slope) / UTIL_PREC))
            _newRatePerSec = uint64(
                _vertex2Interest +
                    ((_utilization - VERTEX_2_UTILIZATION) * (_newFullUtilizationInterest - _vertex2Interest)) /
                    ((UTIL_PREC - VERTEX_2_UTILIZATION))
            );
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

// SPDX-License-Identifier: ISC
pragma solidity ^0.8.0;

interface IVariableInterestRate {
    function MAX_FULL_UTIL_RATE() external view returns (uint256);

    function MAX_TARGET_UTIL() external view returns (uint256);

    function MIN_FULL_UTIL_RATE() external view returns (uint256);

    function MIN_TARGET_UTIL() external view returns (uint256);

    function RATE_HALF_LIFE() external view returns (uint256);

    function RATE_PREC() external view returns (uint256);

    function UTIL_PREC() external view returns (uint256);

    function VERTEX_RATE_PERCENT() external view returns (uint256);

    function VERTEX_UTILIZATION() external view returns (uint256);

    function ZERO_UTIL_RATE() external view returns (uint256);

    function getNewRate(
        uint256 _deltaTime,
        uint256 _utilization,
        uint64 _oldFullUtilizationInterest
    ) external view returns (uint64 _newRatePerSec, uint64 _newFullUtilizationInterest);

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

    function version() external view returns (uint256 _major, uint256 _minor, uint256 _patch);

    function suffix() external view returns (string memory);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

Settings
{
  "remappings": [
    "frax-std/=node_modules/frax-standard-solidity/src/",
    "@prb/test/=node_modules/@prb/test/",
    "forge-std/=node_modules/forge-std/src/",
    "ds-test/=node_modules/ds-test/src/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@uniswap/=node_modules/@uniswap/",
    "dev-fraxswap/=node_modules/dev-fraxswap/",
    "frax-standard-solidity/=node_modules/frax-standard-solidity/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/",
    "solmate/=node_modules/solmate/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"bytes","name":"_params","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DivideByZero","type":"error"},{"inputs":[],"name":"MaxFullUtilizationTooLow","type":"error"},{"inputs":[],"name":"MaxUtilizationTooLow","type":"error"},{"inputs":[],"name":"UtilizationRateTooHigh","type":"error"},{"inputs":[],"name":"Vertex2UtilizationTooLow","type":"error"},{"inputs":[],"name":"VertexUtilizationTooHigh","type":"error"},{"inputs":[],"name":"MAX_FULL_UTIL_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TARGET_UTIL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FULL_UTIL_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TARGET_UTIL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_HALF_LIFE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_PREC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UTIL_PREC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERTEX_2_RATE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERTEX_2_UTILIZATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERTEX_RATE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERTEX_UTILIZATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_UTIL_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deltaTime","type":"uint256"},{"internalType":"uint256","name":"_utilization","type":"uint256"},{"internalType":"uint64","name":"_oldFullUtilizationInterest","type":"uint64"}],"name":"getNewRate","outputs":[{"internalType":"uint64","name":"_newRatePerSec","type":"uint64"},{"internalType":"uint64","name":"_newFullUtilizationInterest","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"suffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"_major","type":"uint256"},{"internalType":"uint256","name":"_minor","type":"uint256"},{"internalType":"uint256","name":"_patch","type":"uint256"}],"stateMutability":"pure","type":"function"}]

6101c060405234801562000011575f80fd5b506040516200130f3803806200130f8339810160408190526200003491620002c0565b808060200190518101906200004a919062000311565b61016081905261012082905261010083905261014084905260a085905260808690526101a087905261018088905260e089905260c08a90525f6200008f8c826200044b565b50505050505050505050505060805160a05111620000c0576040516356a3535960e11b815260040160405180910390fd5b610100516101205111620000e757604051631c3c204560e11b815260040160405180910390fd5b620186a060c05111156200010e57604051631173807760e31b815260040160405180910390fd5b620186a060e05111156200013557604051631173807760e31b815260040160405180910390fd5b60c05160e051116200015a5760405163d7580bc560e01b815260040160405180910390fd5b60a05115806200016b575061016051155b8062000177575060c051155b80620001875750620186a060c051145b8062000193575060e051155b80620001a35750620186a060e051145b80620001b35750620186a060a051145b15620001d2576040516301de42a960e41b815260040160405180910390fd5b620186a060a0511180620001f05750670de0b6b3a764000061012051115b156200020f576040516369fb55ab60e11b815260040160405180910390fd5b5062000517565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b038084111562000246576200024662000216565b604051601f8501601f19908116603f0116810190828211818310171562000271576200027162000216565b816040528093508581528686860111156200028a575f80fd5b5f92505b85831015620002ae5782850151602084830101526020830192506200028e565b5f602087830101525050509392505050565b5f60208284031215620002d1575f80fd5b81516001600160401b03811115620002e7575f80fd5b8201601f81018413620002f8575f80fd5b62000309848251602084016200022a565b949350505050565b5f805f805f805f805f805f6101608c8e0312156200032d575f80fd5b8b516001600160401b0381111562000343575f80fd5b8c01601f81018e1362000354575f80fd5b620003658e8251602084016200022a565b9b505060208c0151995060408c0151985060608c0151975060808c0151965060a08c0151955060c08c0151945060e08c015193506101008c015192506101208c015191506101408c015190509295989b509295989b9093969950565b600181811c90821680620003d657607f821691505b602082108103620003f557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200044657805f5260205f20601f840160051c81016020851015620004225750805b601f840160051c820191505b8181101562000443575f81556001016200042e565b50505b505050565b81516001600160401b0381111562000467576200046762000216565b6200047f81620004788454620003c1565b84620003fb565b602080601f831160018114620004b5575f84156200049d5750858301515b5f19600386901b1c1916600185901b1785556200050f565b5f85815260208120601f198616915b82811015620004e557888601518255948401946001909101908401620004c4565b50858210156200050357878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051610ccb620006445f395f81816101e6015261040301525f818161024d015261038301525f818161015201528181610781015281816107c7015281816108db015261092001525f818161021701528181610359015281816103d9015281816104a401526104e301525f81816101030152818161096d01526109a001525f8181610179015281816109c601526109f901525f81816102f6015281816105100152818161055c015281816105d7015261061801525f818161029b01528181610458015281816104800152818161053b015261058f01525f81816101a00152818161082401528181610850015261087d01525f8181610274015281816106f6015261071f0152610ccb5ff3fe608060405234801561000f575f80fd5b50600436106100fa575f3560e01c80638e75618c11610093578063c416812511610063578063c416812514610296578063cd3181d5146102bd578063eb07ae1d146102f1578063f7073c3a14610318575f80fd5b80638e75618c1461021257806391474c491461023957806395da99fc146102485780639c0732701461026f575f80fd5b806340797eda116100ce57806340797eda1461019b57806354fd4d50146101c2578063697e3ae7146101e15780636cd3cc7714610208575f80fd5b80624c98af146100fe57806306fdde031461013857806317784ca41461014d57806331bf879d14610174575b5f80fd5b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b610140610320565b60405161012f9190610a20565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b60408051600381525f602082015260019181019190915260600161012f565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b610125620186a081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b610125670de0b6b3a764000081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b6102d06102cb366004610a8a565b610347565b6040805167ffffffffffffffff93841681529290911660208301520161012f565b6101257f000000000000000000000000000000000000000000000000000000000000000081565b610140610668565b60605f6040516020016103339190610b1d565b604051602081830303815290604052905090565b5f806103548585856106f3565b90505f7f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006103b68367ffffffffffffffff8716610c50565b6103c09190610c69565b6103ca9190610c80565b6103d49190610cb8565b90505f7f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006104368367ffffffffffffffff8816610c50565b6104409190610c69565b61044a9190610c80565b6104549190610cb8565b90507f000000000000000000000000000000000000000000000000000000000000000086101561050e577f00000000000000000000000000000000000000000000000000000000000000006104c97f000000000000000000000000000000000000000000000000000000000000000084610c50565b6104d39088610c69565b6104dd9190610c80565b610507907f0000000000000000000000000000000000000000000000000000000000000000610cb8565b935061065e565b7f00000000000000000000000000000000000000000000000000000000000000008610156105d2576105807f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610c50565b61058a8383610c50565b6105b47f000000000000000000000000000000000000000000000000000000000000000089610c50565b6105be9190610c69565b6105c89190610c80565b6105079083610cb8565b6105ff7f0000000000000000000000000000000000000000000000000000000000000000620186a0610c50565b6106138267ffffffffffffffff8616610c50565b61063d7f000000000000000000000000000000000000000000000000000000000000000089610c50565b6106479190610c69565b6106519190610c80565b61065b9082610cb8565b93505b5050935093915050565b5f805461067490610acc565b80601f01602080910402602001604051908101604052809291908181526020018280546106a090610acc565b80156106eb5780601f106106c2576101008083540402835291602001916106eb565b820191905f5260205f20905b8154815290600101906020018083116106ce57829003601f168201915b505050505081565b5f7f0000000000000000000000000000000000000000000000000000000000000000831015610822575f7f00000000000000000000000000000000000000000000000000000000000000006107488582610c50565b61075a90670de0b6b3a7640000610c69565b6107649190610c80565b90505f856107728380610c69565b61077c9190610c69565b6107b57f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c69565b6107bf9190610cb8565b9050806107fb7f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c69565b61080f9067ffffffffffffffff8716610c69565b6108199190610c80565b9250505061096b565b7f0000000000000000000000000000000000000000000000000000000000000000831115610968575f6108787f0000000000000000000000000000000000000000000000000000000000000000620186a0610c50565b6108a27f000000000000000000000000000000000000000000000000000000000000000086610c50565b6108b490670de0b6b3a7640000610c69565b6108be9190610c80565b90505f856108cc8380610c69565b6108d69190610c69565b61090f7f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c69565b6109199190610cb8565b90506109547f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c69565b61080f8267ffffffffffffffff8716610c69565b50805b7f00000000000000000000000000000000000000000000000000000000000000008167ffffffffffffffff1611156109c457507f0000000000000000000000000000000000000000000000000000000000000000610a19565b7f00000000000000000000000000000000000000000000000000000000000000008167ffffffffffffffff161015610a1957507f00000000000000000000000000000000000000000000000000000000000000005b9392505050565b5f602080835283518060208501525f5b81811015610a4c57858101830151858201604001528201610a30565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b5f805f60608486031215610a9c575f80fd5b8335925060208401359150604084013567ffffffffffffffff81168114610ac1575f80fd5b809150509250925092565b600181811c90821680610ae057607f821691505b602082108103610b17577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f5661726961626c6520526174652056332000000000000000000000000000000081525f60115f84545f60018260011c91506001831680610b5f57607f831692505b60208084108203610b97577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b818015610bab5760018114610be457610c14565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861660118b0152601185151586028b01019650610c14565b5f8b8152602090205f5b86811015610c095781548c82018b0152908501908301610bee565b50506011858b010196505b50949998505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610c6357610c63610c23565b92915050565b8082028115828204841417610c6357610c63610c23565b5f82610cb3577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b80820180821115610c6357610c63610c2356000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000001e2ee81000000000000000000000000000000000000000000000000000000005e52953c00000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e30352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100fa575f3560e01c80638e75618c11610093578063c416812511610063578063c416812514610296578063cd3181d5146102bd578063eb07ae1d146102f1578063f7073c3a14610318575f80fd5b80638e75618c1461021257806391474c491461023957806395da99fc146102485780639c0732701461026f575f80fd5b806340797eda116100ce57806340797eda1461019b57806354fd4d50146101c2578063697e3ae7146101e15780636cd3cc7714610208575f80fd5b80624c98af146100fe57806306fdde031461013857806317784ca41461014d57806331bf879d14610174575b5f80fd5b6101257f00000000000000000000000000000000000000000000000000000035cb191c3881565b6040519081526020015b60405180910390f35b610140610320565b60405161012f9190610a20565b6101257f000000000000000000000000000000000000000000000000000000000002a30081565b6101257f000000000000000000000000000000000000000000000000000000005e52953c81565b6101257f000000000000000000000000000000000000000000000000000000000001424481565b60408051600381525f602082015260019181019190915260600161012f565b6101257f0000000000000000000000000000000000000000000000000429d069189e000081565b610125620186a081565b6101257f0000000000000000000000000000000000000000000000000000000001e2ee8181565b610125670de0b6b3a764000081565b6101257f00000000000000000000000000000000000000000000000002c68af0bb14000081565b6101257f0000000000000000000000000000000000000000000000000000000000011b3481565b6101257f000000000000000000000000000000000000000000000000000000000001388081565b6102d06102cb366004610a8a565b610347565b6040805167ffffffffffffffff93841681529290911660208301520161012f565b6101257f0000000000000000000000000000000000000000000000000000000000015f9081565b610140610668565b60605f6040516020016103339190610b1d565b604051602081830303815290604052905090565b5f806103548585856106f3565b90505f7f0000000000000000000000000000000000000000000000000000000001e2ee81670de0b6b3a76400007f00000000000000000000000000000000000000000000000002c68af0bb1400006103b68367ffffffffffffffff8716610c50565b6103c09190610c69565b6103ca9190610c80565b6103d49190610cb8565b90505f7f0000000000000000000000000000000000000000000000000000000001e2ee81670de0b6b3a76400007f0000000000000000000000000000000000000000000000000429d069189e00006104368367ffffffffffffffff8816610c50565b6104409190610c69565b61044a9190610c80565b6104549190610cb8565b90507f000000000000000000000000000000000000000000000000000000000001388086101561050e577f00000000000000000000000000000000000000000000000000000000000138806104c97f0000000000000000000000000000000000000000000000000000000001e2ee8184610c50565b6104d39088610c69565b6104dd9190610c80565b610507907f0000000000000000000000000000000000000000000000000000000001e2ee81610cb8565b935061065e565b7f0000000000000000000000000000000000000000000000000000000000015f908610156105d2576105807f00000000000000000000000000000000000000000000000000000000000138807f0000000000000000000000000000000000000000000000000000000000015f90610c50565b61058a8383610c50565b6105b47f000000000000000000000000000000000000000000000000000000000001388089610c50565b6105be9190610c69565b6105c89190610c80565b6105079083610cb8565b6105ff7f0000000000000000000000000000000000000000000000000000000000015f90620186a0610c50565b6106138267ffffffffffffffff8616610c50565b61063d7f0000000000000000000000000000000000000000000000000000000000015f9089610c50565b6106479190610c69565b6106519190610c80565b61065b9082610cb8565b93505b5050935093915050565b5f805461067490610acc565b80601f01602080910402602001604051908101604052809291908181526020018280546106a090610acc565b80156106eb5780601f106106c2576101008083540402835291602001916106eb565b820191905f5260205f20905b8154815290600101906020018083116106ce57829003601f168201915b505050505081565b5f7f0000000000000000000000000000000000000000000000000000000000011b34831015610822575f7f0000000000000000000000000000000000000000000000000000000000011b346107488582610c50565b61075a90670de0b6b3a7640000610c69565b6107649190610c80565b90505f856107728380610c69565b61077c9190610c69565b6107b57f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c69565b6107bf9190610cb8565b9050806107fb7f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c69565b61080f9067ffffffffffffffff8716610c69565b6108199190610c80565b9250505061096b565b7f0000000000000000000000000000000000000000000000000000000000014244831115610968575f6108787f0000000000000000000000000000000000000000000000000000000000014244620186a0610c50565b6108a27f000000000000000000000000000000000000000000000000000000000001424486610c50565b6108b490670de0b6b3a7640000610c69565b6108be9190610c80565b90505f856108cc8380610c69565b6108d69190610c69565b61090f7f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c69565b6109199190610cb8565b90506109547f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c69565b61080f8267ffffffffffffffff8716610c69565b50805b7f00000000000000000000000000000000000000000000000000000035cb191c388167ffffffffffffffff1611156109c457507f00000000000000000000000000000000000000000000000000000035cb191c38610a19565b7f000000000000000000000000000000000000000000000000000000005e52953c8167ffffffffffffffff161015610a1957507f000000000000000000000000000000000000000000000000000000005e52953c5b9392505050565b5f602080835283518060208501525f5b81811015610a4c57858101830151858201604001528201610a30565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b5f805f60608486031215610a9c575f80fd5b8335925060208401359150604084013567ffffffffffffffff81168114610ac1575f80fd5b809150509250925092565b600181811c90821680610ae057607f821691505b602082108103610b17577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f5661726961626c6520526174652056332000000000000000000000000000000081525f60115f84545f60018260011c91506001831680610b5f57607f831692505b60208084108203610b97577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b818015610bab5760018114610be457610c14565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861660118b0152601185151586028b01019650610c14565b5f8b8152602090205f5b86811015610c095781548c82018b0152908501908301610bee565b50506011858b010196505b50949998505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610c6357610c63610c23565b92915050565b8082028115828204841417610c6357610c63610c23565b5f82610cb3577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b80820180821115610c6357610c63610c2356

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

000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000001e2ee81000000000000000000000000000000000000000000000000000000005e52953c00000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e30352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _params (bytes): 0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000001e2ee81000000000000000000000000000000000000000000000000000000005e52953c00000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e30352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 0000000000000000000000000000000000000000000000000000000000013880
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015f90
Arg [5] : 00000000000000000000000000000000000000000000000002c68af0bb140000
Arg [6] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000011b34
Arg [8] : 0000000000000000000000000000000000000000000000000000000000014244
Arg [9] : 0000000000000000000000000000000000000000000000000000000001e2ee81
Arg [10] : 000000000000000000000000000000000000000000000000000000005e52953c
Arg [11] : 00000000000000000000000000000000000000000000000000000035cb191c38
Arg [12] : 000000000000000000000000000000000000000000000000000000000002a300
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [14] : 42616d6d205b2e30352d372e33305d2032206461797320282e3732352d2e3832
Arg [15] : 3529000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.