Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
VariableInterestRate
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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 > RATE_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(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 = 3;
_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;
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) / (UTIL_PREC - 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_UTILIZATION));
// _newRatePerSec = uint64(_vertex2Interest + (((_utilization - VERTEX_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);
}
}
}{
"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": 1000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": false
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
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"}]Contract Creation Code
6101c06040523480156200001257600080fd5b50604051620012c1380380620012c18339810160408190526200003591620002cd565b808060200190518101906200004b919062000322565b61016081905261012082905261010083905261014084905260a085905260808690526101a087905261018088905260e089905260c08a90526000620000918c826200046c565b50505050505050505050505060805160a05111620000c2576040516356a3535960e11b815260040160405180910390fd5b610100516101205111620000e957604051631c3c204560e11b815260040160405180910390fd5b620186a060c05111156200011057604051631173807760e31b815260040160405180910390fd5b620186a060e05111156200013757604051631173807760e31b815260040160405180910390fd5b60c05160e051116200015c5760405163d7580bc560e01b815260040160405180910390fd5b60a05115806200016d575061016051155b8062000179575060c051155b80620001895750620186a060c051145b8062000195575060e051155b80620001a55750620186a060e051145b80620001b55750620186a060a051145b15620001d4576040516301de42a960e41b815260040160405180910390fd5b670de0b6b3a764000060a0511180620001f75750670de0b6b3a764000061012051115b1562000216576040516369fb55ab60e11b815260040160405180910390fd5b5062000538565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156200025057620002506200021d565b604051601f8501601f19908116603f011681019082821181831017156200027b576200027b6200021d565b816040528093508581528686860111156200029557600080fd5b600092505b85831015620002ba5782850151602084830101526020830192506200029a565b6000602087830101525050509392505050565b600060208284031215620002e057600080fd5b81516001600160401b03811115620002f757600080fd5b8201601f810184136200030957600080fd5b6200031a8482516020840162000233565b949350505050565b60008060008060008060008060008060006101608c8e0312156200034557600080fd5b8b516001600160401b038111156200035c57600080fd5b8c01601f81018e136200036e57600080fd5b6200037f8e82516020840162000233565b9b505060208c0151995060408c0151985060608c0151975060808c0151965060a08c0151955060c08c0151945060e08c015193506101008c015192506101208c015191506101408c015190509295989b509295989b9093969950565b600181811c90821680620003f057607f821691505b6020821081036200041157634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000467576000816000526020600020601f850160051c81016020861015620004425750805b601f850160051c820191505b8181101562000463578281556001016200044e565b5050505b505050565b81516001600160401b038111156200048857620004886200021d565b620004a081620004998454620003db565b8462000417565b602080601f831160018114620004d85760008415620004bf5750858301515b600019600386901b1c1916600185901b17855562000463565b600085815260208120601f198616915b828110156200050957888601518255948401946001909101908401620004e8565b5085821015620005285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051610c5062000671600039600081816101ed015261040e015260008181610254015261038d01526000818161015801528181610792015281816107d8015281816108ee015261093301526000818161021e01528181610363015281816103e4015281816104af01526104ee0152600081816101090152818161098001526109b301526000818161017f015281816109d90152610a0c0152600081816102fd0152818161051b01528181610567015281816105e201526106230152600081816102a2015281816104630152818161048b01528181610546015261059a0152600081816101a60152818161083501528181610862015261088f01526000818161027b01528181610705015261072f0152610c506000f3fe608060405234801561001057600080fd5b50600436106100ff5760003560e01c80638e75618c11610097578063c416812511610066578063c41681251461029d578063cd3181d5146102c4578063eb07ae1d146102f8578063f7073c3a1461031f57600080fd5b80638e75618c1461021957806391474c491461024057806395da99fc1461024f5780639c0732701461027657600080fd5b806340797eda116100d357806340797eda146101a157806354fd4d50146101c8578063697e3ae7146101e85780636cd3cc771461020f57600080fd5b80624c98af1461010457806306fdde031461013e57806317784ca41461015357806331bf879d1461017a575b600080fd5b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b610146610327565b6040516101359190610a33565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b600360008060408051938452602084019290925290820152606001610135565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b620186a081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b670de0b6b3a764000081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b6102d76102d2366004610a82565b61034f565b6040805167ffffffffffffffff938416815292909116602083015201610135565b61012b7f000000000000000000000000000000000000000000000000000000000000000081565b610146610673565b6060600060405160200161033b9190610b02565b604051602081830303815290604052905090565b60008061035d858585610701565b905060007f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006103c08367ffffffffffffffff8716610beb565b6103ca9190610c04565b6103d49190610c1b565b6103de9190610c3d565b905060007f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006104418367ffffffffffffffff8816610beb565b61044b9190610c04565b6104559190610c1b565b61045f9190610c3d565b90507f0000000000000000000000000000000000000000000000000000000000000000861015610519577f00000000000000000000000000000000000000000000000000000000000000006104d47f000000000000000000000000000000000000000000000000000000000000000084610beb565b6104de9088610c04565b6104e89190610c1b565b610512907f0000000000000000000000000000000000000000000000000000000000000000610c3d565b9350610669565b7f00000000000000000000000000000000000000000000000000000000000000008610156105dd5761058b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610beb565b6105958383610beb565b6105bf7f000000000000000000000000000000000000000000000000000000000000000089610beb565b6105c99190610c04565b6105d39190610c1b565b6105129083610c3d565b61060a7f0000000000000000000000000000000000000000000000000000000000000000620186a0610beb565b61061e8267ffffffffffffffff8616610beb565b6106487f000000000000000000000000000000000000000000000000000000000000000089610beb565b6106529190610c04565b61065c9190610c1b565b6106669082610c3d565b93505b5050935093915050565b6000805461068090610ac8565b80601f01602080910402602001604051908101604052809291908181526020018280546106ac90610ac8565b80156106f95780601f106106ce576101008083540402835291602001916106f9565b820191906000526020600020905b8154815290600101906020018083116106dc57829003601f168201915b505050505081565b60007f00000000000000000000000000000000000000000000000000000000000000008310156108335760007f00000000000000000000000000000000000000000000000000000000000000006107588582610beb565b61076a90670de0b6b3a7640000610c04565b6107749190610c1b565b90506000856107838380610c04565b61078d9190610c04565b6107c67f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c04565b6107d09190610c3d565b90508061080c7f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c04565b6108209067ffffffffffffffff8716610c04565b61082a9190610c1b565b9250505061097e565b7f000000000000000000000000000000000000000000000000000000000000000083111561097b57600061088a7f0000000000000000000000000000000000000000000000000000000000000000620186a0610beb565b6108b47f000000000000000000000000000000000000000000000000000000000000000086610beb565b6108c690670de0b6b3a7640000610c04565b6108d09190610c1b565b90506000856108df8380610c04565b6108e99190610c04565b6109227f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c04565b61092c9190610c3d565b90506109677f00000000000000000000000000000000000000000000000000000000000000006ec097ce7bc90715b34b9f1000000000610c04565b6108208267ffffffffffffffff8716610c04565b50805b7f00000000000000000000000000000000000000000000000000000000000000008167ffffffffffffffff1611156109d757507f0000000000000000000000000000000000000000000000000000000000000000610a2c565b7f00000000000000000000000000000000000000000000000000000000000000008167ffffffffffffffff161015610a2c57507f00000000000000000000000000000000000000000000000000000000000000005b9392505050565b60006020808352835180602085015260005b81811015610a6157858101830151858201604001528201610a45565b506000604082860101526040601f19601f8301168501019250505092915050565b600080600060608486031215610a9757600080fd5b8335925060208401359150604084013567ffffffffffffffff81168114610abd57600080fd5b809150509250925092565b600181811c90821680610adc57607f821691505b602082108103610afc57634e487b7160e01b600052602260045260246000fd5b50919050565b7f5661726961626c65205261746520563220000000000000000000000000000000815260006011600084548160018260011c91506001831680610b4657607f831692505b60208084108203610b6557634e487b7160e01b86526022600452602486fd5b818015610b795760018114610b9457610bc6565b60ff19861660118b0152601185151586028b01019650610bc6565b60008b81526020902060005b86811015610bbb5781548c82018b0152908501908301610ba0565b50506011858b010196505b50949998505050505050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bfe57610bfe610bd5565b92915050565b8082028115828204841417610bfe57610bfe610bd5565b600082610c3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610bfe57610bfe610bd556000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000111700000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000004db7325476300000000000000000000000000000000000000000000000000000853a0d2313c00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000012dd510c000000000000000000000000000000000000000000000000000000011af7bfb400000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e31352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ff5760003560e01c80638e75618c11610097578063c416812511610066578063c41681251461029d578063cd3181d5146102c4578063eb07ae1d146102f8578063f7073c3a1461031f57600080fd5b80638e75618c1461021957806391474c491461024057806395da99fc1461024f5780639c0732701461027657600080fd5b806340797eda116100d357806340797eda146101a157806354fd4d50146101c8578063697e3ae7146101e85780636cd3cc771461020f57600080fd5b80624c98af1461010457806306fdde031461013e57806317784ca41461015357806331bf879d1461017a575b600080fd5b61012b7f00000000000000000000000000000000000000000000000000000035cb191c3881565b6040519081526020015b60405180910390f35b610146610327565b6040516101359190610a33565b61012b7f000000000000000000000000000000000000000000000000000000000002a30081565b61012b7f000000000000000000000000000000000000000000000000000000011af7bfb481565b61012b7f000000000000000000000000000000000000000000000000000000000001424481565b600360008060408051938452602084019290925290820152606001610135565b61012b7f0000000000000000000000000000000000000000000000000853a0d2313c000081565b61012b620186a081565b61012b7f0000000000000000000000000000000000000000000000000000000012dd510c81565b61012b670de0b6b3a764000081565b61012b7f00000000000000000000000000000000000000000000000004db73254763000081565b61012b7f0000000000000000000000000000000000000000000000000000000000011b3481565b61012b7f000000000000000000000000000000000000000000000000000000000001117081565b6102d76102d2366004610a82565b61034f565b6040805167ffffffffffffffff938416815292909116602083015201610135565b61012b7f0000000000000000000000000000000000000000000000000000000000015f9081565b610146610673565b6060600060405160200161033b9190610b02565b604051602081830303815290604052905090565b60008061035d858585610701565b905060007f0000000000000000000000000000000000000000000000000000000012dd510c670de0b6b3a76400007f00000000000000000000000000000000000000000000000004db7325476300006103c08367ffffffffffffffff8716610beb565b6103ca9190610c04565b6103d49190610c1b565b6103de9190610c3d565b905060007f0000000000000000000000000000000000000000000000000000000012dd510c670de0b6b3a76400007f0000000000000000000000000000000000000000000000000853a0d2313c00006104418367ffffffffffffffff8816610beb565b61044b9190610c04565b6104559190610c1b565b61045f9190610c3d565b90507f0000000000000000000000000000000000000000000000000000000000011170861015610519577f00000000000000000000000000000000000000000000000000000000000111706104d47f0000000000000000000000000000000000000000000000000000000012dd510c84610beb565b6104de9088610c04565b6104e89190610c1b565b610512907f0000000000000000000000000000000000000000000000000000000012dd510c610c3d565b9350610669565b7f0000000000000000000000000000000000000000000000000000000000015f908610156105dd5761058b7f00000000000000000000000000000000000000000000000000000000000111707f0000000000000000000000000000000000000000000000000000000000015f90610beb565b6105958383610beb565b6105bf7f000000000000000000000000000000000000000000000000000000000001117089610beb565b6105c99190610c04565b6105d39190610c1b565b6105129083610c3d565b61060a7f0000000000000000000000000000000000000000000000000000000000015f90620186a0610beb565b61061e8267ffffffffffffffff8616610beb565b6106487f0000000000000000000000000000000000000000000000000000000000015f9089610beb565b6106529190610c04565b61065c9190610c1b565b6106669082610c3d565b93505b5050935093915050565b6000805461068090610ac8565b80601f01602080910402602001604051908101604052809291908181526020018280546106ac90610ac8565b80156106f95780601f106106ce576101008083540402835291602001916106f9565b820191906000526020600020905b8154815290600101906020018083116106dc57829003601f168201915b505050505081565b60007f0000000000000000000000000000000000000000000000000000000000011b348310156108335760007f0000000000000000000000000000000000000000000000000000000000011b346107588582610beb565b61076a90670de0b6b3a7640000610c04565b6107749190610c1b565b90506000856107838380610c04565b61078d9190610c04565b6107c67f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c04565b6107d09190610c3d565b90508061080c7f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c04565b6108209067ffffffffffffffff8716610c04565b61082a9190610c1b565b9250505061097e565b7f000000000000000000000000000000000000000000000000000000000001424483111561097b57600061088a7f0000000000000000000000000000000000000000000000000000000000014244620186a0610beb565b6108b47f000000000000000000000000000000000000000000000000000000000001424486610beb565b6108c690670de0b6b3a7640000610c04565b6108d09190610c1b565b90506000856108df8380610c04565b6108e99190610c04565b6109227f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c04565b61092c9190610c3d565b90506109677f000000000000000000000000000000000000000000000000000000000002a3006ec097ce7bc90715b34b9f1000000000610c04565b6108208267ffffffffffffffff8716610c04565b50805b7f00000000000000000000000000000000000000000000000000000035cb191c388167ffffffffffffffff1611156109d757507f00000000000000000000000000000000000000000000000000000035cb191c38610a2c565b7f000000000000000000000000000000000000000000000000000000011af7bfb48167ffffffffffffffff161015610a2c57507f000000000000000000000000000000000000000000000000000000011af7bfb45b9392505050565b60006020808352835180602085015260005b81811015610a6157858101830151858201604001528201610a45565b506000604082860101526040601f19601f8301168501019250505092915050565b600080600060608486031215610a9757600080fd5b8335925060208401359150604084013567ffffffffffffffff81168114610abd57600080fd5b809150509250925092565b600181811c90821680610adc57607f821691505b602082108103610afc57634e487b7160e01b600052602260045260246000fd5b50919050565b7f5661726961626c65205261746520563220000000000000000000000000000000815260006011600084548160018260011c91506001831680610b4657607f831692505b60208084108203610b6557634e487b7160e01b86526022600452602486fd5b818015610b795760018114610b9457610bc6565b60ff19861660118b0152601185151586028b01019650610bc6565b60008b81526020902060005b86811015610bbb5781548c82018b0152908501908301610ba0565b50506011858b010196505b50949998505050505050505050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bfe57610bfe610bd5565b92915050565b8082028115828204841417610bfe57610bfe610bd5565b600082610c3857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610bfe57610bfe610bd556
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000111700000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000004db7325476300000000000000000000000000000000000000000000000000000853a0d2313c00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000012dd510c000000000000000000000000000000000000000000000000000000011af7bfb400000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e31352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _params (bytes): 0x000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000111700000000000000000000000000000000000000000000000000000000000015f9000000000000000000000000000000000000000000000000004db7325476300000000000000000000000000000000000000000000000000000853a0d2313c00000000000000000000000000000000000000000000000000000000000000011b3400000000000000000000000000000000000000000000000000000000000142440000000000000000000000000000000000000000000000000000000012dd510c000000000000000000000000000000000000000000000000000000011af7bfb400000000000000000000000000000000000000000000000000000035cb191c38000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000002242616d6d205b2e31352d372e33305d2032206461797320282e3732352d2e38323529000000000000000000000000000000000000000000000000000000000000
-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 0000000000000000000000000000000000000000000000000000000000011170
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015f90
Arg [5] : 00000000000000000000000000000000000000000000000004db732547630000
Arg [6] : 0000000000000000000000000000000000000000000000000853a0d2313c0000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000011b34
Arg [8] : 0000000000000000000000000000000000000000000000000000000000014244
Arg [9] : 0000000000000000000000000000000000000000000000000000000012dd510c
Arg [10] : 000000000000000000000000000000000000000000000000000000011af7bfb4
Arg [11] : 00000000000000000000000000000000000000000000000000000035cb191c38
Arg [12] : 000000000000000000000000000000000000000000000000000000000002a300
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [14] : 42616d6d205b2e31352d372e33305d2032206461797320282e3732352d2e3832
Arg [15] : 3529000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.