S Price: $0.408637 (-10.86%)
    /

    Token

    Silo Finance wS Debt, SiloId: 3 (dwS-3)

    Overview

    Max Total Supply

    26,483,607.520531775940787249 dwS-3

    Holders

    303

    Market

    Price

    $0.00 @ 0.000000 S

    Onchain Market Cap

    $0.00

    Circulating Supply Market Cap

    -

    Other Info

    Token Contract (WITH 18 Decimals)

    Balance
    335,004.632496350467744026 dwS-3

    Value
    $0.00
    0x577be3ed9a71e1c355f519bbdf5f09ba2018b1cc
    Loading...
    Loading
    Loading...
    Loading
    Loading...
    Loading

    Click here to update the token information / general information

    Minimal Proxy Contract for 0x74477d70453213dc1484503dabcdb64f9146884d

    Contract Name:
    ShareDebtToken

    Compiler Version
    v0.8.28+commit.7893614a

    Optimization Enabled:
    Yes with 200 runs

    Other Settings:
    cancun EvmVersion

    Contract Source Code (Solidity Standard Json-Input format)

    File 1 of 51 : ShareDebtToken.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity 0.8.28;
    import {IERC20R} from "../interfaces/IERC20R.sol";
    import {IShareToken, ShareToken, ISilo} from "./ShareToken.sol";
    import {NonReentrantLib} from "../lib/NonReentrantLib.sol";
    import {ShareTokenLib} from "../lib/ShareTokenLib.sol";
    import {ERC20RStorageLib} from "../lib/ERC20RStorageLib.sol";
    import {IShareTokenInitializable} from "../interfaces/IShareTokenInitializable.sol";
    /// @title ShareDebtToken
    /// @notice ERC20 compatible token representing debt in Silo
    /// @dev It implements reversed approvals and checks solvency of recipient on transfer.
    ///
    /// It is assumed that there is no attack vector on taking someone else's debt because we don't see
    /// economical reason why one would do such thing. For that reason anyone can transfer owner's token
    /// to any recipient as long as receiving wallet approves the transfer. In other words, anyone can
    /// take someone else's debt without asking.
    /// @custom:security-contact security@silo.finance
    contract ShareDebtToken is IERC20R, ShareToken, IShareTokenInitializable {
    /// @inheritdoc IShareTokenInitializable
    function callOnBehalfOfShareToken(address _target, uint256 _value, ISilo.CallType _callType, bytes calldata _input)
    external
    payable
    virtual
    onlyHookReceiver()
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 2 of 51 : IERC20R.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    /// @dev This interface stands for "ERC20 Reversed",
    /// in the sense that the recipient of a transfer needs to approve the transfer amount first
    interface IERC20R {
    struct Storage {
    mapping(address owner => mapping(address recipient => uint256 allowance)) _receiveAllowances;
    }
    /// @dev Emitted when the allowance of a `_receiver` for an `_owner` is set by
    /// a call to {changeReceiveApproval}. `value` is the new allowance.
    /// @param _owner previous owner of the debt
    /// @param _receiver wallet that received debt
    /// @param _value amount of token transferred
    event ReceiveApproval(address indexed _owner, address indexed _receiver, uint256 _value);
    /// @dev Atomically decreases the receive allowance granted to `owner` by the caller.
    /// This is an alternative to {receive approve} that can be used as a mitigation for problems
    /// described in {IERC20-approve}.
    /// Emits an {ReceiveApproval} event indicating the updated receive allowance.
    /// @param _owner owner of debt token that is being allowed sending it to the caller
    /// @param _subtractedValue amount of token to decrease allowance
    function decreaseReceiveAllowance(address _owner, uint256 _subtractedValue) external;
    /// @dev Atomically increases the receive allowance granted to `owner` by the caller.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 3 of 51 : ShareToken.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity 0.8.28;
    import {IERC20Permit} from "openzeppelin5/token/ERC20/extensions/ERC20Permit.sol";
    import {ERC20PermitUpgradeable} from "openzeppelin5-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";
    import {ERC20Upgradeable} from "openzeppelin5-upgradeable/token/ERC20/ERC20Upgradeable.sol";
    import {IERC20Metadata, IERC20} from "openzeppelin5/token/ERC20/ERC20.sol";
    import {IHookReceiver} from "../interfaces/IHookReceiver.sol";
    import {IShareToken, ISilo} from "../interfaces/IShareToken.sol";
    import {ISiloConfig} from "../SiloConfig.sol";
    import {Hook} from "../lib/Hook.sol";
    import {CallBeforeQuoteLib} from "../lib/CallBeforeQuoteLib.sol";
    import {NonReentrantLib} from "../lib/NonReentrantLib.sol";
    import {ShareTokenLib} from "../lib/ShareTokenLib.sol";
    /// @title ShareToken
    /// @notice Implements common interface for Silo tokens representing debt or collateral.
    /// @dev Docs borrowed from https://github.com/OpenZeppelin/openzeppelin-contracts/tree/v4.9.3
    ///
    /// Implementation of the ERC4626 "Tokenized Vault Standard" as defined in
    /// https://eips.ethereum.org/EIPS/eip-4626[EIP-4626].
    ///
    /// This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for
    /// underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 4 of 51 : NonReentrantLib.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.28;
    import {ISiloConfig} from "../interfaces/ISiloConfig.sol";
    import {ICrossReentrancyGuard} from "../interfaces/ICrossReentrancyGuard.sol";
    library NonReentrantLib {
    function nonReentrant(ISiloConfig _config) internal view {
    require(!_config.reentrancyGuardEntered(), ICrossReentrancyGuard.CrossReentrantCall());
    }
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 5 of 51 : ShareTokenLib.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.0;
    import {Strings} from "openzeppelin5/utils/Strings.sol";
    import {ISilo} from "../interfaces/ISilo.sol";
    import {IShareToken} from "../interfaces/IShareToken.sol";
    import {ISiloConfig} from "../interfaces/ISiloConfig.sol";
    import {TokenHelper} from "../lib/TokenHelper.sol";
    import {CallBeforeQuoteLib} from "../lib/CallBeforeQuoteLib.sol";
    import {Hook} from "../lib/Hook.sol";
    // solhint-disable ordering
    library ShareTokenLib {
    using Hook for uint24;
    using CallBeforeQuoteLib for ISiloConfig.ConfigData;
    // keccak256(abi.encode(uint256(keccak256("silo.storage.ShareToken")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant _STORAGE_LOCATION = 0x01b0b3f9d6e360167e522fa2b18ba597ad7b2b35841fec7e1ca4dbb0adea1200;
    function getShareTokenStorage() internal pure returns (IShareToken.ShareTokenStorage storage $) {
    // solhint-disable-next-line no-inline-assembly
    assembly {
    $.slot := _STORAGE_LOCATION
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 6 of 51 : ERC20RStorageLib.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.0;
    import {IERC20R} from "../interfaces/IERC20R.sol";
    library ERC20RStorageLib {
    // keccak256(abi.encode(uint256(keccak256("silo.storage.ERC20R")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant _STORAGE_LOCATION = 0x5a499b742bad5e18c139447ced974d19a977bcf86e03691ee458d10efcd04d00;
    function getIERC20RStorage() internal pure returns (IERC20R.Storage storage $) {
    // solhint-disable-next-line no-inline-assembly
    assembly {
    $.slot := _STORAGE_LOCATION
    }
    }
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 7 of 51 : IShareTokenInitializable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {ISilo} from "./ISilo.sol";
    interface IShareTokenInitializable {
    /// @param _target target address to call
    /// @param _value value to send
    /// @param _callType call type
    /// @param _input input data
    /// @return success true if the call was successful, false otherwise
    /// @return result bytes returned by the call
    function callOnBehalfOfShareToken(address _target, uint256 _value, ISilo.CallType _callType, bytes calldata _input)
    external
    payable
    returns (bool success, bytes memory result);
    /// @param _silo Silo address for which tokens was deployed
    /// @param _hookReceiver address that will get a callback on mint, burn and transfer of the token
    /// @param _tokenType must be one of this hooks values: COLLATERAL_TOKEN, PROTECTED_TOKEN, DEBT_TOKEN
    function initialize(ISilo _silo, address _hookReceiver, uint24 _tokenType) external;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 8 of 51 : ERC20Permit.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)
    pragma solidity ^0.8.20;
    import {IERC20Permit} from "./IERC20Permit.sol";
    import {ERC20} from "../ERC20.sol";
    import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
    import {EIP712} from "../../../utils/cryptography/EIP712.sol";
    import {Nonces} from "../../../utils/Nonces.sol";
    /**
    * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
    * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
    *
    * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
    * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
    * need to send a transaction, and thus is not required to hold Ether at all.
    */
    abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
    bytes32 private constant PERMIT_TYPEHASH =
    keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    /**
    * @dev Permit deadline has expired.
    */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 9 of 51 : ERC20PermitUpgradeable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)
    pragma solidity ^0.8.20;
    import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
    import {ERC20Upgradeable} from "../ERC20Upgradeable.sol";
    import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
    import {EIP712Upgradeable} from "../../../utils/cryptography/EIP712Upgradeable.sol";
    import {NoncesUpgradeable} from "../../../utils/NoncesUpgradeable.sol";
    import {Initializable} from "../../../proxy/utils/Initializable.sol";
    /**
    * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
    * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
    *
    * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
    * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
    * need to send a transaction, and thus is not required to hold Ether at all.
    */
    abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable {
    bytes32 private constant PERMIT_TYPEHASH =
    keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    /**
    * @dev Permit deadline has expired.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 10 of 51 : ERC20Upgradeable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
    pragma solidity ^0.8.20;
    import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
    import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
    import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol";
    import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol";
    import {Initializable} from "../../proxy/utils/Initializable.sol";
    /**
    * @dev Implementation of the {IERC20} interface.
    *
    * This implementation is agnostic to the way tokens are created. This means
    * that a supply mechanism has to be added in a derived contract using {_mint}.
    *
    * TIP: For a detailed writeup see our guide
    * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
    * to implement supply mechanisms].
    *
    * The default value of {decimals} is 18. To change this, you should override
    * this function so it returns a different value.
    *
    * We have followed general OpenZeppelin Contracts guidelines: functions revert
    * instead returning `false` on failure. This behavior is nonetheless
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 11 of 51 : ERC20.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
    pragma solidity ^0.8.20;
    import {IERC20} from "./IERC20.sol";
    import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
    import {Context} from "../../utils/Context.sol";
    import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";
    /**
    * @dev Implementation of the {IERC20} interface.
    *
    * This implementation is agnostic to the way tokens are created. This means
    * that a supply mechanism has to be added in a derived contract using {_mint}.
    *
    * TIP: For a detailed writeup see our guide
    * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
    * to implement supply mechanisms].
    *
    * The default value of {decimals} is 18. To change this, you should override
    * this function so it returns a different value.
    *
    * We have followed general OpenZeppelin Contracts guidelines: functions revert
    * instead returning `false` on failure. This behavior is nonetheless
    * conventional and does not conflict with the expectations of ERC-20
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 12 of 51 : IHookReceiver.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {ISiloConfig} from "./ISiloConfig.sol";
    interface IHookReceiver {
    struct HookConfig {
    uint24 hooksBefore;
    uint24 hooksAfter;
    }
    event HookConfigured(address silo, uint24 hooksBefore, uint24 hooksAfter);
    /// @notice Initialize a hook receiver
    /// @param _siloConfig Silo configuration with all the details about the silo
    /// @param _data Data to initialize the hook receiver (if needed)
    function initialize(ISiloConfig _siloConfig, bytes calldata _data) external;
    /// @notice state of Silo before action, can be also without interest, if you need them, call silo.accrueInterest()
    function beforeAction(address _silo, uint256 _action, bytes calldata _input) external;
    function afterAction(address _silo, uint256 _action, bytes calldata _inputAndOutput) external;
    /// @notice return hooksBefore and hooksAfter configuration
    function hookReceiverConfig(address _silo) external view returns (uint24 hooksBefore, uint24 hooksAfter);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 13 of 51 : IShareToken.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {IERC20Metadata} from "openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol";
    import {ISiloConfig} from "./ISiloConfig.sol";
    import {ISilo} from "./ISilo.sol";
    interface IShareToken is IERC20Metadata {
    struct HookSetup {
    /// @param this is the same as in siloConfig
    address hookReceiver;
    /// @param hooks bitmap
    uint24 hooksBefore;
    /// @param hooks bitmap
    uint24 hooksAfter;
    /// @param tokenType must be one of this hooks values: COLLATERAL_TOKEN, PROTECTED_TOKEN, DEBT_TOKEN
    uint24 tokenType;
    }
    struct ShareTokenStorage {
    /// @notice Silo address for which tokens was deployed
    ISilo silo;
    /// @dev cached silo config address
    ISiloConfig siloConfig;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 14 of 51 : SiloConfig.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity 0.8.28;
    import {IERC20} from "openzeppelin5/token/ERC20/IERC20.sol";
    import {ISilo} from "./interfaces/ISilo.sol";
    import {ISiloConfig} from "./interfaces/ISiloConfig.sol";
    import {CrossReentrancyGuard} from "./utils/CrossReentrancyGuard.sol";
    import {Hook} from "./lib/Hook.sol";
    /// @notice SiloConfig stores full configuration of Silo in immutable manner
    /// @dev Immutable contract is more expensive to deploy than minimal proxy however it provides nearly 10x cheaper
    /// data access using immutable variables.
    contract SiloConfig is ISiloConfig, CrossReentrancyGuard {
    using Hook for uint256;
    uint256 public immutable SILO_ID;
    uint256 internal immutable _DAO_FEE;
    uint256 internal immutable _DEPLOYER_FEE;
    address internal immutable _HOOK_RECEIVER;
    // TOKEN #0
    address internal immutable _SILO0;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 15 of 51 : Hook.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: GPL-2.0-or-later
    pragma solidity ^0.8.28;
    import {ISilo} from "../interfaces/ISilo.sol";
    // solhint-disable private-vars-leading-underscore
    library Hook {
    /// @notice The data structure for the deposit hook
    /// @param assets The amount of assets deposited
    /// @param shares The amount of shares deposited
    /// @param receiver The receiver of the deposit
    struct BeforeDepositInput {
    uint256 assets;
    uint256 shares;
    address receiver;
    }
    /// @notice The data structure for the deposit hook
    /// @param assets The amount of assets deposited
    /// @param shares The amount of shares deposited
    /// @param receiver The receiver of the deposit
    /// @param receivedAssets The exact amount of assets being deposited
    /// @param mintedShares The exact amount of shares being minted
    struct AfterDepositInput {
    uint256 assets;
    uint256 shares;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 16 of 51 : CallBeforeQuoteLib.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.28;
    import {ISiloConfig} from "../interfaces/ISiloConfig.sol";
    import {ISiloOracle} from "../interfaces/ISiloOracle.sol";
    library CallBeforeQuoteLib {
    /// @dev Call `beforeQuote` on the `solvencyOracle` oracle
    /// @param _config Silo config data
    function callSolvencyOracleBeforeQuote(ISiloConfig.ConfigData memory _config) internal {
    if (_config.callBeforeQuote && _config.solvencyOracle != address(0)) {
    ISiloOracle(_config.solvencyOracle).beforeQuote(_config.token);
    }
    }
    /// @dev Call `beforeQuote` on the `maxLtvOracle` oracle
    /// @param _config Silo config data
    function callMaxLtvOracleBeforeQuote(ISiloConfig.ConfigData memory _config) internal {
    if (_config.callBeforeQuote && _config.maxLtvOracle != address(0)) {
    ISiloOracle(_config.maxLtvOracle).beforeQuote(_config.token);
    }
    }
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 17 of 51 : ISiloConfig.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {ISilo} from "./ISilo.sol";
    import {ICrossReentrancyGuard} from "./ICrossReentrancyGuard.sol";
    interface ISiloConfig is ICrossReentrancyGuard {
    struct InitData {
    /// @notice Can be address zero if deployer fees are not to be collected. If deployer address is zero then
    /// deployer fee must be zero as well. Deployer will be minted an NFT that gives the right to claim deployer
    /// fees. NFT can be transferred with the right to claim.
    address deployer;
    /// @notice Address of the hook receiver called on every before/after action on Silo. Hook contract also
    /// implements liquidation logic and veSilo gauge connection.
    address hookReceiver;
    /// @notice Deployer's fee in 18 decimals points. Deployer will earn this fee based on the interest earned
    /// by the Silo. Max deployer fee is set by the DAO. At deployment it is 15%.
    uint256 deployerFee;
    /// @notice DAO's fee in 18 decimals points. DAO will earn this fee based on the interest earned
    /// by the Silo. Acceptable fee range fee is set by the DAO. Default at deployment is 5% - 50%.
    uint256 daoFee;
    /// @notice Address of the first token
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 18 of 51 : ICrossReentrancyGuard.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    interface ICrossReentrancyGuard {
    error CrossReentrantCall();
    error CrossReentrancyNotActive();
    /// @notice only silo method for cross Silo reentrancy
    function turnOnReentrancyProtection() external;
    /// @notice only silo method for cross Silo reentrancy
    function turnOffReentrancyProtection() external;
    /// @notice view method for checking cross Silo reentrancy flag
    /// @return entered true if the reentrancy guard is currently set to "entered", which indicates there is a
    /// `nonReentrant` function in the call stack.
    function reentrancyGuardEntered() external view returns (bool entered);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 19 of 51 : Strings.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // 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;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 20 of 51 : ISilo.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {IERC4626, IERC20, IERC20Metadata} from "openzeppelin5/interfaces/IERC4626.sol";
    import {IERC3156FlashLender} from "./IERC3156FlashLender.sol";
    import {ISiloConfig} from "./ISiloConfig.sol";
    import {ISiloFactory} from "./ISiloFactory.sol";
    import {IHookReceiver} from "./IHookReceiver.sol";
    // solhint-disable ordering
    interface ISilo is IERC20, IERC4626, IERC3156FlashLender {
    /// @dev Interest accrual happens on each deposit/withdraw/borrow/repay. View methods work on storage that might be
    /// outdate. Some calculations require accrued interest to return current state of Silo. This struct is used
    /// to make a decision inside functions if interest should be accrued in memory to work on updated values.
    enum AccrueInterestInMemory {
    No,
    Yes
    }
    /// @dev Silo has two separate oracles for solvency and maxLtv calculations. MaxLtv oracle is optional. Solvency
    /// oracle can also be optional if asset is used as denominator in Silo config. For example, in ETH/USDC Silo
    /// one could setup only solvency oracle for ETH that returns price in USDC. Then USDC does not need an oracle
    /// because it's used as denominator for ETH and it's "price" can be assume as 1.
    enum OracleType {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 21 of 51 : TokenHelper.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.28;
    import {IERC20Metadata} from "openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol";
    import {IsContract} from "./IsContract.sol";
    library TokenHelper {
    uint256 private constant _BYTES32_SIZE = 32;
    error TokenIsNotAContract();
    function assertAndGetDecimals(address _token) internal view returns (uint256) {
    (bool hasMetadata, bytes memory data) =
    _tokenMetadataCall(_token, abi.encodeCall(IERC20Metadata.decimals, ()));
    // decimals() is optional in the ERC20 standard, so if metadata is not accessible
    // we assume there are no decimals and use 0.
    if (!hasMetadata) {
    return 0;
    }
    return abi.decode(data, (uint8));
    }
    /// @dev Returns the symbol for the provided ERC20 token.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 22 of 51 : IERC20Permit.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
    * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
    *
    * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
    * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
    * need to send a transaction, and thus is not required to hold Ether at all.
    *
    * ==== Security Considerations
    *
    * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
    * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
    * considered as an intention to spend the allowance in any specific way. The second is that because permits have
    * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
    * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
    * generally recommended is:
    *
    * ```solidity
    * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
    * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
    * doThing(..., value);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 23 of 51 : ECDSA.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
    *
    * These functions can be used to verify that a message was signed by the holder
    * of the private keys of a given address.
    */
    library ECDSA {
    enum RecoverError {
    NoError,
    InvalidSignature,
    InvalidSignatureLength,
    InvalidSignatureS
    }
    /**
    * @dev The signature derives the `address(0)`.
    */
    error ECDSAInvalidSignature();
    /**
    * @dev The signature has an invalid length.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 24 of 51 : EIP712.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
    pragma solidity ^0.8.20;
    import {MessageHashUtils} from "./MessageHashUtils.sol";
    import {ShortStrings, ShortString} from "../ShortStrings.sol";
    import {IERC5267} from "../../interfaces/IERC5267.sol";
    /**
    * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
    *
    * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
    * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
    * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
    * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
    *
    * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
    * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
    * ({_hashTypedDataV4}).
    *
    * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
    * the chain id to protect against replay attacks on an eventual fork of the chain.
    *
    * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
    * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 25 of 51 : Nonces.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Provides tracking nonces for addresses. Nonces will only increment.
    */
    abstract contract Nonces {
    /**
    * @dev The nonce used for an `account` is not the expected current nonce.
    */
    error InvalidAccountNonce(address account, uint256 currentNonce);
    mapping(address account => uint256) private _nonces;
    /**
    * @dev Returns the next unused nonce for an address.
    */
    function nonces(address owner) public view virtual returns (uint256) {
    return _nonces[owner];
    }
    /**
    * @dev Consumes a nonce.
    *
    * Returns the current value and increments nonce.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 26 of 51 : EIP712Upgradeable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
    pragma solidity ^0.8.20;
    import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
    import {IERC5267} from "@openzeppelin/contracts/interfaces/IERC5267.sol";
    import {Initializable} from "../../proxy/utils/Initializable.sol";
    /**
    * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data.
    *
    * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
    * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
    * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
    * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
    *
    * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
    * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
    * ({_hashTypedDataV4}).
    *
    * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
    * the chain id to protect against replay attacks on an eventual fork of the chain.
    *
    * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
    * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 27 of 51 : NoncesUpgradeable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
    pragma solidity ^0.8.20;
    import {Initializable} from "../proxy/utils/Initializable.sol";
    /**
    * @dev Provides tracking nonces for addresses. Nonces will only increment.
    */
    abstract contract NoncesUpgradeable is Initializable {
    /**
    * @dev The nonce used for an `account` is not the expected current nonce.
    */
    error InvalidAccountNonce(address account, uint256 currentNonce);
    /// @custom:storage-location erc7201:openzeppelin.storage.Nonces
    struct NoncesStorage {
    mapping(address account => uint256) _nonces;
    }
    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Nonces")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00;
    function _getNoncesStorage() private pure returns (NoncesStorage storage $) {
    assembly {
    $.slot := NoncesStorageLocation
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 28 of 51 : Initializable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
    * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
    * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
    * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
    *
    * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
    * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
    * case an upgrade adds a module that needs to be initialized.
    *
    * For example:
    *
    * [.hljs-theme-light.nopadding]
    * ```solidity
    * contract MyToken is ERC20Upgradeable {
    * function initialize() initializer public {
    * __ERC20_init("MyToken", "MTK");
    * }
    * }
    *
    * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 29 of 51 : IERC20.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
    pragma solidity ^0.8.20;
    /**
    * @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.
    */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 30 of 51 : IERC20Metadata.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
    pragma solidity ^0.8.20;
    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);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 31 of 51 : ContextUpgradeable.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
    pragma solidity ^0.8.20;
    import {Initializable} from "../proxy/utils/Initializable.sol";
    /**
    * @dev Provides information about the current execution context, including the
    * sender of the transaction and its data. While these are generally available
    * via msg.sender and msg.data, they should not be accessed in such a direct
    * manner, since when dealing with meta-transactions the account sending and
    * paying for execution may not be the actual sender (as far as an application
    * is concerned).
    *
    * This contract is only required for intermediate, library-like contracts.
    */
    abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }
    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
    return msg.sender;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 32 of 51 : draft-IERC6093.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Standard ERC-20 Errors
    * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
    */
    interface IERC20Errors {
    /**
    * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
    * @param sender Address whose tokens are being transferred.
    * @param balance Current balance for the interacting account.
    * @param needed Minimum amount required to perform a transfer.
    */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
    /**
    * @dev Indicates a failure with the token `sender`. Used in transfers.
    * @param sender Address whose tokens are being transferred.
    */
    error ERC20InvalidSender(address sender);
    /**
    * @dev Indicates a failure with the token `receiver`. Used in transfers.
    * @param receiver Address to which tokens are being transferred.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 33 of 51 : Context.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Provides information about the current execution context, including the
    * sender of the transaction and its data. While these are generally available
    * via msg.sender and msg.data, they should not be accessed in such a direct
    * manner, since when dealing with meta-transactions the account sending and
    * paying for execution may not be the actual sender (as far as an application
    * is concerned).
    *
    * This contract is only required for intermediate, library-like contracts.
    */
    abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
    return msg.sender;
    }
    function _msgData() internal view virtual returns (bytes calldata) {
    return msg.data;
    }
    function _contextSuffixLength() internal view virtual returns (uint256) {
    return 0;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 34 of 51 : CrossReentrancyGuard.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity 0.8.28;
    import {ICrossReentrancyGuard} from "../interfaces/ICrossReentrancyGuard.sol";
    abstract contract CrossReentrancyGuard is ICrossReentrancyGuard {
    uint256 private constant _NOT_ENTERED = 0;
    uint256 private constant _ENTERED = 1;
    uint256 private transient _crossReentrantStatus;
    /// @inheritdoc ICrossReentrancyGuard
    function turnOnReentrancyProtection() external virtual {
    _onlySiloOrTokenOrHookReceiver();
    require(_crossReentrantStatus != _ENTERED, CrossReentrantCall());
    _crossReentrantStatus = _ENTERED;
    }
    /// @inheritdoc ICrossReentrancyGuard
    function turnOffReentrancyProtection() external virtual {
    _onlySiloOrTokenOrHookReceiver();
    // Leaving it unprotected may lead to a bug in the reentrancy protection system,
    // as it can be used in the function without activating the protection before deactivating it.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 35 of 51 : ISiloOracle.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    interface ISiloOracle {
    /// @notice Hook function to call before `quote` function reads price
    /// @dev This hook function can be used to change state right before the price is read. For example it can be used
    /// for curve read only reentrancy protection. In majority of implementations this will be an empty function.
    /// WARNING: reverts are propagated to Silo so if `beforeQuote` reverts, Silo reverts as well.
    /// @param _baseToken Address of priced token
    function beforeQuote(address _baseToken) external;
    /// @return quoteAmount Returns quote price for _baseAmount of _baseToken
    /// @param _baseAmount Amount of priced token
    /// @param _baseToken Address of priced token
    function quote(uint256 _baseAmount, address _baseToken) external view returns (uint256 quoteAmount);
    /// @return address of token in which quote (price) is denominated
    function quoteToken() external view returns (address);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 36 of 51 : Math.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
    pragma solidity ^0.8.20;
    import {Panic} from "../Panic.sol";
    import {SafeCast} from "./SafeCast.sol";
    /**
    * @dev Standard math utilities missing in the Solidity language.
    */
    library Math {
    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 success flag (no overflow).
    */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
    unchecked {
    uint256 c = a + b;
    if (c < a) return (false, 0);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 37 of 51 : SignedMath.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // 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.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 38 of 51 : IERC4626.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)
    pragma solidity ^0.8.20;
    import {IERC20} from "../token/ERC20/IERC20.sol";
    import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol";
    /**
    * @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in
    * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
    */
    interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
    event Withdraw(
    address indexed sender,
    address indexed receiver,
    address indexed owner,
    uint256 assets,
    uint256 shares
    );
    /**
    * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 39 of 51 : IERC3156FlashLender.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol";
    /// @notice https://eips.ethereum.org/EIPS/eip-3156
    interface IERC3156FlashLender {
    /// @notice Protected deposits are not available for a flash loan.
    /// During the execution of the flashloan, Silo methods are not taking into consideration the fact,
    /// that some (or all) tokens were transferred as flashloan, therefore some methods can return invalid state
    /// eg. maxWithdraw can return amount that are not available to withdraw during flashlon.
    /// @dev Initiate a flash loan.
    /// @param _receiver The receiver of the tokens in the loan, and the receiver of the callback.
    /// @param _token The loan currency.
    /// @param _amount The amount of tokens lent.
    /// @param _data Arbitrary data structure, intended to contain user-defined parameters.
    function flashLoan(IERC3156FlashBorrower _receiver, address _token, uint256 _amount, bytes calldata _data)
    external
    returns (bool);
    /// @dev The amount of currency available to be lent.
    /// @param _token The loan currency.
    /// @return The amount of `token` that can be borrowed.
    function maxFlashLoan(address _token) external view returns (uint256);
    /// @dev The fee to be charged for a given loan.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 40 of 51 : ISiloFactory.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    import {IERC721} from "openzeppelin5/interfaces/IERC721.sol";
    import {ISiloConfig} from "./ISiloConfig.sol";
    interface ISiloFactory is IERC721 {
    struct Range {
    uint128 min;
    uint128 max;
    }
    /// @notice Emitted on the creation of a Silo.
    /// @param implementation Address of the Silo implementation.
    /// @param token0 Address of the first Silo token.
    /// @param token1 Address of the second Silo token.
    /// @param silo0 Address of the first Silo.
    /// @param silo1 Address of the second Silo.
    /// @param siloConfig Address of the SiloConfig.
    event NewSilo(
    address indexed implementation,
    address indexed token0,
    address indexed token1,
    address silo0,
    address silo1,
    address siloConfig
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 41 of 51 : IsContract.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: BUSL-1.1
    pragma solidity ^0.8.24;
    library IsContract {
    /**
    * @dev Returns true if `account` is a contract.
    *
    * [IMPORTANT]
    * ====
    * It is unsafe to assume that an address for which this function returns
    * false is an externally-owned account (EOA) and not a contract.
    *
    * Among others, `isContract` will return false for the following
    * types of addresses:
    *
    * - an externally-owned account
    * - a contract in construction
    * - an address where a contract will be created
    * - an address where a contract lived, but was destroyed
    *
    * Furthermore, `isContract` will also return true if the target contract within
    * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
    * which only has an effect at the end of a transaction.
    * ====
    *
    * [IMPORTANT]
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 42 of 51 : MessageHashUtils.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
    pragma solidity ^0.8.20;
    import {Strings} from "../Strings.sol";
    /**
    * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
    *
    * The library provides methods for generating a hash of a message that conforms to the
    * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
    * specifications.
    */
    library MessageHashUtils {
    /**
    * @dev Returns the keccak256 digest of an ERC-191 signed data with version
    * `0x45` (`personal_sign` messages).
    *
    * The digest is calculated by prefixing a bytes32 `messageHash` with
    * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
    * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
    *
    * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
    * keccak256, although any bytes32 value can be safely used because the final digest will
    * be re-hashed.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 43 of 51 : ShortStrings.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)
    pragma solidity ^0.8.20;
    import {StorageSlot} from "./StorageSlot.sol";
    // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
    // | length | 0x BB |
    type ShortString is bytes32;
    /**
    * @dev This library provides functions to convert short memory strings
    * into a `ShortString` type that can be used as an immutable variable.
    *
    * Strings of arbitrary length can be optimized using this library if
    * they are short enough (up to 31 bytes) by packing them with their
    * length (1 byte) in a single EVM word (32 bytes). Additionally, a
    * fallback mechanism can be used for every other case.
    *
    * Usage example:
    *
    * ```solidity
    * contract Named {
    * using ShortStrings for *;
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 44 of 51 : IERC5267.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)
    pragma solidity ^0.8.20;
    interface IERC5267 {
    /**
    * @dev MAY be emitted to signal that the domain could have changed.
    */
    event EIP712DomainChanged();
    /**
    * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
    * signature.
    */
    function eip712Domain()
    external
    view
    returns (
    bytes1 fields,
    string memory name,
    string memory version,
    uint256 chainId,
    address verifyingContract,
    bytes32 salt,
    uint256[] memory extensions
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 45 of 51 : Panic.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.20;
    /**
    * @dev Helper library for emitting standardized panic codes.
    *
    * ```solidity
    * contract Example {
    * using Panic for uint256;
    *
    * // Use any of the declared internal constants
    * function foo() { Panic.GENERIC.panic(); }
    *
    * // Alternatively
    * function foo() { Panic.panic(Panic.GENERIC); }
    * }
    * ```
    *
    * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
    */
    // slither-disable-next-line unused-state
    library Panic {
    /// @dev generic / unspecified error
    uint256 internal constant GENERIC = 0x00;
    /// @dev used by the assert() builtin
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 46 of 51 : SafeCast.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)
    // This file was procedurally generated from scripts/generate/templates/SafeCast.js.
    pragma solidity ^0.8.20;
    /**
    * @dev Wrappers over Solidity's uintXX/intXX/bool 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.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 47 of 51 : IERC3156FlashBorrower.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.5.0;
    interface IERC3156FlashBorrower {
    /// @notice During the execution of the flashloan, Silo methods are not taking into consideration the fact,
    /// that some (or all) tokens were transferred as flashloan, therefore some methods can return invalid state
    /// eg. maxWithdraw can return amount that are not available to withdraw during flashlon.
    /// @dev Receive a flash loan.
    /// @param _initiator The initiator of the loan.
    /// @param _token The loan currency.
    /// @param _amount The amount of tokens lent.
    /// @param _fee The additional amount of tokens to repay.
    /// @param _data Arbitrary data structure, intended to contain user-defined parameters.
    /// @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan"
    function onFlashLoan(address _initiator, address _token, uint256 _amount, uint256 _fee, bytes calldata _data)
    external
    returns (bytes32);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 48 of 51 : IERC721.sol
    1
    2
    3
    4
    5
    6
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol)
    pragma solidity ^0.8.20;
    import {IERC721} from "../token/ERC721/IERC721.sol";
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 49 of 51 : StorageSlot.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
    // This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
    pragma solidity ^0.8.20;
    /**
    * @dev Library for reading and writing primitive types to specific storage slots.
    *
    * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
    * This library helps with reading and writing to such slots without the need for inline assembly.
    *
    * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
    *
    * Example usage to set ERC-1967 implementation slot:
    * ```solidity
    * contract ERC1967 {
    * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
    *
    * function _getImplementation() internal view returns (address) {
    * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    * }
    *
    * function _setImplementation(address newImplementation) internal {
    * require(newImplementation.code.length > 0);
    * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 50 of 51 : IERC721.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
    pragma solidity ^0.8.20;
    import {IERC165} from "../../utils/introspection/IERC165.sol";
    /**
    * @dev Required interface of an ERC-721 compliant contract.
    */
    interface IERC721 is IERC165 {
    /**
    * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
    */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    /**
    * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
    */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    /**
    * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
    */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    File 51 of 51 : IERC165.sol
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    // SPDX-License-Identifier: MIT
    // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
    pragma solidity ^0.8.20;
    /**
    * @dev Interface of the ERC-165 standard, as defined in the
    * https://eips.ethereum.org/EIPS/eip-165[ERC].
    *
    * Implementers can declare support of contract interfaces, which can then be
    * queried by others ({ERC165Checker}).
    *
    * For an implementation, see {ERC165}.
    */
    interface IERC165 {
    /**
    * @dev Returns true if this contract implements the interface defined by
    * `interfaceId`. See the corresponding
    * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
    * to learn more about how these ids are created.
    *
    * This function call must use less than 30 000 gas.
    */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Settings
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    {
    "remappings": [
    "forge-std/=gitmodules/forge-std/src/",
    "silo-foundry-utils/=gitmodules/silo-foundry-utils/contracts/",
    "properties/=gitmodules/crytic/properties/contracts/",
    "silo-core/=silo-core/",
    "silo-oracles/=silo-oracles/",
    "silo-vaults/=silo-vaults/",
    "ve-silo/=ve-silo/",
    "@openzeppelin/=gitmodules/openzeppelin-contracts-5/contracts/",
    "morpho-blue/=gitmodules/morpho-blue/src/",
    "openzeppelin5/=gitmodules/openzeppelin-contracts-5/contracts/",
    "openzeppelin5-upgradeable/=gitmodules/openzeppelin-contracts-upgradeable-5/contracts/",
    "chainlink/=gitmodules/chainlink/contracts/src/",
    "chainlink-ccip/=gitmodules/chainlink-ccip/contracts/src/",
    "uniswap/=gitmodules/uniswap/",
    "@uniswap/v3-core/=gitmodules/uniswap/v3-core/",
    "balancer-labs/v2-solidity-utils/=external/balancer-v2-monorepo/pkg/solidity-utils/contracts/",
    "balancer-labs/v2-interfaces/=external/balancer-v2-monorepo/pkg/interfaces/contracts/",
    "balancer-labs/v2-liquidity-mining/=external/balancer-v2-monorepo/pkg/liquidity-mining/contracts/",
    "@balancer-labs/=node_modules/@balancer-labs/",
    "@ensdomains/=node_modules/@ensdomains/",
    "@openzeppelin/contracts-upgradeable/=gitmodules/openzeppelin-contracts-upgradeable-5/contracts/",
    "@openzeppelin/contracts/=gitmodules/openzeppelin-contracts-5/contracts/",
    "@solidity-parser/=node_modules/@solidity-parser/",
    "ERC4626/=gitmodules/crytic/properties/lib/ERC4626/contracts/",
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Contract ABI

    [{"inputs":[],"name":"AmountExceedsAllowance","type":"error"},{"inputs":[],"name":"CrossReentrantCall","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"OnlyHookReceiver","type":"error"},{"inputs":[],"name":"OnlySilo","type":"error"},{"inputs":[],"name":"OnlySiloConfig","type":"error"},{"inputs":[],"name":"OwnerIsZero","type":"error"},{"inputs":[],"name":"RecipientIsZero","type":"error"},{"inputs":[],"name":"RecipientNotSolventAfterTransfer","type":"error"},{"inputs":[],"name":"SenderNotSolventAfterTransfer","type":"error"},{"inputs":[],"name":"ZeroTransfer","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"notificationReceiver","type":"address"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"}],"name":"NotificationSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"ReceiveApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"result","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":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOfAndTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"enum ISilo.CallType","name":"_callType","type":"uint8"},{"internalType":"bytes","name":"_input","type":"bytes"}],"name":"callOnBehalfOfShareToken","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_subtractedValue","type":"uint256"}],"name":"decreaseReceiveAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forwardTransferFromNoChecks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"hookReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hookSetup","outputs":[{"components":[{"internalType":"address","name":"hookReceiver","type":"address"},{"internalType":"uint24","name":"hooksBefore","type":"uint24"},{"internalType":"uint24","name":"hooksAfter","type":"uint24"},{"internalType":"uint24","name":"tokenType","type":"uint24"}],"internalType":"struct IShareToken.HookSetup","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_addedValue","type":"uint256"}],"name":"increaseReceiveAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISilo","name":"_silo","type":"address"},{"internalType":"address","name":"_hookReceiver","type":"address"},{"internalType":"uint24","name":"_tokenType","type":"uint24"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"receiveAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setReceiveApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"silo","outputs":[{"internalType":"contract ISilo","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"siloConfig","outputs":[{"internalType":"contract ISiloConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"_hooksBefore","type":"uint24"},{"internalType":"uint24","name":"_hooksAfter","type":"uint24"}],"name":"synchronizeHooks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

    [ Download: CSV Export  ]
    [ Download: CSV Export  ]

    A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.