VaultV3DummyImplementation

Description:

Proxy contract enabling upgradeable smart contract patterns. Delegates calls to an implementation contract.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/dummy-implementations/InstaLiteV3.sol": {
      "content": "//SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import {Structs} from "./structs.sol";

contract IUserModule {
    /**
     * @dev Returns total underlying assets of the vault.
     */
    function totalAssets() public view returns (uint256) {}

    /**
     * @dev See {IERC4626-deposit}.
     * @dev User function to deposit.
     * @param assets_ amount to supply.
     * @param receiver_ address to send iTokens to.
     * @return shares_ amount of iTokens sent to the `receiver_` address passed
     */
    function deposit(
        uint256 assets_,
        address receiver_
    ) public returns (uint256 shares_) {}

    /**
     * @dev See {IERC4626-mint}.
     * @dev User function to mint.
     * @param shares_ amount to iToken shares to mint.
     * @param receiver_ address to send iTokens to.
     * @return assets_ amount of underlying assets sent to the `receiver_` address passed
     */
    function mint(
        uint256 shares_,
        address receiver_
    ) public returns (uint256 assets_) {}

    /**
     * @dev See {IERC4626-withdraw}.
     * @dev User function to withdraw.
     * @param assets_ amount to withdraw.
     * @param receiver_ address to send withdrawn amount to.
     * @param owner_ address of owner whose shares will be burned.
     * @return shares_ amount of iTokens burned of owner.
     */
    function withdraw(
        uint256 assets_,
        address receiver_,
        address owner_
    ) public returns (uint256 shares_) {}

    /**
     * @dev See {IERC4626-redeem}.
     * @dev User function to redeem.
     * @param shares_ amount of shares to redeem.
     * @param receiver_ address to send underlying withdrawn amount to.
     * @param owner_ address of owner whose shares will be burned.
     * @return assetsAfterFee_ underlying tokens sent to the receiver after withdraw fee.
     */
    function redeem(
        uint256 shares_,
        address receiver_,
        address owner_
    ) public returns (uint256 assetsAfterFee_) {}

    /**
     * @notice Vault token initializer
     * @param name_ The name of the vault token.
     * @param symbol_ The symbol of the vault token.
     * @param asset_ The address of the asset.
     */
    function initialize2(
        string memory name_,
        string memory symbol_,
        address asset_
    ) public {}

    /// Emitted whenever a user withdraws assets and a fee is collected.
    event LogWithdrawFeeCollected(address indexed payer, uint256 indexed fee);

    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
    );
}

contract IDSAModule {
    /**
     * @dev Admin Spell function
     * @param to_ target address
     * @param calldata_ function calldata
     * @param value_ function msg.value
     * @param operation_ .call or .delegate. (0 => .call, 1 => .delegateCall)
     */
    function spell(
        address to_,
        bytes memory calldata_,
        uint256 value_,
        uint256 operation_
    ) external payable {}

    /**
     * @dev Admin function to add auth on DSA
     * @param auth_ new auth address for DSA
     */
    function addDSAAuth(address auth_) external {}
}

contract IAdminModule {
    /**
     * @notice Vault owner and secondary wuth can update the secondary auth.
     * @param secondaryAuth_ New secondary auth to set.
     */
    function updateSecondaryAuth(address secondaryAuth_) public {}

    /**
     * @notice Auth can add or remove allowed rebalancers
     * @param rebalancer_ the address for the rebalancer to set the flag for
     * @param isRebalancer_ flag for if rebalancer is allowed or not
     */
    function updateRebalancer(
        address rebalancer_,
        bool isPrimaryRebalancer_,
        bool isRebalancer_
    ) public {}

    /**
     * @notice Auth can update the risk ratio for each protocol.
     * @param protocolId_ The Id of the protocol to update the risk ratio.
     * @param newRiskRatio_ New risk ratio of the protocol in terms of debt and collateral, scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     */
    function updateMaxRiskRatio(
        uint8[] memory protocolId_,
        uint256[] memory newRiskRatio_
    ) public {}

    /**
     * @notice Secondary auth can lower the risk ratio of any protocol.
     * @param protocolId_ The Id of the protocol to reduce the risk ratio.
     * @param newRiskRatio_ New risk ratio of the protocol in terms of debt and collateral, scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     */
    function reduceMaxRiskRatio(
        uint8[] memory protocolId_,
        uint256[] memory newRiskRatio_
    ) public {}

    /**
     * @notice Auth can update the max risk ratio set for the vault.
     * @param newAggrMaxVaultRatio_ New aggregated max ratio of the vault. Scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     */
    function updateAggrMaxVaultRatio(uint256 newAggrMaxVaultRatio_) public {}

    /**
     * @notice Secondary auth can reduce the max risk ratio set for the vault.
     * @param newAggrMaxVaultRatio_ New aggregated max ratio of the vault. Scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     */
    function reduceAggrMaxVaultRatio(uint256 newAggrMaxVaultRatio_) public {}

    /**
     * @notice Auth can pause or resume all functionality of the vault.
     * @param status_ New status of the vault.
     * Note status = 1 => Vault functions are enabled; status = 2 => Vault functions are paused.
     */
    function changeVaultStatus(uint8 status_) public {}

    /**
     * @notice Auth can update the revenue and withdrawal fee percentage.
     * @param revenueFeePercent_ New revenue fee percentage, scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     * @param withdrawalFeePercent_ New withdrawal fee percentage, scaled to use basis points. i.e 1e4 = 100%, 1e2 = 1%
     * @param withdrawFeeAbsoluteMin_ New withdraw fee absolute. 1 USDT = 1e6, 0.01 USDT = 1e4
     */
    function updateFees(
        uint256 revenueFeePercent_,
        uint256 withdrawalFeePercent_,
        uint256 withdrawFeeAbsoluteMin_
    ) public {}

    /**
     * @notice Auth can update the address that collected revenue.
     * @param newTreasury_ Address that will collect the revenue.
     */
    function updateTreasury(address newTreasury_) public {}

    /**
     * @notice Secondary auth can update the fluid vault details.
     * @param protocolId_ The Id of the protocol to update the fluid vault details.
     * @param vaultAddress_ The address of the vault to update the fluid vault details.
     * @param nftId_ The NFT Id of the vault to update the fluid vault details.
     */
    function updateFluidVaultDetails(
        uint8 protocolId_,
        address vaultAddress_,
        uint256 nftId_
    ) public {}

    /**
     * @notice Secondary auth can update the rates.
     * @param newMinRate_ The new min rate to set.
     * @param newMaxRate_ The new max rate to set.
     */
    function updateRates(uint256 newMinRate_, uint256 newMaxRate_) public {}

    /**
     * @notice Secondary auth can update the max daily swap limit.
     * @param newMaxDailySwapLimit_ The new max daily swap limit to set.
     */
    function updateMaxDailySwapLimit(uint256 newMaxDailySwapLimit_) public {}

    /**
     * @notice Secondary auth can update the max swap loss percentage.
     * @param newMaxSwapLossPercentage_ The new max swap loss percentage to set.
     */
    function updateMaxSwapLossPercentage(uint256 newMaxSwapLossPercentage_) public {}

    /**
     * @notice Admin function to initialize the vault.
     * @param secondaryAuth_ Secondary auth for vault.
     * @param treasury_ Address that collects vault's revenue.
     * @param primaryRebalancer_ Primary rebalancer for vault.
     * @param secondaryRebalancer_ Secondary rebalancer for vault.
     * @param fluidVaultDetails_ Fluid vault details.
     * @param maxRiskRatios_ Max risk ratios for protocols.
     * @param aggrMaxVaultRatio_ Aggregated max ratio of the vault.
     * @param revenueFeePercentage_ Revenue fee percentage.
     * @param withdrawalFeePercentage_ Withdrawal fee percentage.
     * @param withdrawFeeAbsoluteMin_ Withdraw fee absolute.
     * @param minRate_ Min rate.
     * @param maxRate_ Max rate.
     */
    function initialize(
        address secondaryAuth_,
        address treasury_,
        address primaryRebalancer_,
        address secondaryRebalancer_,
        Structs.FluidVaultDetails[] memory fluidVaultDetails_,
        uint256[] memory maxRiskRatios_,
        uint256 aggrMaxVaultRatio_,
        uint256 revenueFeePercentage_,
        uint256 withdrawalFeePercentage_,
        uint256 withdrawFeeAbsoluteMin_,
        uint256 minRate_,
        uint256 maxRate_
    ) public {}

    /// @notice Emitted when rebalancer is added or removed.
    event LogUpdateRebalancer(
        address indexed rebalancer,
        bool indexed isPrimaryRebalancer,
        bool indexed isRebalancer
    );

    /// @notice Emitted when vault's functionality is paused or resumed.
    event LogChangeStatus(uint8 indexed status);

    /// @notice Emitted when the revenue or withdrawal fee is updated.
    event LogUpdateFees(
        uint256 indexed revenueFeePercentage,
        uint256 indexed withdrawalFeePercentage,
        uint256 indexed withdrawFeeAbsoluteMin
    );

    /// @notice Emitted when the protocol's risk ratio is updated.
    event LogUpdateMaxRiskRatio(uint8 indexed protocolId, uint256 newRiskRatio);

    /// @notice Emitted whenever the address collecting the revenue is updated.
    event LogUpdateTreasury(
        address indexed oldTreasury,
        address indexed newTreasury
    );

    /// @notice Emitted when secondary auth is updated.
    event LogUpdateSecondaryAuth(
        address indexed oldSecondaryAuth,
        address indexed secondaryAuth
    );

    /// @notice Emitted when max vault ratio is updated.
    event LogUpdateAggrMaxVaultRatio(
        uint256 indexed oldAggrMaxVaultRatio,
        uint256 indexed aggrMaxVaultRatio
    );

    /// @notice Emitted when max vault ratio is updated.
    event LogUpdateMaxSwapUnitAmountLimit(
        uint256 indexed oldLimit,
        uint256 indexed newLimit
    );

    /// @notice Emitted when fluid vault details are updated.
    event LogUpdateFluidVaultDetails(
        uint256 protocolId,
        address indexed vaultAddress,
        uint256 indexed nftId
    );

    /// @notice Emitted when rates are updated.
    event LogUpdateRates(uint256 newMinRate, uint256 newMaxRate);

    /// @notice Emitted when the max daily swap limit is updated.
    event LogUpdateMaxDailySwapLimit(uint256 oldMaxDailySwapLimit, uint256 newMaxDailySwapLimit);

    /// @notice Emitted when the max swap loss percentage is updated.
    event LogUpdateMaxSwapLossPercentage(uint256 oldMaxSwapLossPercentage, uint256 newMaxSwapLossPercentage);
}

contract IAssetsViewModule {
    using Structs for Structs.ProtocolAssetsInUsd;
    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getAaveV3Ratio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidWstUSRUSDCRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidWstUSRUSDTRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidWstUSRGHORatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSUSDeUSDCRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSUSDeUSDTRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSUSDeGHORatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSyrupUSDCUSDCRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSyrupUSDCUSDTRatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the vault.
     * @return assets_ The assets of the vault.
     * @return ratio_ The ratio of the vault.
     */
    function getFluidSyrupUSDCGHORatio()
        public
        view
        returns (Structs.ProtocolAssetsInUsd memory assets_, uint256 ratio_)
    {}

    /**
     * @notice Returns the ratio of the protocol.
     * @param protocolId_ The Id of the protocol to get the ratio.
     * @return ratio_ The ratio of the protocol.
     */
    function getProtocolRatio(
        uint8 protocolId_
    ) public view returns (uint256 ratio_) {}

    /**
     * @notice Returns the net assets of the vault.
     * @return totalAssets_ The total assets of the vault.
     * @return totalDebt_ The total debt of the vault.
     * @return netAssets_ The net assets of the vault.
     * @return aggregatedRatio_ The aggregated ratio of the vault.
     */
    function getNetAssets()
        public
        view
        returns (
            uint256 totalAssets_, // Total assets(collaterals + ideal balances) inlcuding reveune
            uint256 totalDebt_, // Total debt
            uint256 netAssets_, // Total assets - Total debt - reserves
            uint256 aggregatedRatio_ // Aggregated ratio of vault (Total debt/ (Total assets - reserves))
        )
    {}

    /**
     * @notice Returns the token exchange rate of the token.
     * @param tokenAddress_ The address of the token to get the exchange rate.
     * @return exchangeRate_ The exchange rate of the token.
     */
    function getTokenExchangeRate(address tokenAddress_) public view returns (uint256 exchangeRate_) {}
}

contract ILeverageModule {
    /**
     * @notice Leverage function to leverage the vault.
     * @param leverageParams_ The parameters for the leverage.
     */
    function leverage(
        Structs.LeverageParams memory leverageParams_
    ) public {}

    /// @notice Emitted when a leverage is performed.
    event LogLeverage(
        uint8 indexed protocolId,
        uint256 indexed debtFlashloanAmount,
        uint256 route,
        address debtToken,
        address colToken
    );
}

contract IRefinanceModule {
    using Structs for Structs.RefinanceParams;

    /**
     * @notice Refinance without swap
     * @param refinanceParams_ The parameters for the refinance without swap
     */
    function refinanceWithoutSwap(
        Structs.RefinanceParams memory refinanceParams_
    ) public {}

    /**
     * @notice Refinance with swap
     * @param refinanceParams_ The parameters for the refinance with swap
     */
    function refinanceWithSwap(
        Structs.RefinanceParams memory refinanceParams_
    ) public {}

    /// @notice Emitted when a refinance is performed.
    event LogRefinance(
        uint8 indexed fromProtocolId,
        uint8 indexed toProtocolId,
        address fromDebtToken,
        address toDebtToken,
        address fromCollateralToken,
        address toCollateralToken,
        uint256 fromColAmount,
        uint256 toColAmount,
        uint256 fromDebtAmount,
        uint256 toDebtAmount,
        uint256 route
    );
}

contract IRebalancerModule {
    /**
     * @notice Deposit a position into a protocol.
     * @param protocolId_ The protocol ID to which the position is being deposited.
     * @param depositTokenAddress_ The address of the token being deposited.
     * @param depositAmount_ The amount to be deposited into the protocol.
     * @param minBuyAmount_ The minimum amount to buy after the deposit.
     * @param swapConnectors_ The swap connectors to use.
     * @param swapCallDatas_ The swap call datas to use.
     */
    function vaultToProtocolDeposit(
        uint8 protocolId_,
        address depositTokenAddress_,
        uint256 depositAmount_,
        uint256 minBuyAmount_,
        string[] memory swapConnectors_,
        bytes[] memory swapCallDatas_
    ) public {}

    /**
     * @notice This function is used to fill the vault's balance enabling seamless user withdrawals.
     * @param protocolId_ The protocol ID to which the position is being deposited.
     * @param withdrawTokenAddress_ The address of the token being withdrawn.
     * @param withdrawAmount_ The amount to be withdrawn from the protocol.
     * @param minBuyAmount_ The minimum amount to buy after the withdrawal.
     * @param swapConnectors_ The addresses of the swap connectors to be used, pass empty array if not needed.
     * @param swapCallDatas_ The calldatas of the swap connectors to be used, pass empty array if not needed.
     */
    function fillVaultAvailability(
        uint8 protocolId_,
        address withdrawTokenAddress_,
        uint256 withdrawAmount_,
        uint256 minBuyAmount_,
        string[] memory swapConnectors_,
        bytes[] memory swapCallDatas_
    ) public {}

    /**
     * @notice Open function to collect the revenue stored.
     * @param amount_ Amount of `USDC` revenue to collect.
     * Note The amount will be transferred to the `treasury` address stored.
     */
    function collectRevenue(uint256 amount_) public {}

    /**
     * @notice Sets the exchange price and revenue based on current net assets(excluding revenue)
     * @dev This function also handles the revenue calculation and reserve updates.
     */
    function updateExchangePrice() public {}

    /**
     * @notice Toggles the Aave V3 e-mode for the vault
     * @param emodeId_ The e-mode ID to set
     */
    function toggleAaveV3EMode(uint256 emodeId_) public {}

    /// @notice Emitted when a position is deposited into a protocol.
    event LogVaultToProtocolDeposit(
        uint8 indexed protocolId,
        address indexed tokenAddress,
        uint256 depositAmount
    );

    /// @notice Emitted when the vault's balance is filled enabling seamless user withdrawals.
    event LogFillVaultAvailability(
        uint8 indexed protocolId,
        address tokenAddress,
        uint256 indexed withdrawAmount
    );

    /// @notice Emitted when the revenue is collected.
    event LogCollectRevenue(uint256 amount, address treasury);

    /// @notice Emitted when the exchange price is updated.
    event LogUpdateExchangePrice(
        uint256 oldExchangePrice,
        uint256 newExchangePrice,
        uint256 newGrossExchangePrice,
        uint256 revenueFeePercentage,
        uint256 floorExchangePrice,
        uint256 ceilExchangePrice,
        uint256 hurdleExchangePrice
    );

    /// @notice Emitted when the Aave V3 e-mode is toggled.
    event LogToggleAaveV3EMode(uint256 emodeId);
}

contract IVariablesReadModule {
    using Structs for Structs.FluidVaultDetails;

    /**
     * @notice DSA for this particular vault
     * @return vaultDSA_ The DSA for this particular vault
     */
    function vaultDSA() public view returns (address) {}

    /**
     * @notice Secondary auth that only has the power to reduce max risk ratio.
     * @return secondaryAuth_ The secondary auth of the vault
     */
    function secondaryAuth() public view returns (address) {}

    /**
     * @notice Exchange price of the vault
     * @return exchangePrice_ The exchange price of the vault
     */
    function exchangePrice() public view returns (uint256) {}

    /**
     * @notice Mapping to store allowed primary rebalancers
     * @param rebalancer_ The address of the rebalancer
     */
    function isPrimaryRebalancer(
        address rebalancer_
    ) public view returns (bool) {}

    /**
     * @notice Mapping to store allowed secondary rebalancers
     * @param rebalancer_ The address of the rebalancer
     */
    function isSecondaryRebalancer(
        address rebalancer_
    ) public view returns (bool) {}

    /**
     * @notice Mapping of protocol id => max risk ratio, scaled to factor 4.
     * @param protocolId_ The Id of the protocol to get the risk ratio.
     * @return riskRatio_ The risk ratio of the protocol.
     */
    function maxRiskRatio(uint8 protocolId_) public view returns (uint256) {}

    /**
     * @notice Max aggregated risk ratio of the vault that can be reached, scaled to factor 4.
     * @return aggrMaxVaultRatio_ The aggregated max ratio of the vault.
     */
    function aggrMaxVaultRatio() public view returns (uint256) {}

    /**
     * @notice Withdraw fee is either amount in percentage or absolute minimum. This var defines the percentage in 1e6
     * @return withdrawalFeePercentage_ The withdrawal fee percentage of the vault, scaled to factor 4. i.e 1e6 = 100%, 1e4 = 1%
     */
    function withdrawalFeePercentage() public view returns (uint256) {}

    /**
     * @notice Withdraw fee is either amount in percentage or absolute minimum. This var defines the absolute minimum
     * @return withdrawFeeAbsoluteMin_ The withdraw fee absolute min of the vault
     */
    function withdrawFeeAbsoluteMin() public view returns (uint256) {}

    /**
     * @notice Revenue fee percentage of the vault, scaled to factor 4.
     * @return revenueFeePercentage_ The revenue fee percentage of the vault
     */
    function revenueFeePercentage() public view returns (uint256) {} // in 1e6

    /**
     * @notice Reserves of the vault, also serve a purpose to cover unknown users losses
     * @return reserves_ The reserves of the vault
     */
    function reserves() public view returns (int256) {}

    /**
     * @notice Min rate of the vault
     * @return minRate_ The min rate of the vault
     */
    function minRate() public view returns (uint256) {}

    /**
     * @notice Max rate of the vault
     * @return maxRate_ The max rate of the vault
     */
    function maxRate() public view returns (uint256) {}

    /**
     * @notice Treasury address of the vault
     * @return treasury_ The treasury address of the vault
     */
    function treasury() public view returns (address) {}

    /**
     * @notice Mapping of protocol id => fluid vault details
     * @param protocolId_ The Id of the protocol to get the fluid vault details
     * @return fluidVaultDetails_ The fluid vault details of the protocol
     */
    function fluidVaultDetails(
        uint8 protocolId_
    ) public view returns (Structs.FluidVaultDetails memory) {}

    /**
     * @notice Max daily swap limit of the vault
     * @return maxDailySwapLimit_ The max daily swap limit of the vault
     */
    function maxDailySwapLimit() public view returns (uint256) {}

    /**
     * @notice Max swap loss percentage of the vault
     * @return maxSwapLossPercentage_ The max swap loss percentage of the vault
     */
    function maxSwapLossPercentage() public view returns (uint256) {}
}

contract IERC4626Functions {
    function decimals() public view returns (uint8) {}

    function asset() public view returns (address) {}

    function convertToShares(
        uint256 assets
    ) public view returns (uint256 shares) {}

    function convertToAssets(
        uint256 shares
    ) public view returns (uint256 assets) {}

    function maxDeposit(address) public view returns (uint256) {}

    function maxMint(address) public view returns (uint256) {}

    function maxWithdraw(address owner) public view returns (uint256) {}

    function maxRedeem(address owner) public view returns (uint256) {}

    function previewDeposit(uint256 assets) public view returns (uint256) {}

    function previewMint(uint256 shares) public view returns (uint256) {}

    function previewWithdraw(uint256 assets) public view returns (uint256) {}

    function previewRedeem(uint256 shares) public view returns (uint256) {}
}

contract IERC20Functions {
    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    function name() public view returns (string memory) {}

    function symbol() public view returns (string memory) {}

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() public view returns (uint256) {}

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) public view returns (uint256) {}

    /**
     * @dev Moves `amount` 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 amount) public 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
    ) public view returns (uint256) {}

    /**
     * @dev Sets `amount` 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 amount) public returns (bool) {}

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount
    ) public returns (bool) {}

    function increaseAllowance(
        address spender,
        uint256 addedValue
    ) public returns (bool) {}

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(
        address spender,
        uint256 subtractedValue
    ) public virtual returns (bool) {}
}

contract VaultV3DummyImplementation is
    IUserModule,
    IDSAModule,
    IAdminModule,
    IAssetsViewModule,
    ILeverageModule,
    IRefinanceModule,
    IRebalancerModule,
    IVariablesReadModule,
    IERC4626Functions,
    IERC20Functions
{
    receive() external payable {}
}
"
    },
    "contracts/dummy-implementations/structs.sol": {
      "content": "//SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

library Structs {
    struct FluidVaultDetails {
        address vaultAddress;
        uint256 nftId;
    }

    struct LeverageParams {
        uint8 protocolId;
        uint256 route;
        address debtToken;
        address colToken;
        uint256 debtFlashloanAmount;
        uint256 minBuyAmount;
        string[] swapConnectors;
        bytes[] swapCallDatas;
    }

    struct RefinanceParams {
        uint8 fromProtocolId;
        uint8 toProtocolId;
        address fromDebtToken;
        address toDebtToken;
        address fromCollateralToken;
        address toCollateralToken;
        uint256 fromColAmount;
        uint256 toColAmount;
        uint256 fromDebtAmount;
        uint256 toDebtAmount;
        uint256 route;
        uint256 minBuyAmountDebt;
        uint256 minBuyAmountCol;
        string[] swapConnectorsDebt;
        bytes[] swapCallDatasDebt;
        string[] swapConnectorsCol;
        bytes[] swapCallDatasCol;
    }

    /// @notice Collateral tokens supported - SUSDe, USDe
    /// @notice Debt tokens supported - USDC, USDT, GHO, USDS
    /// @dev Collateral_Raw and Debt_Raw are the raw amounts of the collateral and debt tokens
    /// @dev Total_Collateral_Converted and Total_Debt_Converted are the converted amounts of the collateral and debt tokens
    /// @dev The collateral conversion is done using the conversion rates of the collateral tokens
    /// @dev The debt conversion is done on 1:1 basis with USDC
    /// @dev The conversion rates are updated every time the collateral and debt tokens are updated
    struct ProtocolAssetsAaveV3 {
        uint256 Collateral_Raw_SUSDe; // SUSDe
        uint256 Collateral_Raw_USDe; // USDe
        uint256 Debt_Raw_USDC; // USDC
        uint256 Debt_Raw_USDT; // USDT
        uint256 Debt_Raw_GHO; // GHO
        uint256 Debt_Raw_USDS; // USDS
        uint256 Total_Collateral_Converted; // USD
        uint256 Total_Debt_Converted; // USD
    }

    /// @notice Collateral tokens supported - wstUSR, SUSDe, syrupUSDC
    /// @notice Debt tokens supported - USDC, USDT, GHO
    /// @dev Collateral_Raw and Debt_Raw are the raw amounts of the collateral and debt tokens
    /// @dev Total_Collateral_Converted and Total_Debt_Converted are the converted amounts of the collateral and debt tokens
    /// @dev The collateral conversion is done using the conversion rates of the collateral tokens
    /// @dev The debt conversion is done on 1:1 basis with USDC
    struct ProtocolAssetsFluid {
        uint256 Collateral_Raw; // wstUSR / SUSDe / syrupUSDC
        uint256 Debt_Raw; // USDC / USDT / GHO
        uint256 Total_Collateral_Converted; // USD
        uint256 Total_Debt_Converted; // USD
    }

    // /// @notice Idle balances of the DSA in all supported tokens
    // /// @dev Total_Converted is the converted amount of the idle balances in USDC
    // /// @dev The conversion of wstUSR, SUSDe, USDe, syrupUSDC is done using the conversion rates of the tokens
    // /// @dev The conversion of USDC, USDT, GHO, USDS is done on 1:1 basis with USDC
    struct IdleDSABalances {
        uint256 Raw_wstUSR;
        uint256 Raw_SUSDe;
        uint256 Raw_syrupUSDC;
        uint256 Raw_USDe;
        uint256 Raw_USDC;
        uint256 Raw_USDT;
        uint256 Raw_GHO;
        uint256 Raw_USDS;
        uint256 Total_Converted; // USD
    }

    // Structs to be used directly in the Net Assets calculation
    struct ProtocolAssetsInUsd {
        uint256 totalCollateralInUsd;
        uint256 totalDebtInUsd;
    }

    struct NetAssets {
        ProtocolAssetsInUsd aaveV3;
        ProtocolAssetsInUsd fluidWstUSRUSDC;
        ProtocolAssetsInUsd fluidWstUSRUSDT;
        ProtocolAssetsInUsd fluidWstUSRGHO;
        ProtocolAssetsInUsd fluidSUSDeUSDC;
        ProtocolAssetsInUsd fluidSUSDeUSDT;
        ProtocolAssetsInUsd fluidSUSDeGHO;
        ProtocolAssetsInUsd fluidSyrupUSDCUSDC;
        ProtocolAssetsInUsd fluidSyrupUSDCUSDT;
        ProtocolAssetsInUsd fluidSyrupUSDCGHO;
        uint256 idleVaultBalanceInUsd;
        uint256 idleDsaBalanceInUsd;
    }
}
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "evmVersion": "paris",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "metadata": {
      "useLiteralContent": true
    }
  }
}}

Tags:
ERC20, Proxy, Mintable, Swap, Upgradeable, Factory|addr:0xa15b1a930d6e3a069a1b62b495b1a4eebc07733e|verified:true|block:23689096|tx:0xac7bf41fcdc2251349f6229c6088b62c508c148b76ae4cd50c3da2fe81af988c|first_check:1761829649

Submitted on: 2025-10-30 14:07:32

Comments

Log in to comment.

No comments yet.