ETH Price: $2,710.23 (+1.42%)

Contract

0xf86141a5657Cf52AEB3E30eBccA5Ad3a8f714B89
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Migrate DAI To S...218786662025-02-19 6:37:2336 mins ago1739947043IN
0xf86141a5...a8f714B89
0 ETH0.000126310.67434851
Migrate DAI To S...218762082025-02-18 22:21:358 hrs ago1739917295IN
0xf86141a5...a8f714B89
0 ETH0.000307851.27776556
Migrate SDAI Sha...218751312025-02-18 18:44:3512 hrs ago1739904275IN
0xf86141a5...a8f714B89
0 ETH0.000780482.43552406
Downgrade USDS T...218741872025-02-18 15:34:5915 hrs ago1739892899IN
0xf86141a5...a8f714B89
0 ETH0.000250411.72999586
Migrate DAI To U...218729862025-02-18 11:33:4719 hrs ago1739878427IN
0xf86141a5...a8f714B89
0 ETH0.000189861.46110991
Migrate SDAI Sha...218721702025-02-18 8:49:2322 hrs ago1739868563IN
0xf86141a5...a8f714B89
0 ETH0.000481551.50268438
Migrate SDAI Sha...218709652025-02-18 4:46:5926 hrs ago1739854019IN
0xf86141a5...a8f714B89
0 ETH0.000423451.31969305
Downgrade USDS T...218704982025-02-18 3:12:5928 hrs ago1739848379IN
0xf86141a5...a8f714B89
0 ETH0.000161881.23539387
Migrate SDAI Sha...218689242025-02-17 21:56:4733 hrs ago1739829407IN
0xf86141a5...a8f714B89
0 ETH0.00037651.17708875
Migrate DAI To S...218689192025-02-17 21:55:4733 hrs ago1739829347IN
0xf86141a5...a8f714B89
0 ETH0.000290211.2
Migrate SDAI Sha...218688942025-02-17 21:50:4733 hrs ago1739829047IN
0xf86141a5...a8f714B89
0 ETH0.000386291.20317172
Migrate DAI To S...218683422025-02-17 19:59:5935 hrs ago1739822399IN
0xf86141a5...a8f714B89
0 ETH0.000971424.0230104
Downgrade USDS T...218674472025-02-17 16:59:5938 hrs ago1739811599IN
0xf86141a5...a8f714B89
0 ETH0.0025476417.60283652
Migrate DAI To U...218669602025-02-17 15:21:5939 hrs ago1739805719IN
0xf86141a5...a8f714B89
0 ETH0.0065440145.56508703
Downgrade USDS T...218669222025-02-17 15:14:2339 hrs ago1739805263IN
0xf86141a5...a8f714B89
0 ETH0.0071383449.32521385
Migrate DAI To U...218664752025-02-17 13:44:3541 hrs ago1739799875IN
0xf86141a5...a8f714B89
0 ETH0.000752235.2380637
Downgrade USDS T...218653722025-02-17 10:01:4745 hrs ago1739786507IN
0xf86141a5...a8f714B89
0 ETH0.000217251.50101128
Downgrade USDS T...218648792025-02-17 8:22:2346 hrs ago1739780543IN
0xf86141a5...a8f714B89
0 ETH0.000097360.74292535
Migrate DAI To U...218645132025-02-17 7:08:352 days ago1739776115IN
0xf86141a5...a8f714B89
0 ETH0.000115690.80544002
Migrate DAI To U...218604542025-02-16 17:29:112 days ago1739726951IN
0xf86141a5...a8f714B89
0 ETH0.000132230.92059824
Migrate SDAI Sha...218595992025-02-16 14:36:592 days ago1739716619IN
0xf86141a5...a8f714B89
0 ETH0.000393081.28074464
Migrate SDAI Sha...218595812025-02-16 14:33:232 days ago1739716403IN
0xf86141a5...a8f714B89
0 ETH0.000379391.23999147
Migrate DAI To S...218593822025-02-16 13:53:232 days ago1739714003IN
0xf86141a5...a8f714B89
0 ETH0.000206740.85431492
Downgrade USDS T...218579772025-02-16 9:09:592 days ago1739696999IN
0xf86141a5...a8f714B89
0 ETH0.000099220.68563252
Migrate DAI To S...218563172025-02-16 3:35:353 days ago1739676935IN
0xf86141a5...a8f714B89
0 ETH0.000261291.08184792
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
218786662025-02-19 6:37:2336 mins ago1739947043
0xf86141a5...a8f714B89
0 ETH
218786662025-02-19 6:37:2336 mins ago1739947043
0xf86141a5...a8f714B89
0 ETH
218786662025-02-19 6:37:2336 mins ago1739947043
0xf86141a5...a8f714B89
0 ETH
218786662025-02-19 6:37:2336 mins ago1739947043
0xf86141a5...a8f714B89
0 ETH
218762082025-02-18 22:21:358 hrs ago1739917295
0xf86141a5...a8f714B89
0 ETH
218762082025-02-18 22:21:358 hrs ago1739917295
0xf86141a5...a8f714B89
0 ETH
218762082025-02-18 22:21:358 hrs ago1739917295
0xf86141a5...a8f714B89
0 ETH
218762082025-02-18 22:21:358 hrs ago1739917295
0xf86141a5...a8f714B89
0 ETH
218751312025-02-18 18:44:3512 hrs ago1739904275
0xf86141a5...a8f714B89
0 ETH
218751312025-02-18 18:44:3512 hrs ago1739904275
0xf86141a5...a8f714B89
0 ETH
218751312025-02-18 18:44:3512 hrs ago1739904275
0xf86141a5...a8f714B89
0 ETH
218751312025-02-18 18:44:3512 hrs ago1739904275
0xf86141a5...a8f714B89
0 ETH
218741872025-02-18 15:34:5915 hrs ago1739892899
0xf86141a5...a8f714B89
0 ETH
218741872025-02-18 15:34:5915 hrs ago1739892899
0xf86141a5...a8f714B89
0 ETH
218741872025-02-18 15:34:5915 hrs ago1739892899
0xf86141a5...a8f714B89
0 ETH
218729862025-02-18 11:33:4719 hrs ago1739878427
0xf86141a5...a8f714B89
0 ETH
218729862025-02-18 11:33:4719 hrs ago1739878427
0xf86141a5...a8f714B89
0 ETH
218729862025-02-18 11:33:4719 hrs ago1739878427
0xf86141a5...a8f714B89
0 ETH
218721702025-02-18 8:49:2322 hrs ago1739868563
0xf86141a5...a8f714B89
0 ETH
218721702025-02-18 8:49:2322 hrs ago1739868563
0xf86141a5...a8f714B89
0 ETH
218721702025-02-18 8:49:2322 hrs ago1739868563
0xf86141a5...a8f714B89
0 ETH
218721702025-02-18 8:49:2322 hrs ago1739868563
0xf86141a5...a8f714B89
0 ETH
218709652025-02-18 4:46:5926 hrs ago1739854019
0xf86141a5...a8f714B89
0 ETH
218709652025-02-18 4:46:5926 hrs ago1739854019
0xf86141a5...a8f714B89
0 ETH
218709652025-02-18 4:46:5926 hrs ago1739854019
0xf86141a5...a8f714B89
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MigrationActions

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 100000 runs

Other Settings:
paris EvmVersion
File 1 of 3 : MigrationActions.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.25;

import { IERC20 }   from "lib/forge-std/src/interfaces/IERC20.sol";
import { IERC4626 } from "lib/forge-std/src/interfaces/IERC4626.sol";

interface JoinLike {
    function vat() external view returns (VatLike);
    function join(address, uint256) external;
    function exit(address, uint256) external;
}

interface VatLike {
    function hope(address) external;
}

/**
 * @notice Actions for migrating from DAI/sDAI to USDS/sUSDS.
 * @dev    Also contains 1 downgrade path from USDS to DAI for convenience.
 */
contract MigrationActions {

    IERC20   public immutable dai;
    IERC20   public immutable usds;
    IERC4626 public immutable sdai;
    IERC4626 public immutable susds;

    VatLike  public immutable vat;
    JoinLike public immutable daiJoin;
    JoinLike public immutable usdsJoin;

    constructor(
        address _sdai,
        address _susds,
        address _daiJoin,
        address _usdsJoin
    ) {
        sdai  = IERC4626(_sdai);
        susds = IERC4626(_susds);

        dai  = IERC20(sdai.asset());
        usds = IERC20(susds.asset());

        daiJoin  = JoinLike(_daiJoin);
        usdsJoin = JoinLike(_usdsJoin);
        vat      = daiJoin.vat();

        // Infinite approvals
        dai.approve(_daiJoin,   type(uint256).max);
        usds.approve(_usdsJoin, type(uint256).max);
        usds.approve(_susds,    type(uint256).max);

        // Vat permissioning
        vat.hope(_daiJoin);
        vat.hope(_usdsJoin);
    }

    /**
     * @notice Migrate `assetsIn` of `dai` to `usds`.
     * @param  receiver The receiver of `usds`.
     * @param  assetsIn The amount of `dai` to migrate.
     */
    function migrateDAIToUSDS(address receiver, uint256 assetsIn) public {
        dai.transferFrom(msg.sender, address(this), assetsIn);
        _migrateDAIToUSDS(receiver, assetsIn);
    }

    /**
     * @notice Migrate `assetsIn` of `dai` to `susds`.
     * @param  receiver  The receiver of `susds`.
     * @param  assetsIn  The amount of `dai` to migrate.
     * @return sharesOut The amount of `susds` shares received.
     */
    function migrateDAIToSUSDS(address receiver, uint256 assetsIn) external returns (uint256 sharesOut) {
        migrateDAIToUSDS(address(this), assetsIn);
        sharesOut = susds.deposit(assetsIn, receiver);
    }

    /**
     * @notice Migrate `assetsIn` of `sdai` to `usds`.
     * @param  receiver The receiver of `usds`.
     * @param  assetsIn The amount of `sdai` to migrate in assets.
     */
    function migrateSDAIAssetsToUSDS(address receiver, uint256 assetsIn) public {
        sdai.withdraw(assetsIn, address(this), msg.sender);
        _migrateDAIToUSDS(receiver, assetsIn);
    }

    /**
     * @notice Migrate `sharesIn` of `sdai` to `usds`.
     * @param  receiver  The receiver of `usds`.
     * @param  sharesIn  The amount of `sdai` to migrate in shares.
     * @return assetsOut The amount of `usds` assets received.
     */
    function migrateSDAISharesToUSDS(address receiver, uint256 sharesIn) public returns (uint256 assetsOut) {
        assetsOut = sdai.redeem(sharesIn, address(this), msg.sender);
        _migrateDAIToUSDS(receiver, assetsOut);
    }

    /**
     * @notice Migrate `assetsIn` of `sdai` (denominated in `dai`) to `susds`.
     * @param  receiver  The receiver of `susds`.
     * @param  assetsIn  The amount of `sdai` to migrate (denominated in `dai`).
     * @return sharesOut The amount of `susds` shares received.
     */
    function migrateSDAIAssetsToSUSDS(address receiver, uint256 assetsIn) external returns (uint256 sharesOut) {
        migrateSDAIAssetsToUSDS(address(this), assetsIn);
        sharesOut = susds.deposit(assetsIn, receiver);
    }

    /**
     * @notice Migrate `sharesIn` of `sdai` to `susds`.
     * @param  receiver  The receiver of `susds`.
     * @param  sharesIn  The amount of `sdai` to migrate in shares.
     * @return sharesOut The amount of `susds` shares received.
     */
    function migrateSDAISharesToSUSDS(address receiver, uint256 sharesIn) external returns (uint256 sharesOut) {
        uint256 assets = migrateSDAISharesToUSDS(address(this), sharesIn);
        sharesOut = susds.deposit(assets, receiver);
    }

    /**
     * @notice Downgrade `assetsIn` of `usds` to `dai`.
     * @param  receiver The receiver of `dai`.
     * @param  assetsIn The amount of `usds` to downgrade.
     */
    function downgradeUSDSToDAI(address receiver, uint256 assetsIn) external {
        usds.transferFrom(msg.sender, address(this), assetsIn);
        usdsJoin.join(address(this), assetsIn);
        daiJoin.exit(receiver,       assetsIn);
    }

    /**********************************************************************************************/
    /*** Internal helper functions                                                              ***/
    /**********************************************************************************************/

    function _migrateDAIToUSDS(address receiver, uint256 amount) internal {
        daiJoin.join(address(this), amount);
        usdsJoin.exit(receiver,     amount);
    }

}

File 2 of 3 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

/// @dev Interface of the ERC20 standard as defined in the EIP.
/// @dev This includes the optional name, symbol, and decimals metadata.
interface IERC20 {
    /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`).
    event Transfer(address indexed from, address indexed to, uint256 value);

    /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value`
    /// is the new allowance.
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /// @notice Returns the amount of tokens in existence.
    function totalSupply() external view returns (uint256);

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

    /// @notice Moves `amount` tokens from the caller's account to `to`.
    function transfer(address to, uint256 amount) external returns (bool);

    /// @notice Returns the remaining number of tokens that `spender` is allowed
    /// to spend on behalf of `owner`
    function allowance(address owner, address spender) external view returns (uint256);

    /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens.
    /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    function approve(address spender, uint256 amount) external returns (bool);

    /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism.
    /// `amount` is then deducted from the caller's allowance.
    function transferFrom(address from, address to, uint256 amount) external returns (bool);

    /// @notice Returns the name of the token.
    function name() external view returns (string memory);

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

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

File 3 of 3 : IERC4626.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

import "./IERC20.sol";

/// @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
/// https://eips.ethereum.org/EIPS/eip-4626
interface IERC4626 is IERC20 {
    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
    );

    /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
    /// @dev
    /// - MUST be an ERC-20 token contract.
    /// - MUST NOT revert.
    function asset() external view returns (address assetTokenAddress);

    /// @notice Returns the total amount of the underlying asset that is “managed” by Vault.
    /// @dev
    /// - SHOULD include any compounding that occurs from yield.
    /// - MUST be inclusive of any fees that are charged against assets in the Vault.
    /// - MUST NOT revert.
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
    /// scenario where all the conditions are met.
    /// @dev
    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
    /// - MUST NOT show any variations depending on the caller.
    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
    /// - MUST NOT revert.
    ///
    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
    /// from.
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
    /// scenario where all the conditions are met.
    /// @dev
    /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
    /// - MUST NOT show any variations depending on the caller.
    /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
    /// - MUST NOT revert.
    ///
    /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
    /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
    /// from.
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
    /// through a deposit call.
    /// @dev
    /// - MUST return a limited value if receiver is subject to some deposit limit.
    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
    /// - MUST NOT revert.
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
    /// current on-chain conditions.
    /// @dev
    /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
    ///   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
    ///   in the same transaction.
    /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
    ///   deposit would be accepted, regardless if the user has enough tokens approved, etc.
    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
    /// - MUST NOT revert.
    ///
    /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
    /// @dev
    /// - MUST emit the Deposit event.
    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
    ///   deposit execution, and are accounted for during deposit.
    /// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
    ///   approving enough underlying tokens to the Vault contract, etc).
    ///
    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
    /// @dev
    /// - MUST return a limited value if receiver is subject to some mint limit.
    /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
    /// - MUST NOT revert.
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
    /// current on-chain conditions.
    /// @dev
    /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
    ///   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
    ///   same transaction.
    /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
    ///   would be accepted, regardless if the user has enough tokens approved, etc.
    /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
    /// - MUST NOT revert.
    ///
    /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
    /// share price or some other type of condition, meaning the depositor will lose assets by minting.
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
    /// @dev
    /// - MUST emit the Deposit event.
    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
    ///   execution, and are accounted for during mint.
    /// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
    ///   approving enough underlying tokens to the Vault contract, etc).
    ///
    /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
    /// Vault, through a withdraw call.
    /// @dev
    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
    /// - MUST NOT revert.
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
    /// given current on-chain conditions.
    /// @dev
    /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
    ///   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
    ///   called
    ///   in the same transaction.
    /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
    ///   the withdrawal would be accepted, regardless if the user has enough shares, etc.
    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
    /// - MUST NOT revert.
    ///
    /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
    /// share price or some other type of condition, meaning the depositor will lose assets by depositing.
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver.
    /// @dev
    /// - MUST emit the Withdraw event.
    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
    ///   withdraw execution, and are accounted for during withdraw.
    /// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
    ///   not having enough shares, etc).
    ///
    /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
    /// Those methods should be performed separately.
    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);

    /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
    /// through a redeem call.
    /// @dev
    /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
    /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
    /// - MUST NOT revert.
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
    /// given current on-chain conditions.
    /// @dev
    /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
    ///   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
    ///   same transaction.
    /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
    ///   redemption would be accepted, regardless if the user has enough shares, etc.
    /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
    /// - MUST NOT revert.
    ///
    /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
    /// share price or some other type of condition, meaning the depositor will lose assets by redeeming.
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver.
    /// @dev
    /// - MUST emit the Withdraw event.
    /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
    ///   redeem execution, and are accounted for during redeem.
    /// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
    ///   not having enough shares, etc).
    ///
    /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
    /// Those methods should be performed separately.
    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}

Settings
{
  "remappings": [
    "ds-test/=lib/erc20-helpers/lib/forge-std/lib/ds-test/src/",
    "erc20-helpers/=lib/erc20-helpers/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_sdai","type":"address"},{"internalType":"address","name":"_susds","type":"address"},{"internalType":"address","name":"_daiJoin","type":"address"},{"internalType":"address","name":"_usdsJoin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"dai","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daiJoin","outputs":[{"internalType":"contract JoinLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assetsIn","type":"uint256"}],"name":"downgradeUSDSToDAI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assetsIn","type":"uint256"}],"name":"migrateDAIToSUSDS","outputs":[{"internalType":"uint256","name":"sharesOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assetsIn","type":"uint256"}],"name":"migrateDAIToUSDS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assetsIn","type":"uint256"}],"name":"migrateSDAIAssetsToSUSDS","outputs":[{"internalType":"uint256","name":"sharesOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assetsIn","type":"uint256"}],"name":"migrateSDAIAssetsToUSDS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sharesIn","type":"uint256"}],"name":"migrateSDAISharesToSUSDS","outputs":[{"internalType":"uint256","name":"sharesOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"sharesIn","type":"uint256"}],"name":"migrateSDAISharesToUSDS","outputs":[{"internalType":"uint256","name":"assetsOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sdai","outputs":[{"internalType":"contract IERC4626","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"susds","outputs":[{"internalType":"contract IERC4626","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usds","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdsJoin","outputs":[{"internalType":"contract JoinLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vat","outputs":[{"internalType":"contract VatLike","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61016060405234801561001157600080fd5b50604051610fe2380380610fe2833981016040819052610030916103f1565b6001600160a01b0380851660c081905290841660e052604080516338d52e0f60e01b815290516338d52e0f916004808201926020929091908290030181865afa158015610081573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a59190610450565b6001600160a01b03166080816001600160a01b03168152505060e0516001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101229190610450565b6001600160a01b0390811660a05282811661012081905290821661014052604080516336569e7760e01b815290516336569e77916004808201926020929091908290030181865afa15801561017b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019f9190610450565b6001600160a01b039081166101005260805160405163095ea7b360e01b81528483166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156101f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021d9190610474565b5060a05160405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610272573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102969190610474565b5060a05160405163095ea7b360e01b81526001600160a01b03858116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af11580156102eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030f9190610474565b50610100516040516328ec8bf160e21b81526001600160a01b0384811660048301529091169063a3b22fc490602401600060405180830381600087803b15801561035857600080fd5b505af115801561036c573d6000803e3d6000fd5b5050610100516040516328ec8bf160e21b81526001600160a01b038581166004830152909116925063a3b22fc49150602401600060405180830381600087803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b5050505050505050610496565b6001600160a01b03811681146103ee57600080fd5b50565b6000806000806080858703121561040757600080fd5b8451610412816103d9565b6020860151909450610423816103d9565b6040860151909350610434816103d9565b6060860151909250610445816103d9565b939692955090935050565b60006020828403121561046257600080fd5b815161046d816103d9565b9392505050565b60006020828403121561048657600080fd5b8151801515811461046d57600080fd5b60805160a05160c05160e051610100516101205161014051610aad6105356000396000818161029d015281816106fb01526109c601526000818161024f015281816107b6015261090b0152600060f40152600081816101b30152818161031701526104b90152600081816101da015281816103c90152610577015260008181610166015261064301526000818161027601526108540152610aad6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806368dea9131161008c578063b9f8aeb211610066578063b9f8aeb214610237578063c11645bc1461024a578063f4b9fa7514610271578063fa1e2e861461029857600080fd5b806368dea913146101fc578063893d399f1461020f5780639b67f7331461022457600080fd5b80634db40bea116100c85780634db40bea1461018857806351b6bb791461019b57806358b8f19c146101ae5780635b2eeca4146101d557600080fd5b806336569e77146100ef57806343a98fb2146101405780634cf282fb14610161575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61015361014e3660046109f7565b6102bf565b604051908152602001610137565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6101536101963660046109f7565b61038b565b6101536101a93660046109f7565b61045d565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61015361020a3660046109f7565b610530565b61022261021d3660046109f7565b61053c565b005b6102226102323660046109f7565b610608565b6102226102453660046109f7565b610819565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b60006102cb308361053c565b6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff84811660248301527f00000000000000000000000000000000000000000000000000000000000000001690636e553f65906044016020604051808303816000875af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103849190610a3c565b9392505050565b6040517fba087652000000000000000000000000000000000000000000000000000000008152600481018290523060248201523360448201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ba087652906064016020604051808303816000875af1158015610427573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044b9190610a3c565b905061045783826108d6565b92915050565b60008061046a308461038b565b6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff86811660248301529192507f000000000000000000000000000000000000000000000000000000000000000090911690636e553f65906044016020604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105289190610a3c565b949350505050565b60006102cb3083610819565b6040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018290523060248201523360448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063b460af94906064016020604051808303816000875af11580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610a3c565b5061060482826108d6565b5050565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af11580156106a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c59190610a55565b506040517f3b4da69f000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b4da69f90604401600060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b50506040517fef693bed00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016925063ef693bed91506044015b600060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b505050505050565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af11580156108b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610a55565b6040517f3b4da69f000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b4da69f90604401600060405180830381600087803b15801561096457600080fd5b505af1158015610978573d6000803e3d6000fd5b50506040517fef693bed00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016925063ef693bed91506044016107e3565b60008060408385031215610a0a57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff81168114610a2e57600080fd5b946020939093013593505050565b600060208284031215610a4e57600080fd5b5051919050565b600060208284031215610a6757600080fd5b8151801515811461038457600080fdfea2646970667358221220593f82bc5d04584a20a882dc9fa5627e036f1b6ceeb1a15fcecd09c320b56cd564736f6c634300081a003300000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a280000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806368dea9131161008c578063b9f8aeb211610066578063b9f8aeb214610237578063c11645bc1461024a578063f4b9fa7514610271578063fa1e2e861461029857600080fd5b806368dea913146101fc578063893d399f1461020f5780639b67f7331461022457600080fd5b80634db40bea116100c85780634db40bea1461018857806351b6bb791461019b57806358b8f19c146101ae5780635b2eeca4146101d557600080fd5b806336569e77146100ef57806343a98fb2146101405780634cf282fb14610161575b600080fd5b6101167f00000000000000000000000035d1b3f3d7966a1dfe207aa4514c12a259a0492b81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61015361014e3660046109f7565b6102bf565b604051908152602001610137565b6101167f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f81565b6101536101963660046109f7565b61038b565b6101536101a93660046109f7565b61045d565b6101167f000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd81565b6101167f00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea81565b61015361020a3660046109f7565b610530565b61022261021d3660046109f7565b61053c565b005b6102226102323660046109f7565b610608565b6102226102453660046109f7565b610819565b6101167f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a2881565b6101167f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6101167f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb81565b60006102cb308361053c565b6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff84811660248301527f000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd1690636e553f65906044016020604051808303816000875af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103849190610a3c565b9392505050565b6040517fba087652000000000000000000000000000000000000000000000000000000008152600481018290523060248201523360448201526000907f00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea73ffffffffffffffffffffffffffffffffffffffff169063ba087652906064016020604051808303816000875af1158015610427573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044b9190610a3c565b905061045783826108d6565b92915050565b60008061046a308461038b565b6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff86811660248301529192507f000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd90911690636e553f65906044016020604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105289190610a3c565b949350505050565b60006102cb3083610819565b6040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018290523060248201523360448201527f00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea73ffffffffffffffffffffffffffffffffffffffff169063b460af94906064016020604051808303816000875af11580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610a3c565b5061060482826108d6565b5050565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f73ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af11580156106a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c59190610a55565b506040517f3b4da69f000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb73ffffffffffffffffffffffffffffffffffffffff1690633b4da69f90604401600060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b50506040517fef693bed00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590527f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a2816925063ef693bed91506044015b600060405180830381600087803b1580156107fd57600080fd5b505af1158015610811573d6000803e3d6000fd5b505050505050565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af11580156108b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610a55565b6040517f3b4da69f000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a2873ffffffffffffffffffffffffffffffffffffffff1690633b4da69f90604401600060405180830381600087803b15801561096457600080fd5b505af1158015610978573d6000803e3d6000fd5b50506040517fef693bed00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590527f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb16925063ef693bed91506044016107e3565b60008060408385031215610a0a57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff81168114610a2e57600080fd5b946020939093013593505050565b600060208284031215610a4e57600080fd5b5051919050565b600060208284031215610a6757600080fd5b8151801515811461038457600080fdfea2646970667358221220593f82bc5d04584a20a882dc9fa5627e036f1b6ceeb1a15fcecd09c320b56cd564736f6c634300081a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a280000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb

-----Decoded View---------------
Arg [0] : _sdai (address): 0x83F20F44975D03b1b09e64809B757c47f942BEeA
Arg [1] : _susds (address): 0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD
Arg [2] : _daiJoin (address): 0x9759A6Ac90977b93B58547b4A71c78317f391A28
Arg [3] : _usdsJoin (address): 0x3C0f895007CA717Aa01c8693e59DF1e8C3777FEB

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea
Arg [1] : 000000000000000000000000a3931d71877c0e7a3148cb7eb4463524fec27fbd
Arg [2] : 0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a28
Arg [3] : 0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.