Skip to content
Verified contractExactMIT

ZeroFee

Address0xc3e4e6fae870c84f0afab395661ff15428db00b2
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.26

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.26+commit.8a97fa7a
Language
solidity
Optimization
Yes, 200 runs
EVM version
cancun
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,410,937
Creation transaction
0x89cd00d21e…c5cde03c61

src/ZeroFee.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

// +------------------------------------------------------------------------------------------------+
// |  #  #  #  #                         #  #  #  #  |                                              |
// |  #                                           #  |                                              |
// |  #    ##########################             #  |                                              |
// |  #    ### ###########################        #  |                                              |
// |       ### ###                  #########        |                                              |
// |       ### ###                     ########      |                                              |
// |       ### ###                      ########     |      _____  _           _       _     _      |
// |       ### ###                       #######     |     |  __ \(_)         | |     (_)   | |     |
// |       ### ###                        #######    |     | |  | |_ ___ _ __ | | __ _ _  __| |     |
// |       ### ###                        #####      |     | |  | | / __| '_ \| |/ _` | |/ _` |     |
// |       ### ###                        ### ###    |     | |__| | \__ \ |_) | | (_| | | (_| |     |
// |       ### ###                         #####     |     |_____/|_|___/ .__/|_|\__,_|_|\__,_|     |
// |       ### ###                       ######      |                  | |                         |
// |       ### ###             ##       ######       |                  |_|                         |
// |       ### ###           ######   ######         |                                              |
// |       ### ###             ##### #####           |        DISPLAY  ->  VERIFY  ->  REWARD       |
// |  #    ### ##############   ########          #  |                                              |
// |  #    ###################    ####            #  |                                              |
// |  #                                           #  |                                              |
// |  #  #  #  #                         #  #  #  #  |                                              |
// +------------------------------------------------------------------------------------------------+

import {IFeeContract} from "./interfaces/IFeeContract.sol";

/// @title ZeroFee
/// @author Displaid
contract ZeroFee is IFeeContract {
    /// @inheritdoc IFeeContract
    function feeFor(address, uint256, uint256) external pure returns (uint256) {
        return 0;
    }
}

src/interfaces/IFeeContract.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

/// @title IFeeContract
/// @author Displaid
/// @notice Answers the fee on a deposit. Read-only: it can never move or hold money. A fee contract should have no
/// owner and no settings: a new rule is a new contract, which a vault can only switch to through its 24-hour wait.
interface IFeeContract {
    /// @notice The fee on this deposit. The vault refuses an answer above its 10% cap.
    /// @param depositor Who is depositing.
    /// @param amount The amount, fee included, in token units.
    /// @param totalBefore Everything ever paid into the vault before this deposit, in token units.
    /// @return The fee, in token units.
    function feeFor(address depositor, uint256 amount, uint256 totalBefore) external view returns (uint256);
}
Compiler settingsShow
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.