Contract 0x3f3c58ccb0655fa9161d0b4b49b217b3f6478d5a

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xcebfcf91ceff932b6cb7d08aca419179c28c182f8254bf60ba6b3683caa0ebd60x6080604042449092022-01-01 20:32:28627 days 13 hrs ago0xde485812e28824e542b9c2270b6b8ed9232b7d0b IN  Create: FeeStrategy0 ETH0.009707788264 ETH0.790319809
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd89b61fc4244c483b1145fb565beefb984956ab2699f0f8b5d30f9b72fea17c9181277262022-07-20 16:49:51427 days 17 hrs ago 0x48252edbfcc8a27390827950ccfc1c00152894e3 Dopex: Fee Strategy0 ETH
0xf7a8344788d336e00c5380d40e3fc34f20d757c8773103224f0e19529e57074d145743062022-06-14 5:31:35464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xcd1133934a2919ed187f368401e56b358573ebf7ad81a14ca4bcb0e34f2e7070145742652022-06-14 5:30:14464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xad018fd493e6c6264e68ebeb669deb89db634120edbed481e074566299aacd02145742212022-06-14 5:29:50464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x44bd4bc01c84df408e4679da5f9ccc7c3db4c41cc60868e3e00f2b15abaf0682145741502022-06-14 5:29:16464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xe82a5ec8fb85c35d6a477d7ac5d03a36b30df421273f545de06cb93aad2e5939145741332022-06-14 5:28:28464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x9eaaf067bd4249c38f1239d8bbb452c48cf4161854d889d10f77ce6e9316252d145741022022-06-14 5:28:28464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x2f9be9853c559f72b7662fe9f8d4e3e137b93feed5d079b59a30be6962ff0249145740472022-06-14 5:27:04464 days 4 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x49fa8224ac992ce826ab283c745c94ec7c81355abdf48d6d34c32df4bf0c0d52144545742022-06-13 2:04:35465 days 8 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x10b5dfb6b8b159d3a9c2f07b6c343bed70534856f13df928e387b707373f01e2141091102022-06-09 0:48:57469 days 9 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x1b0b6668ebba0abef9f1bda8218cd4dae4201b4a0dcfaf5a86afc31f5a4b42c9140370912022-06-08 5:00:03470 days 5 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xa593bb1c8f5e7e029416e9bedba1bd9f18b5372e2d740a6150f7a5c8ef4367d9139952492022-06-07 16:52:31470 days 17 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xcaf1c851033a05eb7b30f021f8ee164801bae258f2ae8c867bdbe25a350ffa86139844562022-06-07 14:37:42470 days 19 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x7e85f1f361f34b18db546a179c7611de655338766b8443a2181d1364d34cc214139126042022-06-06 22:18:43471 days 11 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x42cb3817a599a43e5c638e8611812a706075026c972614e17c832d6a5d959c79138960502022-06-06 17:32:42471 days 16 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xc295f5a75f85ec6ecbcba3a88e093aa92537468db83cdcbf490c59fc36156fe0138534712022-06-06 8:53:19472 days 1 hr ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x34687ad0d2973117336b9c65297a76e048db91dcf785f1cd1891ab4717535aa2137335752022-06-04 21:53:33473 days 12 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xbba27c063cd07b4e218e669502bed5d93b1073ed1b88822803a07a5cbd236cc2136293402022-06-03 16:17:30474 days 17 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x57503aa708392b59504347b14901a6c3036857f666d6ab7bffddd9d8e49178ba135511072022-06-02 18:46:39475 days 15 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x1f46745c8398fabc9565d2fad38d11d9e35c425e19636b1adbbc502af730a030135510302022-06-02 18:44:28475 days 15 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0xa3fed55309193923072167055c5382fba32f1d73a5442a00d25c608e26f1f60b117984092022-05-11 13:27:09497 days 20 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x409e99ea685b2759a1c7a4a0f83b8ecb6991330a5f196ce9360cea5004b92ea4117820262022-05-11 9:53:13498 days 22 mins ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x60b9b4fb1472b21887af67c6d7945e528681477f3f0dc0a89a33f56b6dcc0233113373592022-05-06 14:22:57502 days 19 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x522c874467fb92cd0fb1659b6102cd693c7239408300eb7c67af052053e73e22112711422022-05-05 18:48:13503 days 15 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
0x7147f3b9f8ae5b06d424c7172ec234dc0d1dbc4f0b48903568600bebb079e7dc112710662022-05-05 18:46:17503 days 15 hrs ago 0x5be3c77ed3cd42fc2c702c9fcd665f515862b0ae Dopex: Fee Strategy0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeStrategy

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 2 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 3 of 4 : FeeStrategy.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

// Contracts
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';

// Interfaces
import {IFeeStrategy} from './IFeeStrategy.sol';

contract FeeStrategy is Ownable, IFeeStrategy {
    /// @dev Purchase Fee: x% of the price of the underlying asset * the amount of options being bought * OTM Fee Multiplier
    uint256 public purchaseFeePercentage = 125e8 / 1000; // 0.125%

    /// @dev Settlement Fee: x% of the settlement price
    uint256 public settlementFeePercentage = 125e8 / 1000; // 0.125%

    event PurchaseFeePercentageUpdate(uint256 newFee);

    event SettlementFeePercentageUpdate(uint256 newFee);

    /// @notice Update the purchase fee percentage
    /// @dev Can only be called by owner
    /// @param newFee The new fee
    /// @return Whether it was successfully updated
    function updatePurchaseFeePercentage(uint256 newFee)
        external
        onlyOwner
        returns (bool)
    {
        purchaseFeePercentage = newFee;
        emit PurchaseFeePercentageUpdate(newFee);
        return true;
    }

    /// @notice Update the settlement fee percentage
    /// @dev Can only be called by owner
    /// @param newFee The new fee
    /// @return Whether it was successfully updated
    function updateSettlementFeePercentage(uint256 newFee)
        external
        onlyOwner
        returns (bool)
    {
        settlementFeePercentage = newFee;
        emit SettlementFeePercentageUpdate(newFee);
        return true;
    }

    /// @notice Calculate Fees for purchase
    /// @param price settlement price of DPX
    /// @param strike total pnl
    /// @param amount amount of options being bought
    function calculatePurchaseFees(
        uint256 price,
        uint256 strike,
        uint256 amount
    ) external view returns (uint256 finalFee) {
        finalFee = (purchaseFeePercentage * amount) / 1e10;

        if (price < strike) {
            uint256 feeMultiplier = (((strike * 100) / (price)) - 100) + 100;
            finalFee = (feeMultiplier * finalFee) / 100;
        }
    }

    /// @notice Calculate Fees for settlement
    function calculateSettlementFees(
        uint256,
        uint256,
        uint256
    ) external view returns (uint256 finalFee) {
        finalFee = settlementFeePercentage * 0;
    }
}

File 4 of 4 : IFeeStrategy.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface IFeeStrategy {
    function calculatePurchaseFees(
        uint256,
        uint256,
        uint256
    ) external view returns (uint256);

    function calculateSettlementFees(
        uint256,
        uint256,
        uint256
    ) external view returns (uint256);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"PurchaseFeePercentageUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SettlementFeePercentageUpdate","type":"event"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"strike","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculatePurchaseFees","outputs":[{"internalType":"uint256","name":"finalFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"calculateSettlementFees","outputs":[{"internalType":"uint256","name":"finalFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settlementFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"updatePurchaseFeePercentage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"updateSettlementFeePercentage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405262bebc2060015562bebc2060025534801561001e57600080fd5b506100283361002d565b61007d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61053a8061008c6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100f4578063e8468ee41461010f578063f2fde38b14610122578063f3fa349514610135578063f72bf8fe1461013e57600080fd5b806329520cae146100985780633df8cd72146100c05780636efb0961146100d7578063715018a6146100ea575b600080fd5b6100ab6100a63660046103db565b610151565b60405190151581526020015b60405180910390f35b6100c960015481565b6040519081526020016100b7565b6100ab6100e53660046103db565b6101c6565b6100f2610226565b005b6000546040516001600160a01b0390911681526020016100b7565b6100c961011d3660046103f4565b61025c565b6100f2610130366004610420565b6102d7565b6100c960025481565b6100c961014c3660046103f4565b610372565b600080546001600160a01b031633146101855760405162461bcd60e51b815260040161017c90610449565b60405180910390fd5b60018290556040518281527f88c8f67db38a241af42dba37213346faea29bb6f89bce646dbcd9f99ee352690906020015b60405180910390a1506001919050565b600080546001600160a01b031633146101f15760405162461bcd60e51b815260040161017c90610449565b60028290556040518281527f0e8e71e7bd900df8f81533097de2d408d5ba1e61b99e7c72aea4bf24c766ed0e906020016101b6565b6000546001600160a01b031633146102505760405162461bcd60e51b815260040161017c90610449565b61025a600061038b565b565b60006402540be400826001546102729190610494565b61027c91906104b3565b9050828410156102d05760006064856102958683610494565b61029f91906104b3565b6102a991906104d5565b6102b49060646104ec565b905060646102c28383610494565b6102cc91906104b3565b9150505b9392505050565b6000546001600160a01b031633146103015760405162461bcd60e51b815260040161017c90610449565b6001600160a01b0381166103665760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161017c565b61036f8161038b565b50565b600060025460006103839190610494565b949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156103ed57600080fd5b5035919050565b60008060006060848603121561040957600080fd5b505081359360208301359350604090920135919050565b60006020828403121561043257600080fd5b81356001600160a01b03811681146102d057600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156104ae576104ae61047e565b500290565b6000826104d057634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156104e7576104e761047e565b500390565b600082198211156104ff576104ff61047e565b50019056fea26469706673582212200042ad163c7917fa2bfffad423bb41f7b45dc029199cdf40e5478c9d1592ac5564736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.