ETH Price: $3,479.72 (-0.20%)
Gas: 4 Gwei

Contract

0x1F081b4B351E7bd2BfB5b097742127c9314cdf24
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x61018060189638352024-01-08 17:40:35195 days ago1704735635IN
 Create: VariableInterestRate
0 ETH0.0167043524.94955647

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VariableInterestRate

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 1660 runs

Other Settings:
paris EvmVersion, GNU AGPLv3 license
File 1 of 5 : VariableInterestRate.sol
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.21;

// ====================== VariableInterestRate ========================

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

/// @title A formula for calculating interest rates as a function of utilization and time
/// @author Drake Evans github.com/drakeevans
/// @notice A Contract for calculating interest rates as a function of utilization and time
contract VariableInterestRate is IRateCalculatorV2 {
    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 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
    uint256 public immutable VERTEX_RATE_PERCENT; // 18 decimals
    /// @notice The precision of interest rate calculations
    uint256 public constant RATE_PREC = 1e18; // 18 decimals

    /// @notice The ```constructor``` function
    /// @param _suffix The suffix of the contract name
    /// @param _vertexUtilization The utilization at which the slope increases
    /// @param _vertexRatePercentOfDelta The percent of the delta between max and min, defines vertex rate
    /// @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(
        string memory _suffix,
        uint256 _vertexUtilization,
        uint256 _vertexRatePercentOfDelta,
        uint256 _minUtil,
        uint256 _maxUtil,
        uint256 _zeroUtilizationRate,
        uint256 _minFullUtilizationRate,
        uint256 _maxFullUtilizationRate,
        uint256 _rateHalfLife
    ) {
        suffix = _suffix;
        MIN_TARGET_UTIL = _minUtil;
        MAX_TARGET_UTIL = _maxUtil;
        VERTEX_UTILIZATION = _vertexUtilization;
        ZERO_UTIL_RATE = _zeroUtilizationRate;
        MIN_FULL_UTIL_RATE = _minFullUtilizationRate;
        MAX_FULL_UTIL_RATE = _maxFullUtilizationRate;
        RATE_HALF_LIFE = _rateHalfLife;
        VERTEX_RATE_PERCENT = _vertexRatePercentOfDelta;
    }

    /// @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(abi.encodePacked("Variable Rate V2 ", 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 = 2;
        _minor = 0;
        _patch = 0;
    }

    /// @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;
        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));

            // 18 decimals
            _newRatePerSec = uint64(
                ZERO_UTIL_RATE + (_utilization * (_vertexInterest - ZERO_UTIL_RATE)) / VERTEX_UTILIZATION
            );
        } else {
            // For readability, the following formula is equivalent to:
            // uint256 _slope = (((_newFullUtilizationInterest - _vertexInterest) * UTIL_PREC) / (UTIL_PREC - VERTEX_UTILIZATION));
            // _newRatePerSec = uint64(_vertexInterest + (((_utilization - VERTEX_UTILIZATION) * _slope) / UTIL_PREC));

            // 18 decimals
            _newRatePerSec = uint64(
                _vertexInterest +
                    ((_utilization - VERTEX_UTILIZATION) * (_newFullUtilizationInterest - _vertexInterest)) /
                    (UTIL_PREC - VERTEX_UTILIZATION)
            );
        }
    }
}

File 2 of 5 : IRateCalculatorV2.sol
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.21;

interface IRateCalculatorV2 {
    function name() external view returns (string memory);

    function version() external view returns (uint256, uint256, uint256);

    function getNewRate(
        uint256 _deltaTime,
        uint256 _utilization,
        uint64 _maxInterest
    ) external view returns (uint64 _newRatePerSec, uint64 _newMaxInterest);
}

File 3 of 5 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

    /**
     * @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), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(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) {
        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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        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 keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 4 of 5 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @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);
        }
    }
}

File 5 of 5 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (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; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                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.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            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 (rounding == Rounding.Up && 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 down.
     *
     * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 1660
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_suffix","type":"string"},{"internalType":"uint256","name":"_vertexUtilization","type":"uint256"},{"internalType":"uint256","name":"_vertexRatePercentOfDelta","type":"uint256"},{"internalType":"uint256","name":"_minUtil","type":"uint256"},{"internalType":"uint256","name":"_maxUtil","type":"uint256"},{"internalType":"uint256","name":"_zeroUtilizationRate","type":"uint256"},{"internalType":"uint256","name":"_minFullUtilizationRate","type":"uint256"},{"internalType":"uint256","name":"_maxFullUtilizationRate","type":"uint256"},{"internalType":"uint256","name":"_rateHalfLife","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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_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"}]

61018060405234620002e85762000cdb803803806200001e81620002ed565b9283398101610120908183820312620002e85782516001600160401b039190828111620002e857840191601f90828285011215620002e857835190808211620002bd57602091601f19956200007984888785011601620002ed565b95828752848383010111620002e857839060005b838110620002d35750506000918601015281870151604088015195606089015160808a01519160a08b01519460c08c01519660e08d015198610100809e01519a8051938411620002bd57600054926001938481811c91168015620002b2575b828210146200029c5783811162000251575b5080928511600114620001e7575083945090839291600094620001db575b50501b916000199060031b1c1916176000555b60805260a05260c052855260e0528452610140908152610160918252604051926109c794856200031486396080518581816101cf015261058a015260a05185818161044d01526106a3015260c051858181610341015261054f015260e0518581816103fe01526106de0152518481816102a201526108500152518381816102d50152610623015251828181610238015281816104c8015261071901525181818161031301526105c50152f35b0151925038806200011c565b9294849081166000805284600020946000905b888383106200023657505050106200021c575b505050811b016000556200012f565b015160001960f88460031b161c191690553880806200020d565b858701518855909601959485019487935090810190620001fa565b60008052816000208480880160051c82019284891062000292575b0160051c019085905b82811062000285575050620000fe565b6000815501859062000275565b925081926200026c565b634e487b7160e01b600052602260045260246000fd5b90607f1690620000ec565b634e487b7160e01b600052604160045260246000fd5b8181018301518882018401528592016200008d565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017620002bd5760405256fe608060408181526004918236101561001657600080fd5b600092833560e01c9182624c98af146108395750816306fdde031461073c57816317784ca41461070157816331bf879d146106c657816340797eda1461068b57816354fd4d50146106645781636cd3cc77146106465781638e75618c1461060b57816391474c49146105e857816395da99fc146105ad5781639c07327014610572578163c416812514610537578163cd3181d514610199575063f7073c3a146100be57600080fd5b346101955781600319360112610195578051908280546100dd816108bc565b908185526020926001918281169081600014610173575060011461011b575b610117868661010d828b03836108f6565b5191829182610873565b0390f35b8080949750527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061016057505050826101179461010d9282010194386100fc565b8054868501880152928601928101610143565b60ff191687860152505050151560051b830101925061010d82610117386100fc565b5080fd5b8391503461019557606036600319011261019557803591602490813560443567ffffffffffffffff9586821691828103610533577f000000000000000000000000000000000000000000000000000000000000000090818510156104485750610202848261092e565b670de0b6b3a764000090818102918183041490151715610436579061022691610964565b6ec097ce7bc90715b34b9f10000000007f00000000000000000000000000000000000000000000000000000000000000008181029392918115918504141715610436578896959493610299889461029361028d87966102888761029e98610951565b610951565b82610984565b92610951565b610964565b165b7f000000000000000000000000000000000000000000000000000000000000000090828116828111156103f757505016925b847f000000000000000000000000000000000000000000000000000000000000000094169561033e85670de0b6b3a7640000610338610311838c61092e565b7f000000000000000000000000000000000000000000000000000000000000000090610951565b04610984565b917f0000000000000000000000000000000000000000000000000000000000000000948585106000146103a0575050509161029961038a9261038486610390979661092e565b90610951565b90610984565b16915b8351921682526020820152f35b92965092846103bf929596506103b59161092e565b610384878961092e565b92620186a09485039485116103e7575050509161038a6103e0928694610964565b1691610393565b601190634e487b7160e01b835252fd5b90959291507f000000000000000000000000000000000000000000000000000000000000000080911061042c575b50506102d2565b1693508489610425565b868660118a634e487b7160e01b835252fd5b9192917f00000000000000000000000000000000000000000000000000000000000000009150889082861115610524575050610484818561092e565b670de0b6b3a76400009081810291818304149015171561043657620186a091820391821161043657906104b691610964565b6ec097ce7bc90715b34b9f10000000007f00000000000000000000000000000000000000000000000000000000000000008181029492918115918604141715610436578896959493610299889461038461051887966102888761051e98610951565b84610984565b166102a0565b915095949392508591506102a0565b8480fd5b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461019557816003193601126101955760209051670de0b6b3a76400008152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50503461019557816003193601126101955760209051620186a08152f35b50503461019557816003193601126101955760609181519160028352816020840152820152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b5050346101955781600319360112610195578051906020927f5661726961626c6520526174652056322000000000000000000000000000000084840152603190809481549161078a836108bc565b9260019081811690811561081657506001146107b9575b610117878761010d828c03601f1981018452836108f6565b9080809394959850527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8483106108035750505050826101179461010d928201019438806107a1565b80548784018901529183019181016107e4565b60ff1916888701525050505080151502830101925061010d8261011738806107a1565b8490346101955781600319360112610195576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b6020808252825181830181905290939260005b8281106108a857505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610886565b90600182811c921680156108ec575b60208310146108d657565b634e487b7160e01b600052602260045260246000fd5b91607f16916108cb565b90601f8019910116810190811067ffffffffffffffff82111761091857604052565b634e487b7160e01b600052604160045260246000fd5b9190820391821161093b57565b634e487b7160e01b600052601160045260246000fd5b8181029291811591840414171561093b57565b811561096e570490565b634e487b7160e01b600052601260045260246000fd5b9190820180921161093b5756fea26469706673582212203bcfeeee956a900460de176fd5f950caa1e50da6bb36251b30149f54c414b67464736f6c6343000815003300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000098a7d9b8314c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000025c6b3a40000000000000000000000000000000000000000000000000000000025c6b3a40000000000000000000000000000000000000000000000000000000153fc50c60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002243727655534459765553445443727655534450616972496e74657265737452617465000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060408181526004918236101561001657600080fd5b600092833560e01c9182624c98af146108395750816306fdde031461073c57816317784ca41461070157816331bf879d146106c657816340797eda1461068b57816354fd4d50146106645781636cd3cc77146106465781638e75618c1461060b57816391474c49146105e857816395da99fc146105ad5781639c07327014610572578163c416812514610537578163cd3181d514610199575063f7073c3a146100be57600080fd5b346101955781600319360112610195578051908280546100dd816108bc565b908185526020926001918281169081600014610173575060011461011b575b610117868661010d828b03836108f6565b5191829182610873565b0390f35b8080949750527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061016057505050826101179461010d9282010194386100fc565b8054868501880152928601928101610143565b60ff191687860152505050151560051b830101925061010d82610117386100fc565b5080fd5b8391503461019557606036600319011261019557803591602490813560443567ffffffffffffffff9586821691828103610533577f000000000000000000000000000000000000000000000000000000000000000090818510156104485750610202848261092e565b670de0b6b3a764000090818102918183041490151715610436579061022691610964565b6ec097ce7bc90715b34b9f10000000007f00000000000000000000000000000000000000000000000000000000000000008181029392918115918504141715610436578896959493610299889461029361028d87966102888761029e98610951565b610951565b82610984565b92610951565b610964565b165b7f0000000000000000000000000000000000000000000000000000000153fc50c690828116828111156103f757505016925b847f0000000000000000000000000000000000000000000000000000000025c6b3a494169561033e85670de0b6b3a7640000610338610311838c61092e565b7f000000000000000000000000000000000000000000000000098a7d9b8314c00090610951565b04610984565b917f0000000000000000000000000000000000000000000000000000000000013880948585106000146103a0575050509161029961038a9261038486610390979661092e565b90610951565b90610984565b16915b8351921682526020820152f35b92965092846103bf929596506103b59161092e565b610384878961092e565b92620186a09485039485116103e7575050509161038a6103e0928694610964565b1691610393565b601190634e487b7160e01b835252fd5b90959291507f0000000000000000000000000000000000000000000000000000000025c6b3a480911061042c575b50506102d2565b1693508489610425565b868660118a634e487b7160e01b835252fd5b9192917f00000000000000000000000000000000000000000000000000000000000186a09150889082861115610524575050610484818561092e565b670de0b6b3a76400009081810291818304149015171561043657620186a091820391821161043657906104b691610964565b6ec097ce7bc90715b34b9f10000000007f00000000000000000000000000000000000000000000000000000000000000008181029492918115918604141715610436578896959493610299889461038461051887966102888761051e98610951565b84610984565b166102a0565b915095949392508591506102a0565b8480fd5b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000138808152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b505034610195578160031936011261019557602090517f000000000000000000000000000000000000000000000000098a7d9b8314c0008152f35b50503461019557816003193601126101955760209051670de0b6b3a76400008152f35b505034610195578160031936011261019557602090517f0000000000000000000000000000000000000000000000000000000025c6b3a48152f35b50503461019557816003193601126101955760209051620186a08152f35b50503461019557816003193601126101955760609181519160028352816020840152820152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000186a08152f35b505034610195578160031936011261019557602090517f0000000000000000000000000000000000000000000000000000000025c6b3a48152f35b505034610195578160031936011261019557602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b5050346101955781600319360112610195578051906020927f5661726961626c6520526174652056322000000000000000000000000000000084840152603190809481549161078a836108bc565b9260019081811690811561081657506001146107b9575b610117878761010d828c03601f1981018452836108f6565b9080809394959850527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8483106108035750505050826101179461010d928201019438806107a1565b80548784018901529183019181016107e4565b60ff1916888701525050505080151502830101925061010d8261011738806107a1565b8490346101955781600319360112610195576020907f0000000000000000000000000000000000000000000000000000000153fc50c68152f35b6020808252825181830181905290939260005b8281106108a857505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610886565b90600182811c921680156108ec575b60208310146108d657565b634e487b7160e01b600052602260045260246000fd5b91607f16916108cb565b90601f8019910116810190811067ffffffffffffffff82111761091857604052565b634e487b7160e01b600052604160045260246000fd5b9190820391821161093b57565b634e487b7160e01b600052601160045260246000fd5b8181029291811591840414171561093b57565b811561096e570490565b634e487b7160e01b600052601260045260246000fd5b9190820180921161093b5756fea26469706673582212203bcfeeee956a900460de176fd5f950caa1e50da6bb36251b30149f54c414b67464736f6c63430008150033

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

00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000098a7d9b8314c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000025c6b3a40000000000000000000000000000000000000000000000000000000025c6b3a40000000000000000000000000000000000000000000000000000000153fc50c60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002243727655534459765553445443727655534450616972496e74657265737452617465000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _suffix (string): CrvUSDYvUSDTCrvUSDPairInterestRate
Arg [1] : _vertexUtilization (uint256): 80000
Arg [2] : _vertexRatePercentOfDelta (uint256): 687500000000000000
Arg [3] : _minUtil (uint256): 0
Arg [4] : _maxUtil (uint256): 100000
Arg [5] : _zeroUtilizationRate (uint256): 633779108
Arg [6] : _minFullUtilizationRate (uint256): 633779108
Arg [7] : _maxFullUtilizationRate (uint256): 5704011974
Arg [8] : _rateHalfLife (uint256): 0

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000013880
Arg [2] : 000000000000000000000000000000000000000000000000098a7d9b8314c000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000186a0
Arg [5] : 0000000000000000000000000000000000000000000000000000000025c6b3a4
Arg [6] : 0000000000000000000000000000000000000000000000000000000025c6b3a4
Arg [7] : 0000000000000000000000000000000000000000000000000000000153fc50c6
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [10] : 43727655534459765553445443727655534450616972496e7465726573745261
Arg [11] : 7465000000000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

501:8279:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;501:8279:3;;;;;-1:-1:-1;;;501:8279:3;;;;;;;;-1:-1:-1;501:8279:3;;;;;;;;;;;;;;;;;;;-1:-1:-1;;501:8279:3;;;;;;;;;;;;;;;;;;;;;;;;5172:15;;5157:30;;;;;;5260;;;;;:::i;:::-;5294:4;501:8279;;;;;;;;;;;;;;;5258:59;;;;:::i;:::-;5399:4;5382:14;501:8279;;;;5382:14;;501:8279;;;;;;;;;;5408:37;;;;;5538:50;5408:37;;5381:78;5408:50;:37;;;;5537:67;5408:37;;:::i;:::-;:50;:::i;:::-;5381:78;;:::i;:::-;5538:50;;:::i;:::-;5537:67;:::i;:::-;501:8279;5153:1031;6227:18;;501:8279;;;6197:48;;;;;;501:8279;;;6193:276;;7557:14;;501:8279;;7527:44;7524:113;7527:44;2117:4;7526:68;7527:44;;;;:::i;:::-;7575:19;7526:68;;:::i;:::-;501:8279;7524:113;:::i;:::-;7666:18;;7651:33;;;;7647:1125;7651:33;;;8074:32;;;;8058:49;8057:72;8074:32;;;8040:89;8074:32;;;:::i;:::-;8058:49;;:::i;8057:72::-;8040:89;;:::i;:::-;501:8279;7647:1125;;501:8279;;;;;;;;;;;7647:1125;8607:33;;;;;8606:85;8607:33;;;;;;;:::i;:::-;8645:45;;;;:::i;8606:85::-;1214:3;;501:8279;;;;;;;;8605:142;;;;;8567:180;8605:142;;;;:::i;8567:180::-;501:8279;7647:1125;;;501:8279;;;-1:-1:-1;;;501:8279:3;;;;6193:276;6368:18;;;;;;6338:48;;;6334:135;;6193:276;;;;;6334:135;501:8279;;-1:-1:-1;6334:135:3;;;;501:8279;;;;;-1:-1:-1;;;501:8279:3;;;;5153:1031;5641:15;;;;;-1:-1:-1;5641:15:3;;5626:30;;;;;;5729;;;;;;:::i;:::-;5763:4;501:8279;;;;;;;;;;;;;;;1214:3;501:8279;;;;;;;;5727:73;;;;:::i;:::-;5882:4;5865:14;501:8279;;;;5865:14;;501:8279;;;;;;;;;;5891:37;;;;;6021:39;5891:37;;5864:78;5891:50;:37;;;;6020:67;5891:37;;:::i;:50::-;5864:78;;:::i;6020:67::-;501:8279;5153:1031;;5622:562;6119:54;;;;;;;;;;5153:1031;;501:8279;;;;;;;;;;;;;;;;;;;;;1075:43;501:8279;;;;;;;;;;;;;;;;;;;;816:40;501:8279;;;;;;;;;;;;;;;;;;;;1956:44;501:8279;;;;;;;;;;;;;;;;;;;;2117:4;501:8279;;;;;;;;;;;;;;;;;;;;1675:39;501:8279;;;;;;;;;;;;;;;;;;;;1214:3;501:8279;;;;;;;;;;;;;;;;;;;;;;4354:1;501:8279;;;;;;;;;;;;;;;;;;;;;;;;;;;;968:40;501:8279;;;;;;;;;;;;;;;;;;;;1397:43;501:8279;;;;;;;;;;;;;;;;;;;;1836:39;501:8279;;;;;;;;;;;;;;;;;;;3941:45;;;501:8279;3941:45;;;501:8279;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3941:45;;;;;;;;;;;;;;:::i;501:8279::-;;;;;;;;;;;;;;;;;;;;;;;;3941:45;501:8279;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;501:8279:3;;;;;-1:-1:-1;;;;501:8279:3;;;;;;;;-1:-1:-1;3941:45:3;501:8279;;;;;;;;;;;;;;;;;;;;;1541:43;;501:8279;;;;;;;;;;;;;;;;;;;-1:-1:-1;501:8279:3;;;;;;;;;;;;;;;;;;;;3941:45;;501:8279;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;501:8279:3;;;;;;;;;;;;;;;;;;3941:45;;501:8279;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;501:8279:3;;;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;;;501:8279:3;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;:::o;:::-;-1:-1:-1;;;501:8279:3;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://3bcfeeee956a900460de176fd5f950caa1e50da6bb36251b30149f54c414b674

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.