ETH Price: $2,015.33 (+6.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xb0B48C24...75F3848e8
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AaveV3PositionOracle

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion
File 1 of 7 : AaveV3PositionOracle.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.21;

import "./SingletonAssetOracle.sol";
import "./dependencies/aave/IAaveV3Pool.sol";

/// @title AaveV3PositionOracle.
/// @notice Oracle for Aave V3 borrowing positions. Also used as a phantom asset
///         to represent the value of the position in the vault.
contract AaveV3PositionOracle is SingletonAssetOracle {
    /// @dev The scale for upscaling position value to 18 decimals.
    uint256 private constant _POSITION_VALUE_RESCALE_FACTOR = 1e10;
    /// @dev The name of the token.
    string private constant _NAME = "AaveV3PositionOracle";
    /// @dev The symbol of the token.
    string private constant _SYMBOL = "A3PO";

    /// @dev Aave V3 pool address.
    IAaveV3Pool public immutable aavePool;

    /// ERRORS ///

    /// @notice Thrown when the Aave V3 pool address is zero.
    error AeraPeriphery__AavePoolIsZeroAddress();

    /// FUNCTIONS ///

    /// @notice Constructor for the AaveV3PositionOracle contract.
    /// @param vault_ Address of the AeraVaultV2 contract.
    /// @param aavePool_ Address of the Aave V3 pool.
    /// @param numerairePriceFeed_ Address of the numeraire price feed.
    /// @param invertPrice_ Whether to invert the price from numeraire price feed.
    constructor(
        address vault_,
        address aavePool_,
        address numerairePriceFeed_,
        bool invertPrice_
    ) SingletonAssetOracle(vault_, numerairePriceFeed_, invertPrice_) {
        // Requirements: check that the Aave V3 pool address is not zero.
        if (aavePool_ == address(0)) {
            revert AeraPeriphery__AavePoolIsZeroAddress();
        }
        // Effects: set the Aave V3 pool address.
        aavePool = IAaveV3Pool(aavePool_);
    }

    /// @inheritdoc AbstractAssetOracle
    function name() external pure override returns (string memory) {
        return _NAME;
    }

    /// @inheritdoc AbstractAssetOracle
    function symbol() external pure override returns (string memory) {
        return _SYMBOL;
    }

    /// @inheritdoc AbstractAssetOracle
    function _getValue() internal view override returns (uint256) {
        (uint256 totalCollateralBase, uint256 totalDebtBase,,,,) =
            aavePool.getUserAccountData(_vault);

        if (totalCollateralBase < totalDebtBase) return 0;

        return _toNumeraireAmount(totalCollateralBase - totalDebtBase)
            * _POSITION_VALUE_RESCALE_FACTOR;
    }
}

File 2 of 7 : SingletonAssetOracle.sol
// SPDX-License-Identifier: BUSL-1.1
// slither-disable-start dead-code,unimplemented-functions
pragma solidity 0.8.21;

import {AbstractAssetOracle} from "./AbstractAssetOracle.sol";
import {Math} from "./Math.sol";
import {IAeraV2Oracle} from "./interfaces/IAeraV2Oracle.sol";

/// @title SingletonAssetOracle.
/// @notice This contract is a component for the Aera protocol which
///         acts as an oracle and ERC20 token at the same time. It is used to
///         represent the value of the position in the vault.
abstract contract SingletonAssetOracle is AbstractAssetOracle {
    using Math for uint256;

    /// @dev Numeraire price feed address which should be used to convert base token price to numeraire price.
    address public immutable numerairePriceFeed;
    /// @dev The scale for numeraire price feed.
    uint256 public immutable numeraireScale;
    /// @dev Invert price from numeraire price feed.
    bool public immutable invertPrice;

    /// ERRORS ///

    /// @notice Thrown when the numeraire price feed address is zero.
    error AeraPeriphery__NumerairePriceFeedIsZeroAddress();

    /// FUNCTIONS ///

    /// @notice Constructor for the SingletonAssetOracle contract.
    /// @param vault_ The address of the AeraVaultV2 contract.
    /// @param numerairePriceFeed_ The address of the numeraire price feed.
    /// @param invertPrice_ Whether to invert the price from numeraire price feed.
    constructor(
        address vault_,
        address numerairePriceFeed_,
        bool invertPrice_
    ) AbstractAssetOracle(vault_) {
        // Effects: set the invert price flag.
        invertPrice = invertPrice_;

        if (numerairePriceFeed_ == address(0)) {
            // Effects: set the numeraire price feed address and scale to zero.
            numerairePriceFeed = address(0);
            numeraireScale = 0;
        } else {
            // Effects: set the numeraire price feed address and scale.
            numerairePriceFeed = numerairePriceFeed_;
            numeraireScale =
                10 ** IAeraV2Oracle(numerairePriceFeed_).decimals();
        }
    }

    /// INTERNAL FUNCTIONS ///

    /// @dev Convert base token amount to numeraire amount.
    function _toNumeraireAmount(uint256 baseAmount)
        internal
        view
        virtual
        returns (uint256)
    {
        if (numerairePriceFeed == address(0)) return baseAmount;

        uint256 price = _getPrice(numerairePriceFeed);
        if (invertPrice) {
            return baseAmount.mulDiv(numeraireScale, price);
        } else {
            return baseAmount.mulDiv(price, numeraireScale);
        }
    }
}
// slither-disable-end dead-code,unimplemented-functions

File 3 of 7 : IAaveV3Pool.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

interface IAaveV3Pool {
    /**
     * @notice Returns the user account data across all the reserves
     * @param user The address of the user
     * @return totalCollateralBase The total collateral of the user in the base currency used by the price feed
     * @return totalDebtBase The total debt of the user in the base currency used by the price feed
     * @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed
     * @return currentLiquidationThreshold The liquidation threshold of the user
     * @return ltv The loan to value of The user
     * @return healthFactor The current health factor of the user
     */
    function getUserAccountData(address user)
        external
        view
        returns (
            uint256 totalCollateralBase,
            uint256 totalDebtBase,
            uint256 availableBorrowsBase,
            uint256 currentLiquidationThreshold,
            uint256 ltv,
            uint256 healthFactor
        );
}

File 4 of 7 : AbstractAssetOracle.sol
// SPDX-License-Identifier: BUSL-1.1
// slither-disable-start dead-code,unimplemented-functions
pragma solidity 0.8.21;

import {Math} from "./Math.sol";
import {SafeCast} from "./dependencies/openzeppelin/SafeCast.sol";
import {IAeraV2Oracle} from "./interfaces/IAeraV2Oracle.sol";

abstract contract AbstractAssetOracle is IAeraV2Oracle {
    using SafeCast for *;

    /// @dev The total supply of the token.
    uint256 private constant _TOTAL_SUPPLY = 1e18;
    /// @dev Vault address.
    address internal immutable _vault;

    /// ERRORS ///

    /// @notice Thrown when the vault address is zero.
    error AeraPeriphery__VaultIsZeroAddress();
    /// @notice Thrown when a user tries to transfer tokens.
    error AeraPeriphery__TransfersAreNotAllowed();
    /// @notice Thrown when a user tries to approve.
    error AeraPeriphery__ApprovalsAreNotAllowed();
    /// @notice Thrown when the price <= 0.
    error AeraPeriphery__InvalidPrice(address priceFeed, int256 price);

    /// STORAGE ///

    /// @notice Flag to check if the token is burned.
    bool public burned;

    /// FUNCTIONS ///

    /// @notice Constructor for the AbstractAssetOracle contract.
    /// @param vault_ The address of the AeraVaultV2 contract.
    constructor(address vault_) {
        // Requirements: check the vault address is not zero.
        if (vault_ == address(0)) {
            revert AeraPeriphery__VaultIsZeroAddress();
        }
        // Effects: set the vault address.
        _vault = vault_;
    }

    /// @dev When called by the vault, this function burns
    ///      the token and makes this token unusable.
    function transfer(address, uint256) external returns (bool) {
        if (msg.sender == _vault && !burned) {
            burned = true;
            return true;
        }
        revert AeraPeriphery__TransfersAreNotAllowed();
    }

    function transferFrom(
        address,
        address,
        uint256
    ) external virtual returns (bool) {
        revert AeraPeriphery__TransfersAreNotAllowed();
    }

    function approve(address, uint256) external virtual returns (bool) {
        revert AeraPeriphery__ApprovalsAreNotAllowed();
    }

    /// @dev Returns the amount of tokens owned by `account`.
    function balanceOf(address account) external view returns (uint256) {
        // For everyone else, the balance is zero.
        if (account != _vault) return 0;

        // For the vault, the balance is the total supply, if not burned.
        return burned ? 0 : _TOTAL_SUPPLY;
    }

    /// @dev Returns the amount of tokens in existence.
    function totalSupply() external view returns (uint256) {
        return burned ? 0 : _TOTAL_SUPPLY;
    }

    /// @inheritdoc IAeraV2Oracle
    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        )
    {
        roundId = 0;
        // Note: since the amount of the token is fixed then 1 * answer = position value.
        answer = _getValue().toInt256();

        // slither-disable-next-line incorrect-equality
        if (answer == 0) {
            answer = 1; // Avoid zero price, which would break AeraVaultAssetRegistry
        }
        startedAt = 0;
        updatedAt = block.timestamp;
        answeredInRound = 0;
    }

    /// @notice Returns the AeraVaultV2 address.
    function vault() external view virtual returns (address) {
        return _vault;
    }

    /// @notice Because this contract is oracle and ERC20 token at the same time,
    ///         this function represent decimals for oracle price and token decimals.
    /// @return decimals The number of decimals.
    function decimals() public pure returns (uint8) {
        return 18;
    }

    /// @notice Name of ERC20 token.
    function name() external pure virtual returns (string memory);

    /// @notice Symbol of ERC20 token.
    function symbol() external pure virtual returns (string memory);

    /// INTERNAL FUNCTIONS ///

    /// @dev Gets and validates the price from the price feed.
    function _getPrice(address priceFeed) internal view returns (uint256) {
        (, int256 price,,,) = IAeraV2Oracle(priceFeed).latestRoundData();

        if (price <= 0) {
            revert AeraPeriphery__InvalidPrice(priceFeed, price);
        }
        return price.toUint256();
    }

    /// @dev Returns the value of the position.
    function _getValue() internal view virtual returns (uint256);

    /// @dev Multiply two quantities, then divide by a third.
    ///      Copied from solmale FixedPointMathLib.
    function _mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        // slither-disable-next-line assembly
        assembly {
            // Store x * y in z for now.
            z := mul(x, y)

            // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))
            if iszero(
                and(
                    iszero(iszero(denominator)),
                    or(iszero(x), eq(div(z, x), y))
                )
            ) { revert(0, 0) }

            // Divide z by the denominator.
            z := div(z, denominator)
        }
    }
}
// slither-disable-end dead-code,unimplemented-functions

File 5 of 7 : Math.sol
// SPDX-License-Identifier: MIT
// slither-disable-start dead-code
pragma solidity 0.8.21;

library Math {
    /// @dev Multiply two quantities, then divide by a third.
    ///      Copied from solmate FixedPointMathLib.
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        // slither-disable-next-line assembly
        assembly {
            // Store x * y in z for now.
            z := mul(x, y)

            // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y))
            if iszero(
                and(
                    iszero(iszero(denominator)),
                    or(iszero(x), eq(div(z, x), y))
                )
            ) { revert(0, 0) }

            // Divide z by the denominator.
            z := div(z, denominator)
        }
    }
}
// slither-disable-end dead-code

File 6 of 7 : IAeraV2Oracle.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

/// @title IAeraV2Oracle
/// @notice Used to calculate price of ERC20 tokens using the same interface as Chainlink.
interface IAeraV2Oracle {
    /// @notice The decimals returned from the answer in latestRoundData.
    function decimals() external view returns (uint8);

    /// @notice Returns the latest price.
    /// @return roundId Optional, doesn't apply to non-Chainlink oracles.
    /// @return answer The price.
    /// @return startedAt Optional, doesn't apply to non-Chainlink oracles.
    /// @return updatedAt The most recent timestamp the price was updated
    /// @return answeredInRound Optional, doesn't apply to non-Chainlink oracles.
    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

File 7 of 7 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

pragma solidity ^0.8.21;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toInt248(int256 value)
        internal
        pure
        returns (int248 downcasted)
    {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toInt240(int256 value)
        internal
        pure
        returns (int240 downcasted)
    {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toInt232(int256 value)
        internal
        pure
        returns (int232 downcasted)
    {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toInt224(int256 value)
        internal
        pure
        returns (int224 downcasted)
    {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toInt216(int256 value)
        internal
        pure
        returns (int216 downcasted)
    {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toInt208(int256 value)
        internal
        pure
        returns (int208 downcasted)
    {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toInt200(int256 value)
        internal
        pure
        returns (int200 downcasted)
    {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toInt192(int256 value)
        internal
        pure
        returns (int192 downcasted)
    {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toInt184(int256 value)
        internal
        pure
        returns (int184 downcasted)
    {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toInt176(int256 value)
        internal
        pure
        returns (int176 downcasted)
    {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toInt168(int256 value)
        internal
        pure
        returns (int168 downcasted)
    {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toInt160(int256 value)
        internal
        pure
        returns (int160 downcasted)
    {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toInt152(int256 value)
        internal
        pure
        returns (int152 downcasted)
    {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toInt144(int256 value)
        internal
        pure
        returns (int144 downcasted)
    {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toInt136(int256 value)
        internal
        pure
        returns (int136 downcasted)
    {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toInt128(int256 value)
        internal
        pure
        returns (int128 downcasted)
    {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toInt120(int256 value)
        internal
        pure
        returns (int120 downcasted)
    {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toInt112(int256 value)
        internal
        pure
        returns (int112 downcasted)
    {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toInt104(int256 value)
        internal
        pure
        returns (int104 downcasted)
    {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }
}

Settings
{
  "remappings": [
    "src/=src/",
    "test/=test/",
    "@chainlink/=src/v2/dependencies/chainlink/",
    "@openzeppelin/=src/v2/dependencies/openzeppelin/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "@uniswap/v3-core/=lib/v3-core/",
    "forge-std/=lib/forge-std/src/",
    "v3-core/=lib/v3-core/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"vault_","type":"address"},{"internalType":"address","name":"aavePool_","type":"address"},{"internalType":"address","name":"numerairePriceFeed_","type":"address"},{"internalType":"bool","name":"invertPrice_","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AeraPeriphery__AavePoolIsZeroAddress","type":"error"},{"inputs":[],"name":"AeraPeriphery__ApprovalsAreNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"priceFeed","type":"address"},{"internalType":"int256","name":"price","type":"int256"}],"name":"AeraPeriphery__InvalidPrice","type":"error"},{"inputs":[],"name":"AeraPeriphery__NumerairePriceFeedIsZeroAddress","type":"error"},{"inputs":[],"name":"AeraPeriphery__TransfersAreNotAllowed","type":"error"},{"inputs":[],"name":"AeraPeriphery__VaultIsZeroAddress","type":"error"},{"inputs":[{"internalType":"int256","name":"value","type":"int256"}],"name":"SafeCastOverflowedIntToUint","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintToInt","type":"error"},{"inputs":[],"name":"aavePool","outputs":[{"internalType":"contract IAaveV3Pool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"invertPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"numerairePriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numeraireScale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100f0575f3560e01c806384e767bd11610093578063b93601ad11610063578063b93601ad14610249578063e384b4e514610270578063fbfa77cf14610297578063feaf968c146102bd575f80fd5b806384e767bd146101b057806395d89b41146101d7578063a03e4bc3146101f7578063a9059cbb14610236575f80fd5b806323b872dd116100ce57806323b872dd1461016f578063313ce5671461018257806370a082311461019157806373f42561146101a4575f80fd5b806306fdde03146100f4578063095ea7b31461013657806318160ddd14610159575b5f80fd5b604080518082019091526014815273416176655633506f736974696f6e4f7261636c6560601b60208201525b60405161012d919061073a565b60405180910390f35b6101496101443660046107a0565b6102fc565b604051901515815260200161012d565b610161610316565b60405190815260200161012d565b61014961017d3660046107c8565b610332565b6040516012815260200161012d565b61016161019f366004610801565b61034c565b5f546101499060ff1681565b6101497f000000000000000000000000000000000000000000000000000000000000000181565b6040805180820190915260048152634133504f60e01b6020820152610120565b61021e7f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e281565b6040516001600160a01b03909116815260200161012d565b6101496102443660046107a0565b6103ac565b61021e7f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841981565b6101617f0000000000000000000000000000000000000000000000000000000005f5e10081565b7f000000000000000000000000847855f5066a91b9101f41d988a3d3674dea802c61021e565b6102c561041a565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a00161012d565b5f604051636fa3433760e01b815260040160405180910390fd5b5f805460ff1661032d5750670de0b6b3a764000090565b505f90565b5f60405163253aeffd60e21b815260040160405180910390fd5b5f7f000000000000000000000000847855f5066a91b9101f41d988a3d3674dea802c6001600160a01b0316826001600160a01b03161461038d57505f919050565b5f5460ff166103a457670de0b6b3a76400006103a6565b5f5b92915050565b5f336001600160a01b037f000000000000000000000000847855f5066a91b9101f41d988a3d3674dea802c161480156103e757505f5460ff16155b1561040157505f805460ff191660019081179091556103a6565b60405163253aeffd60e21b815260040160405180910390fd5b5f8080808061042f61042a61044c565b61053d565b9350835f0361043d57600193505b5092939192505f914291508290565b604051632fe4a15f60e21b81526001600160a01b037f000000000000000000000000847855f5066a91b9101f41d988a3d3674dea802c811660048301525f91829182917f00000000000000000000000087870bca3f3fd6335c3f4ce8392d69350b4fa4e29091169063bf92857c9060240160c060405180830381865afa1580156104d8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104fc919061081a565b505050509150915080821015610514575f9250505090565b6402540be40061052c6105278385610874565b610572565b6105369190610887565b9250505090565b5f6001600160ff1b0382111561056e5760405163123baf0360e11b8152600481018390526024015b60405180910390fd5b5090565b5f7f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b03166105a5575090565b5f6105cf7f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419610654565b90507f00000000000000000000000000000000000000000000000000000000000000011561062957610622837f0000000000000000000000000000000000000000000000000000000005f5e100836106f7565b9392505050565b61062283827f0000000000000000000000000000000000000000000000000000000005f5e1006106f7565b5f80826001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610692573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b691906108b7565b5050509150505f81136106ee5760405163ef4ca00360e01b81526001600160a01b038416600482015260248101829052604401610565565b61062281610715565b82820281151584158583048514171661070e575f80fd5b0492915050565b5f8082121561056e57604051635467221960e11b815260048101839052602401610565565b5f6020808352835180828501525f5b8181101561076557858101830151858201604001528201610749565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461079b575f80fd5b919050565b5f80604083850312156107b1575f80fd5b6107ba83610785565b946020939093013593505050565b5f805f606084860312156107da575f80fd5b6107e384610785565b92506107f160208501610785565b9150604084013590509250925092565b5f60208284031215610811575f80fd5b61062282610785565b5f805f805f8060c0878903121561082f575f80fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b634e487b7160e01b5f52601160045260245ffd5b818103818111156103a6576103a6610860565b80820281158282048414176103a6576103a6610860565b805169ffffffffffffffffffff8116811461079b575f80fd5b5f805f805f60a086880312156108cb575f80fd5b6108d48661089e565b94506020860151935060408601519250606086015191506108f76080870161089e565b9050929550929590935056fea2646970667358221220b8461fe5343131c7887e027d638623ba5801a6844135d2b849ae43b5fdf6e68f64736f6c63430008150033

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

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.