ETH Price: $3,015.58 (-1.85%)

Contract

0x3225737a9Bbb6473CB4a45b7244ACa2BeFdB276A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Dai To Usds238169802025-11-17 6:02:5915 hrs ago1763359379IN
0x3225737a...BeFdB276A
0 ETH0.000142361.07834626
Usds To Dai238146892025-11-16 22:21:1122 hrs ago1763331671IN
0x3225737a...BeFdB276A
0 ETH0.000329372.25288566
Usds To Dai238128902025-11-16 16:18:2328 hrs ago1763309903IN
0x3225737a...BeFdB276A
0 ETH0.000209261.43146613
Dai To Usds238128092025-11-16 16:01:5929 hrs ago1763308919IN
0x3225737a...BeFdB276A
0 ETH0.000272412.06342464
Dai To Usds238122892025-11-16 14:17:2330 hrs ago1763302643IN
0x3225737a...BeFdB276A
0 ETH0.00035272.57789907
Usds To Dai238013692025-11-15 1:40:112 days ago1763170811IN
0x3225737a...BeFdB276A
0 ETH0.000010670.07306116
Usds To Dai237985032025-11-14 16:04:113 days ago1763136251IN
0x3225737a...BeFdB276A
0 ETH0.000145620.99625962
Dai To Usds237971562025-11-14 11:34:113 days ago1763120051IN
0x3225737a...BeFdB276A
0 ETH0.000283642.4083247
Usds To Dai237913872025-11-13 16:10:234 days ago1763050223IN
0x3225737a...BeFdB276A
0 ETH0.000483683.65038338
Dai To Usds237913162025-11-13 15:56:114 days ago1763049371IN
0x3225737a...BeFdB276A
0 ETH0.000502863.67569074
Usds To Dai237906612025-11-13 13:43:594 days ago1763041439IN
0x3225737a...BeFdB276A
0 ETH0.000176941.21041498
Usds To Dai237884202025-11-13 6:13:234 days ago1763014403IN
0x3225737a...BeFdB276A
0 ETH0.000278392.10105129
Dai To Usds237874182025-11-13 2:49:594 days ago1763002199IN
0x3225737a...BeFdB276A
0 ETH0.000022210.16833791
Usds To Dai237844552025-11-12 16:52:115 days ago1762966331IN
0x3225737a...BeFdB276A
0 ETH0.000373442.81818118
Dai To Usds237843482025-11-12 16:30:475 days ago1762965047IN
0x3225737a...BeFdB276A
0 ETH0.000576814.21623398
Dai To Usds237842992025-11-12 16:20:595 days ago1762964459IN
0x3225737a...BeFdB276A
0 ETH0.000561484.25309636
Dai To Usds237842722025-11-12 16:15:235 days ago1762964123IN
0x3225737a...BeFdB276A
0 ETH0.000671724.90998937
Usds To Dai237841922025-11-12 15:59:235 days ago1762963163IN
0x3225737a...BeFdB276A
0 ETH0.00051443.51866598
Dai To Usds237841122025-11-12 15:43:235 days ago1762962203IN
0x3225737a...BeFdB276A
0 ETH0.00047993.63511713
Dai To Usds237794462025-11-12 0:04:115 days ago1762905851IN
0x3225737a...BeFdB276A
0 ETH0.000013870.10509489
Dai To Usds237793152025-11-11 23:37:475 days ago1762904267IN
0x3225737a...BeFdB276A
0 ETH0.000014890.11282637
Dai To Usds237782982025-11-11 20:13:116 days ago1762891991IN
0x3225737a...BeFdB276A
0 ETH0.00028812.18252614
Dai To Usds237773262025-11-11 16:57:236 days ago1762880243IN
0x3225737a...BeFdB276A
0 ETH0.000220721.84406155
Usds To Dai237770892025-11-11 16:09:356 days ago1762877375IN
0x3225737a...BeFdB276A
0 ETH0.000336342.3008736
Usds To Dai237770842025-11-11 16:08:236 days ago1762877303IN
0x3225737a...BeFdB276A
0 ETH0.000372012.54486479
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DaiUsds

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: AGPL-3.0-or-later

/// DaiUsds.sol -- Dai/Usds Exchanger

// Copyright (C) 2023 Dai Foundation
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

pragma solidity ^0.8.21;

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

interface DaiJoinLike is JoinLike {
    function dai() external view returns (address);
}

interface UsdsJoinLike is JoinLike {
    function usds() external view returns (address);
}

interface GemLike {
    function approve(address, uint256) external returns (bool);
    function transferFrom(address, address, uint256) external returns (bool);
}

interface VatLike {
    function hope(address) external;
}

contract DaiUsds {
    DaiJoinLike  public immutable daiJoin;
    UsdsJoinLike public immutable usdsJoin;
    GemLike      public immutable dai;
    GemLike      public immutable usds;
    
    event DaiToUsds(address indexed caller, address indexed usr, uint256 wad);
    event UsdsToDai(address indexed caller, address indexed usr, uint256 wad);

    constructor(address daiJoin_, address usdsJoin_) {
        daiJoin  = DaiJoinLike(daiJoin_);
        usdsJoin = UsdsJoinLike(usdsJoin_);

        address vat = daiJoin.vat();
        require(vat == usdsJoin.vat(), "DaiUsds/vat-not-same");

        dai  = GemLike(daiJoin.dai());
        usds = GemLike(usdsJoin.usds());

        dai.approve(address(daiJoin), type(uint256).max);
        usds.approve(address(usdsJoin), type(uint256).max);

        VatLike(vat).hope(address(daiJoin));
        VatLike(vat).hope(address(usdsJoin));
    }

    function daiToUsds(address usr, uint256 wad) external {
        dai.transferFrom(msg.sender, address(this), wad);
        daiJoin.join(address(this), wad);
        usdsJoin.exit(usr, wad);
        emit DaiToUsds(msg.sender, usr, wad);
    }

    function usdsToDai(address usr, uint256 wad) external {
        usds.transferFrom(msg.sender, address(this), wad);
        usdsJoin.join(address(this), wad);
        daiJoin.exit(usr, wad);
        emit UsdsToDai(msg.sender, usr, wad);
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "forge-std/=lib/openzeppelin-foundry-upgrades/lib/forge-std/src/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
    "dss-interfaces/=lib/token-tests/lib/dss-test/lib/dss-interfaces/src/",
    "dss-test/=lib/token-tests/lib/dss-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
    "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
    "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/",
    "token-tests/=lib/token-tests/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "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

API
[{"inputs":[{"internalType":"address","name":"daiJoin_","type":"address"},{"internalType":"address","name":"usdsJoin_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"DaiToUsds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":false,"internalType":"uint256","name":"wad","type":"uint256"}],"name":"UsdsToDai","type":"event"},{"inputs":[],"name":"dai","outputs":[{"internalType":"contract GemLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daiJoin","outputs":[{"internalType":"contract DaiJoinLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"daiToUsds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usds","outputs":[{"internalType":"contract GemLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdsJoin","outputs":[{"internalType":"contract UsdsJoinLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"},{"internalType":"uint256","name":"wad","type":"uint256"}],"name":"usdsToDai","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61010060405234801561001157600080fd5b50604051610a9c380380610a9c83398101604081905261003091610431565b6001600160a01b03808316608081905290821660a052604080516336569e7760e01b81529051600092916336569e779160048083019260209291908290030181865afa158015610084573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a89190610464565b905060a0516001600160a01b03166336569e776040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061010e9190610464565b6001600160a01b0316816001600160a01b0316146101725760405162461bcd60e51b815260206004820152601460248201527f446169557364732f7661742d6e6f742d73616d65000000000000000000000000604482015260640160405180910390fd5b6080516001600160a01b031663f4b9fa756040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d69190610464565b6001600160a01b031660c0816001600160a01b03168152505060a0516001600160a01b0316634cf282fb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561022f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102539190610464565b6001600160a01b0390811660e05260c05160805160405163095ea7b360e01b81529083166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d39190610486565b5060e05160a05160405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801561032a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034e9190610486565b506080516040516328ec8bf160e21b81526001600160a01b0391821660048201529082169063a3b22fc490602401600060405180830381600087803b15801561039657600080fd5b505af11580156103aa573d6000803e3d6000fd5b505060a0516040516328ec8bf160e21b81526001600160a01b039182166004820152908416925063a3b22fc49150602401600060405180830381600087803b1580156103f557600080fd5b505af1158015610409573d6000803e3d6000fd5b505050505050506104a8565b80516001600160a01b038116811461042c57600080fd5b919050565b6000806040838503121561044457600080fd5b61044d83610415565b915061045b60208401610415565b90509250929050565b60006020828403121561047657600080fd5b61047f82610415565b9392505050565b60006020828403121561049857600080fd5b8151801515811461047f57600080fd5b60805160a05160c05160e05161059461050860003960008181606c015261016901526000818160fe0152610348015260008181610125015281816101fb015261046201526000818160c40152818161028301526103da01526105946000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80634cf282fb1461006757806368f30150146100aa578063c11645bc146100bf578063f2c07aae146100e6578063f4b9fa75146100f9578063fa1e2e8614610120575b600080fd5b61008e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100bd6100b83660046104fd565b610147565b005b61008e7f000000000000000000000000000000000000000000000000000000000000000081565b6100bd6100f43660046104fd565b610326565b61008e7f000000000000000000000000000000000000000000000000000000000000000081565b61008e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de9190610535565b50604051633b4da69f60e01b8152306004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690633b4da69f90604401600060405180830381600087803b15801561024757600080fd5b505af115801561025b573d6000803e3d6000fd5b505060405163ef693bed60e01b81526001600160a01b038581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016925063ef693bed9150604401600060405180830381600087803b1580156102c957600080fd5b505af11580156102dd573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f9c7bd3b60b7e46fc1d7a38d88b7dd4be0e028b80b706848fc3c065eabc8e6a9b906020015b60405180910390a35050565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bd9190610535565b50604051633b4da69f60e01b8152306004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690633b4da69f90604401600060405180830381600087803b15801561042657600080fd5b505af115801561043a573d6000803e3d6000fd5b505060405163ef693bed60e01b81526001600160a01b038581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016925063ef693bed9150604401600060405180830381600087803b1580156104a857600080fd5b505af11580156104bc573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f23889db6b244d239344deac88ec7781d810b3873fe323939d1ce0e8ac95642359060200161031a565b6000806040838503121561051057600080fd5b82356001600160a01b038116811461052757600080fd5b946020939093013593505050565b60006020828403121561054757600080fd5b8151801515811461055757600080fd5b939250505056fea2646970667358221220ac08dad19d57401b8f931b4e68013812a4d62ab10e4ae9620d8788772369bd2964736f6c634300081500330000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a280000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80634cf282fb1461006757806368f30150146100aa578063c11645bc146100bf578063f2c07aae146100e6578063f4b9fa75146100f9578063fa1e2e8614610120575b600080fd5b61008e7f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f81565b6040516001600160a01b03909116815260200160405180910390f35b6100bd6100b83660046104fd565b610147565b005b61008e7f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a2881565b6100bd6100f43660046104fd565b610326565b61008e7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b61008e7f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb81565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000dc035d45d973e3ec169d2276ddab16f1e407384f6001600160a01b0316906323b872dd906064016020604051808303816000875af11580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de9190610535565b50604051633b4da69f60e01b8152306004820152602481018290527f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb6001600160a01b031690633b4da69f90604401600060405180830381600087803b15801561024757600080fd5b505af115801561025b573d6000803e3d6000fd5b505060405163ef693bed60e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a2816925063ef693bed9150604401600060405180830381600087803b1580156102c957600080fd5b505af11580156102dd573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f9c7bd3b60b7e46fc1d7a38d88b7dd4be0e028b80b706848fc3c065eabc8e6a9b906020015b60405180910390a35050565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103bd9190610535565b50604051633b4da69f60e01b8152306004820152602481018290527f0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a286001600160a01b031690633b4da69f90604401600060405180830381600087803b15801561042657600080fd5b505af115801561043a573d6000803e3d6000fd5b505060405163ef693bed60e01b81526001600160a01b038581166004830152602482018590527f0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb16925063ef693bed9150604401600060405180830381600087803b1580156104a857600080fd5b505af11580156104bc573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f23889db6b244d239344deac88ec7781d810b3873fe323939d1ce0e8ac95642359060200161031a565b6000806040838503121561051057600080fd5b82356001600160a01b038116811461052757600080fd5b946020939093013593505050565b60006020828403121561054757600080fd5b8151801515811461055757600080fd5b939250505056fea2646970667358221220ac08dad19d57401b8f931b4e68013812a4d62ab10e4ae9620d8788772369bd2964736f6c63430008150033

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

0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a280000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb

-----Decoded View---------------
Arg [0] : daiJoin_ (address): 0x9759A6Ac90977b93B58547b4A71c78317f391A28
Arg [1] : usdsJoin_ (address): 0x3C0f895007CA717Aa01c8693e59DF1e8C3777FEB

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009759a6ac90977b93b58547b4a71c78317f391a28
Arg [1] : 0000000000000000000000003c0f895007ca717aa01c8693e59df1e8c3777feb


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.