Skip to content
Verified contractPartialBUSL-1.1

ACRDX_Oracle

Address0xb2bfc5361f9781f9bb511aa056292dd32578e7cd
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.38

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.38+commit.1835d247
Language
solidity
Optimization
Yes, 200 runs
EVM version
osaka
Via IR
yes
License
BUSL-1.1
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,377,551
Creation transaction
0x974e3a83d8…82dc163e36

src/contracts/merkle-adapter/connectors/oracles/tokens/ACRDX_Oracle.sol

// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2026 Symbiotic
pragma solidity ^0.8.28;

import {AsyncRedeemOracle} from "../AsyncRedeemOracle.sol";

/// @title ACRDX_Oracle
/// @notice Mainnet ACRDX oracle with fixed source and price bounds.
/// @dev Reference block 26355737: 1_022_263_000_000_000_000; bounds 25% / 350%.
contract ACRDX_Oracle is AsyncRedeemOracle {
    /* CONSTANTS */

    uint256 private constant MIN_PRICE_BOUND = 255_565_750_000_000_000;
    uint256 private constant MAX_PRICE_BOUND = 3_577_920_500_000_000_000;
    address private constant TOKEN_ADDRESS = 0x9477724Bb54AD5417de8Baff29e59DF3fB4DA74f;
    address private constant ASYNC_REDEEM_VAULT_ADDRESS = 0x74A739EA1Dc67c5a0179ebad665D1D3c4b80B712;

    /* CONSTRUCTOR */

    constructor() AsyncRedeemOracle(MIN_PRICE_BOUND, MAX_PRICE_BOUND, TOKEN_ADDRESS, ASYNC_REDEEM_VAULT_ADDRESS) {}
}

lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

src/contracts/merkle-adapter/connectors/oracles/AsyncRedeemOracle.sol

// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2026 Symbiotic
pragma solidity ^0.8.28;

import {Oracle} from "./Oracle.sol";

import {IAsyncRedeemOracle} from "../../../../interfaces/merkle-adapter/connectors/oracles/IAsyncRedeemOracle.sol";
import {IAsyncRedeemVault} from "../../../../interfaces/ll-adapter/IAsyncRedeemVault.sol";

import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";

/// @title AsyncRedeemOracle
/// @notice Oracle contract returning an ERC-7540 async redeem vault share price in `1e18` precision.
contract AsyncRedeemOracle is Oracle, IAsyncRedeemOracle {
    /* IMMUTABLES */

    /// @inheritdoc IAsyncRedeemOracle
    address public immutable ASYNC_REDEEM_VAULT;

    /// @dev Async redeem vault share unit.
    uint256 internal immutable _SHARE_UNIT;

    /// @dev Async redeem vault asset unit.
    uint256 internal immutable _ASSET_UNIT;

    /* CONSTRUCTOR */

    /// @notice Creates the async redeem vault share-price oracle.
    constructor(uint256 newMinPrice, uint256 newMaxPrice, address newTokenToRedeem, address newAsyncRedeemVault)
        Oracle(newMinPrice, newMaxPrice)
    {
        ASYNC_REDEEM_VAULT = newAsyncRedeemVault;
        _SHARE_UNIT = 10 ** IERC20Metadata(newTokenToRedeem).decimals();
        _ASSET_UNIT = 10 ** IERC20Metadata(IAsyncRedeemVault(newAsyncRedeemVault).asset()).decimals();
    }

    /* INTERNAL FUNCTIONS */

    function _getPrice() internal view override returns (uint256) {
        return IAsyncRedeemVault(ASYNC_REDEEM_VAULT).convertToAssets(_SHARE_UNIT) * 1e18 / _ASSET_UNIT;
    }
}

src/contracts/merkle-adapter/connectors/oracles/Oracle.sol

// SPDX-License-Identifier: BUSL-1.1
// Copyright (c) 2026 Symbiotic
pragma solidity ^0.8.28;

import {IOracle} from "../../../../interfaces/ll-adapter/IOracle.sol";

/// @title Oracle
/// @notice Base oracle contract with immutable price bounds.
abstract contract Oracle is IOracle {
    /* IMMUTABLES */

    /// @notice Minimum valid price.
    uint256 public immutable MIN_PRICE;

    /// @notice Maximum valid price.
    uint256 public immutable MAX_PRICE;

    /* CONSTRUCTOR */

    /// @dev Creates the bounded oracle with a nonzero minimum strictly below the maximum.
    constructor(uint256 newMinPrice, uint256 newMaxPrice) {
        if (newMinPrice == 0 || newMinPrice >= newMaxPrice) revert InvalidPriceRange();

        MIN_PRICE = newMinPrice;
        MAX_PRICE = newMaxPrice;
    }

    /* PUBLIC FUNCTIONS */

    /// @inheritdoc IOracle
    function getPrice() public view virtual returns (uint256 price) {
        price = _getPrice();
        if (price < MIN_PRICE || price > MAX_PRICE) revert InvalidPrice();
    }

    /* INTERNAL FUNCTIONS */

    /// @dev Returns the raw source price before range validation.
    function _getPrice() internal view virtual returns (uint256);
}

src/interfaces/ll-adapter/IAsyncRedeemVault.sol

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

/**
 * @title IAsyncRedeemVault
 * @notice Interface for minimal ERC-7540 async redeem vault interface used by liquidity lane accounts.
 */
interface IAsyncRedeemVault {
    /* FUNCTIONS */

    /**
     * @notice Returns the vault asset.
     * @return asset The asset address.
     */
    function asset() external view returns (address asset);

    /**
     * @notice Returns the asset amount represented by shares.
     * @param shares The share amount.
     * @return assets The asset amount.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @notice Returns pending redemption shares for a request.
     * @param requestId The request id.
     * @param controller The request controller.
     * @return shares The pending shares.
     */
    function pendingRedeemRequest(uint256 requestId, address controller) external view returns (uint256 shares);

    /**
     * @notice Returns claimable redemption shares for a request.
     * @param requestId The request id.
     * @param controller The request controller.
     * @return shares The claimable shares.
     */
    function claimableRedeemRequest(uint256 requestId, address controller) external view returns (uint256 shares);

    /**
     * @notice Returns the claimable asset amount across processed redemptions, at fulfillment prices.
     * @param owner The request controller.
     * @return maxAssets The claimable asset amount.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @notice Returns the claimable share amount across processed redemptions.
     * @param owner The request controller.
     * @return maxShares The claimable share amount.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @notice Requests an async redemption.
     * @param shares The share amount.
     * @param controller The request controller.
     * @param owner The share owner.
     * @return requestId The created request id.
     */
    function requestRedeem(uint256 shares, address controller, address owner) external returns (uint256 requestId);

    /**
     * @notice Claims a processed async redemption.
     * @param shares The shares to claim.
     * @param receiver The asset receiver.
     * @param controller The request controller.
     * @return assets The claimed asset amount.
     */
    function redeem(uint256 shares, address receiver, address controller) external returns (uint256 assets);
}

src/interfaces/ll-adapter/IOracle.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @title IOracle
 * @notice Interface for liquidity lane token oracles.
 */
interface IOracle {
    /* ERRORS */

    /**
     * @notice Raised when the fetched price is outside the configured bounds.
     */
    error InvalidPrice();

    /**
     * @notice Raised when the minimum price is zero or is not below the maximum price.
     */
    error InvalidPriceRange();

    /* FUNCTIONS */

    /**
     * @notice Returns the token price.
     * @return price Token price in 1e18 precision against a shared quote.
     */
    function getPrice() external view returns (uint256 price);
}

src/interfaces/merkle-adapter/connectors/oracles/IAsyncRedeemOracle.sol

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

import {IOracle} from "../../../ll-adapter/IOracle.sol";

/**
 * @title IAsyncRedeemOracle
 * @notice Interface for ERC-7540 async redeem vault share-price oracles.
 */
interface IAsyncRedeemOracle is IOracle {
    /* FUNCTIONS */

    /**
     * @notice Returns the async redeem vault used as the price source.
     * @return vault The async redeem vault address.
     */
    function ASYNC_REDEEM_VAULT() external view returns (address vault);
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "none",
    "useLiteralContent": false
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "viaSSACFG": false,
  "evmVersion": "osaka",
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solady/=lib/solady/src/",
    "morpho-blue/=lib/morpho-blue/",
    "morpho-midnight/=lib/morpho-midnight/",
    "@symbioticfi/core/=lib/core/",
    "lib/core/:forge-std/=lib/core/lib/forge-std/src/",
    "lib/core/:forge-std/=lib/core/lib/forge-std/src/",
    "lib/core/:solady/=lib/core/lib/solady/src/",
    "lib/core/:solady/=lib/core/lib/solady/src/",
    "lib/core/src/contracts/common/MigratableEntityProxy.sol:@openzeppelin/contracts/=lib/core/lib/openzeppelin-contracts/contracts/",
    "lib/core/src/contracts/common/MigratableEntityProxy.sol:@openzeppelin/contracts/=lib/core/lib/openzeppelin-contracts/contracts/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/morpho-midnight/lib/morpho-blue/lib/forge-std/:ds-test/=lib/morpho-midnight/lib/morpho-blue/lib/forge-std/lib/ds-test/src/",
    "lib/morpho-midnight/lib/morpho-blue/lib/forge-std/:ds-test/=lib/morpho-midnight/lib/morpho-blue/lib/forge-std/lib/ds-test/src/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/core/lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/core/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/core/lib/openzeppelin-contracts/:erc4626-tests/=lib/core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts/:erc4626-tests/=lib/core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/core/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/core/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/core/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/morpho-blue/lib/forge-std/:ds-test/=lib/morpho-blue/lib/forge-std/lib/ds-test/src/",
    "lib/morpho-blue/lib/forge-std/:ds-test/=lib/morpho-blue/lib/forge-std/lib/ds-test/src/",
    "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/core/:openzeppelin-contracts-upgradeable/=lib/core/lib/openzeppelin-contracts-upgradeable/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/core/:openzeppelin-contracts-upgradeable/=lib/core/lib/openzeppelin-contracts-upgradeable/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/core/:openzeppelin-contracts/=lib/core/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/core/:openzeppelin-contracts/=lib/core/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/",
    "lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts/:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "core/=lib/core/src/contracts/merkle-adapter/connectors/oracles/",
    "ds-test/=lib/morpho-blue/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/src/contracts/merkle-adapter/connectors/oracles/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/src/contracts/merkle-adapter/connectors/oracles/"
  ],
  "experimental": false
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.