ETH Price: $3,414.63 (+0.97%)
Gas: 4 Gwei

Contract

0x84f4625C3E92b368E403cB002A9bF9bc7a9ae1b9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Withdraw201909992024-06-28 15:11:472 days ago1719587507IN
0x84f4625C...c7a9ae1b9
0 ETH0.0007960512.00902731
Withdraw201637912024-06-24 20:00:475 days ago1719259247IN
0x84f4625C...c7a9ae1b9
0 ETH0.000557248.40642129
Withdraw201498572024-06-22 21:14:477 days ago1719090887IN
0x84f4625C...c7a9ae1b9
0 ETH0.000132582.00006587
Withdraw200956512024-06-15 7:17:3515 days ago1718435855IN
0x84f4625C...c7a9ae1b9
0 ETH0.000376825.68466248
Withdraw200215652024-06-04 22:52:4725 days ago1717541567IN
0x84f4625C...c7a9ae1b9
0 ETH0.000543838.20412379
Withdraw199751412024-05-29 11:11:3532 days ago1716981095IN
0x84f4625C...c7a9ae1b9
0 ETH0.0007096210.70511835
Withdraw199556562024-05-26 17:50:5935 days ago1716745859IN
0x84f4625C...c7a9ae1b9
0 ETH0.000642269.68906102
Withdraw199547402024-05-26 14:47:2335 days ago1716734843IN
0x84f4625C...c7a9ae1b9
0 ETH0.000659169.94392722
Withdraw198456592024-05-11 8:40:2350 days ago1715416823IN
0x84f4625C...c7a9ae1b9
0 ETH0.000380985.74739655
Withdraw198390572024-05-10 10:32:1151 days ago1715337131IN
0x84f4625C...c7a9ae1b9
0 ETH0.000354115.34210575
Withdraw197770822024-05-01 18:30:1160 days ago1714588211IN
0x84f4625C...c7a9ae1b9
0 ETH0.0007592111.45328764
Withdraw197478622024-04-27 16:29:1164 days ago1714235351IN
0x84f4625C...c7a9ae1b9
0 ETH0.00042386.39333
Withdraw197137742024-04-22 21:59:2368 days ago1713823163IN
0x84f4625C...c7a9ae1b9
0 ETH0.000226877.93811953
Withdraw197137722024-04-22 21:58:5968 days ago1713823139IN
0x84f4625C...c7a9ae1b9
0 ETH0.00051967.83857224
Withdraw197008332024-04-21 2:34:1170 days ago1713666851IN
0x84f4625C...c7a9ae1b9
0 ETH0.000370445.58835532
Withdraw196649932024-04-16 2:12:3575 days ago1713233555IN
0x84f4625C...c7a9ae1b9
0 ETH0.000528547.97345019
Withdraw196028582024-04-07 9:14:4784 days ago1712481287IN
0x84f4625C...c7a9ae1b9
0 ETH0.0010118415.26437874
Withdraw195856762024-04-04 23:29:1186 days ago1712273351IN
0x84f4625C...c7a9ae1b9
0 ETH0.0009044513.64436233
Withdraw195601502024-04-01 9:40:5990 days ago1711964459IN
0x84f4625C...c7a9ae1b9
0 ETH0.0013595520.50987902
Withdraw195115472024-03-25 12:38:5997 days ago1711370339IN
0x84f4625C...c7a9ae1b9
0 ETH0.0013738520.72552286
Withdraw193092982024-02-26 4:15:35125 days ago1708920935IN
0x84f4625C...c7a9ae1b9
0 ETH0.0015945424.05488152
Withdraw192553302024-02-18 14:38:11133 days ago1708267091IN
0x84f4625C...c7a9ae1b9
0 ETH0.0013527620.40734979
Withdraw191985882024-02-10 15:28:47141 days ago1707578927IN
0x84f4625C...c7a9ae1b9
0 ETH0.0021163831.9270506
Withdraw191755902024-02-07 10:01:35144 days ago1707300095IN
0x84f4625C...c7a9ae1b9
0 ETH0.0019193928.95539359
Withdraw191221302024-01-30 21:53:23151 days ago1706651603IN
0x84f4625C...c7a9ae1b9
0 ETH0.0014495721.86783148
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ClipperProtocolDeposit

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 9 : ClipperProtocolDeposit.sol
// SPDX-License-Identifier: UNLICENSED
// Copyright 2023 Shipyard Software, Inc.
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "./interfaces/SanctionsList.sol";

contract ClipperProtocolDeposit is Ownable, ReentrancyGuard {

    using SafeERC20 for IERC20;

    uint256 private constant ONE_IN_TEN_DECIMALS = 1e10;
    uint256 private constant MAXIMUM_DAO_WITHDRAWAL_IN_TEN_DECIMALS = ONE_IN_TEN_DECIMALS/20;
    uint256 private constant MINIMUM_DURATION_BETWEEN_DAO_FEE_WITHDRAWAL = 7 days;

    address public immutable CLIPPER_EXCHANGE;
    address public immutable SANCTIONS_REGISTRY;

    mapping(address => uint256) private _balances;
    uint256 private _totalSupply;

    uint256 public lastDaoWithdrawal;

    event LPWithdrawn(
        address indexed depositor,
        uint256 clipperLPWithdrawn,
        uint256 shadowTokensBurned
    );

    event LPDeposited(
        address indexed depositor,
        uint256 clipperLPDeposited,
        uint256 shadowTokensMinted
    );

    event FeesTaken(
        uint256 entitledFeesInDollars,
        uint256 averagePoolBalanceInDollars,
        uint256 tokensTransferred
    );

    error DAOFeeSplitTooMuch();
    error DAOFeeSplitTooSoon();
    error InvalidWithdrawal();
    error ZeroAddressShadowTokenOperation();
    error SanctionedSender();

    modifier onlyUnsanctionedSenders {
        if(SanctionsList(SANCTIONS_REGISTRY).isSanctioned(msg.sender)){
            revert SanctionedSender();
        }
        _;
    }


    constructor(address theExchange, address theSanctionsContract) {
        CLIPPER_EXCHANGE = theExchange;
        SANCTIONS_REGISTRY = theSanctionsContract;
    }

    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function _mint(address account, uint256 amount) internal virtual {
        if(account == address(0)){
            revert ZeroAddressShadowTokenOperation();
        }

        _totalSupply += amount;
        _balances[account] += amount;
    }

    function _burn(address account, uint256 amount) internal virtual {
        if(account == address(0)){
            revert ZeroAddressShadowTokenOperation();
        }

        uint256 accountBalance = _balances[account];
        if(accountBalance < amount){
            revert InvalidWithdrawal();
        }
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;
    }

    function _tokensForAlreadyMadeLPDeposit(uint256 amount) internal view returns (uint256) {
        uint256 balanceBeforeDeposit = _lpTokenBalance()-amount;
        // totalSupply check avoids issues around sending in more tokens first
        uint256 _supply = totalSupply();
        if(balanceBeforeDeposit==0 || _supply ==0){
            return amount;
        } else {
            return (amount*_supply)/balanceBeforeDeposit;
        }
    }

    function _lpTokensFromBurn(uint256 burnAmount) internal view returns (uint256) {
        uint256 _supply = totalSupply();
        if(_supply > 0){
            return (burnAmount*_lpTokenBalance())/_supply;
        } else {
            return 0;
        }
    }

    function _lpTokenBalance() internal view returns (uint256) {
        return IERC20(CLIPPER_EXCHANGE).balanceOf(address(this));
    }

    function takeFees(uint256 entitledFeesInDollars, uint256 averagePoolBalanceInDollars) external onlyOwner {
        // calculate fraction in base ten
        uint256 theFraction = (ONE_IN_TEN_DECIMALS*entitledFeesInDollars)/averagePoolBalanceInDollars;
        // Check: less than the max?
        if(theFraction > MAXIMUM_DAO_WITHDRAWAL_IN_TEN_DECIMALS) {
            revert DAOFeeSplitTooMuch();
        }
        // Check: OK to send?
        if(block.timestamp < lastDaoWithdrawal+MINIMUM_DURATION_BETWEEN_DAO_FEE_WITHDRAWAL){
            revert DAOFeeSplitTooSoon();
        }
        // Effects
        lastDaoWithdrawal = block.timestamp;

        // Interactions
        uint256 tokensToTransfer = (theFraction*_lpTokenBalance())/ONE_IN_TEN_DECIMALS;
        IERC20(CLIPPER_EXCHANGE).safeTransfer(msg.sender, tokensToTransfer);
        
        emit FeesTaken(entitledFeesInDollars, averagePoolBalanceInDollars, tokensToTransfer);
    }

    // Allows for proxy and helper contracts to deposit on behalf of the user
    function depositClipperLPFor(address account, uint256 amountOfClipperLP) public nonReentrant onlyUnsanctionedSenders {
        IERC20(CLIPPER_EXCHANGE).safeTransferFrom(msg.sender, address(this), amountOfClipperLP);

        uint256 shadowTokensMinted = _tokensForAlreadyMadeLPDeposit(amountOfClipperLP);
        _mint(account, shadowTokensMinted);

        emit LPDeposited(account, amountOfClipperLP, shadowTokensMinted);
    }

    function depositClipperLP(uint256 amountOfClipperLP) external {
        depositClipperLPFor(msg.sender, amountOfClipperLP);
    }

    function currentEffectiveLPTokenBalanceForUser(address user) external view returns (uint256) {
        uint256 _myDeposit = balanceOf(user);
        return _lpTokensFromBurn(_myDeposit);
    }

    function _withdraw(uint256 shadowTokensToBurn) internal {
        if(shadowTokensToBurn == 0){
            revert InvalidWithdrawal();
        }
        uint256 clipperLPtoWithdraw = _lpTokensFromBurn(shadowTokensToBurn);
        // Effects. Reverts if burn is too much.
        _burn(msg.sender, shadowTokensToBurn);

        // Interactions
        IERC20(CLIPPER_EXCHANGE).safeTransfer(msg.sender, clipperLPtoWithdraw);

        emit LPWithdrawn(msg.sender, clipperLPtoWithdraw, shadowTokensToBurn);
    }

    function withdraw() external nonReentrant {
        // Checks
        uint256 _myDeposit = balanceOf(msg.sender);
        _withdraw(_myDeposit);
    }

    function withdrawPartial(uint256 shadowTokensToBurn) external nonReentrant {
        _withdraw(shadowTokensToBurn);
    }

}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 3 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 9 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 5 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external 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) external 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) external 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) external 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
    ) external returns (bool);
}

File 6 of 9 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 9 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 8 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 9 of 9 : SanctionsList.sol
// SPDX-License-Identifier: UNLICENSED
// Copyright 2023 Shipyard Software, Inc.
pragma solidity ^0.8.0;

interface SanctionsList {
    function isSanctioned(address addr) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"theExchange","type":"address"},{"internalType":"address","name":"theSanctionsContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DAOFeeSplitTooMuch","type":"error"},{"inputs":[],"name":"DAOFeeSplitTooSoon","type":"error"},{"inputs":[],"name":"InvalidWithdrawal","type":"error"},{"inputs":[],"name":"SanctionedSender","type":"error"},{"inputs":[],"name":"ZeroAddressShadowTokenOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"entitledFeesInDollars","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"averagePoolBalanceInDollars","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensTransferred","type":"uint256"}],"name":"FeesTaken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"clipperLPDeposited","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shadowTokensMinted","type":"uint256"}],"name":"LPDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"clipperLPWithdrawn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shadowTokensBurned","type":"uint256"}],"name":"LPWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"CLIPPER_EXCHANGE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SANCTIONS_REGISTRY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"currentEffectiveLPTokenBalanceForUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOfClipperLP","type":"uint256"}],"name":"depositClipperLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amountOfClipperLP","type":"uint256"}],"name":"depositClipperLPFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastDaoWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"entitledFeesInDollars","type":"uint256"},{"internalType":"uint256","name":"averagePoolBalanceInDollars","type":"uint256"}],"name":"takeFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shadowTokensToBurn","type":"uint256"}],"name":"withdrawPartial","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b5060405161107d38038061107d83398101604081905261002f916100bf565b61003833610053565b600180556001600160a01b039182166080521660a0526100f2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100ba57600080fd5b919050565b600080604083850312156100d257600080fd5b6100db836100a3565b91506100e9602084016100a3565b90509250929050565b60805160a051610f446101396000396000818161019601526102bd01526000818160f40152818161037401528181610507015281816106ce01526109a70152610f446000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80635b16dcd91161008c5780638da5cb5b116100665780638da5cb5b146101e9578063d9bd8ba4146101fa578063ea2748f11461020d578063f2fde38b1461022057600080fd5b80635b16dcd91461019157806370a08231146101b8578063715018a6146101e157600080fd5b806326a2ea94116100c857806326a2ea941461015a5780633ae9530a146101635780633ccfd60b146101765780634b13828e1461017e57600080fd5b806306bd9310146100ef5780631211540c1461013357806318160ddd14610148575b600080fd5b6101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610146610141366004610d49565b610233565b005b6003545b60405190815260200161012a565b61014c60045481565b610146610171366004610d49565b610250565b61014661025a565b61014661018c366004610d7e565b610287565b6101167f000000000000000000000000000000000000000000000000000000000000000081565b61014c6101c6366004610da8565b6001600160a01b031660009081526002602052604090205490565b610146610405565b6000546001600160a01b0316610116565b610146610208366004610dc3565b610417565b61014c61021b366004610da8565b610575565b61014661022e366004610da8565b61059e565b61023b610630565b61024481610689565b61024d60018055565b50565b61024d3382610287565b610262610630565b3360009081526002602052604090205461027b81610689565b5061028560018055565b565b61028f610630565b6040517fdf592f7d0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063df592f7d90602401602060405180830381865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610de5565b15610367576040517f7d56b90000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61039c6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610734565b60006103a7826107eb565b90506103b38382610845565b60408051838152602081018390526001600160a01b038516917f68110eff112678c2b41e26b6f6fb09e80adcf42e4c096268137d5633787b0715910160405180910390a25061040160018055565b5050565b61040d6108b4565b610285600061090e565b61041f6108b4565b600081610431846402540be400610e1d565b61043b9190610e3a565b905061044d60146402540be400610e3a565b811115610486576040517f96c8678300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a806004546104979190610e5c565b4210156104d0576040517f282921d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260045560006402540be4006104e4610976565b6104ee9084610e1d565b6104f89190610e3a565b905061052e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610a1f565b60408051858152602081018590529081018290527f26092d07f0187f928cdea6737c0e6d7496aea7e4d4fb32daf1ccd48793ce0b8e9060600160405180910390a150505050565b6001600160a01b03811660009081526002602052604081205461059781610a6d565b9392505050565b6105a66108b4565b6001600160a01b0381166106275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61024d8161090e565b6002600154036106825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161061e565b6002600155565b806000036106aa5760405163c945242d60e01b815260040160405180910390fd5b60006106b582610a6d565b90506106c13383610aa7565b6106f56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610a1f565b604080518281526020810184905233917f86ef7829731d23705c76edb615e2feb99fd3832d911fd10bfca814e372925523910160405180910390a25050565b6040516001600160a01b03808516602483015283166044820152606481018290526107e59085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610b41565b50505050565b600080826107f7610976565b6108019190610e6f565b9050600061080e60035490565b905081158061081b575080155b1561082857509192915050565b816108338286610e1d565b61083d9190610e3a565b949350505050565b6001600160a01b03821661086c576040516311fd259960e11b815260040160405180910390fd5b806003600082825461087e9190610e5c565b90915550506001600160a01b038216600090815260026020526040812080548392906108ab908490610e5c565b90915550505050565b6000546001600160a01b031633146102855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061e565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a9190610e82565b905090565b6040516001600160a01b038316602482015260448101829052610a689084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610781565b505050565b600080610a7960035490565b90508015610a9e5780610a8a610976565b610a949085610e1d565b6105979190610e3a565b50600092915050565b6001600160a01b038216610ace576040516311fd259960e11b815260040160405180910390fd5b6001600160a01b03821660009081526002602052604090205481811015610b085760405163c945242d60e01b815260040160405180910390fd5b6001600160a01b0383166000908152600260205260408120838303905560038054849290610b37908490610e6f565b9091555050505050565b6000610b96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c269092919063ffffffff16565b805190915015610a685780806020019051810190610bb49190610de5565b610a685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161061e565b606061083d848460008585600080866001600160a01b03168587604051610c4d9190610ebf565b60006040518083038185875af1925050503d8060008114610c8a576040519150601f19603f3d011682016040523d82523d6000602084013e610c8f565b606091505b5091509150610ca087838387610cab565b979650505050505050565b60608315610d1a578251600003610d13576001600160a01b0385163b610d135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061e565b508161083d565b61083d8383815115610d2f5781518083602001fd5b8060405162461bcd60e51b815260040161061e9190610edb565b600060208284031215610d5b57600080fd5b5035919050565b80356001600160a01b0381168114610d7957600080fd5b919050565b60008060408385031215610d9157600080fd5b610d9a83610d62565b946020939093013593505050565b600060208284031215610dba57600080fd5b61059782610d62565b60008060408385031215610dd657600080fd5b50508035926020909101359150565b600060208284031215610df757600080fd5b8151801515811461059757600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610e3457610e34610e07565b92915050565b600082610e5757634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610e3457610e34610e07565b81810381811115610e3457610e34610e07565b600060208284031215610e9457600080fd5b5051919050565b60005b83811015610eb6578181015183820152602001610e9e565b50506000910152565b60008251610ed1818460208701610e9b565b9190910192915050565b6020815260008251806020840152610efa816040850160208701610e9b565b601f01601f1916919091016040019291505056fea2646970667358221220983efd902a60291e973f8bb3c4b952077a0306bd7c11efaf91bde1a5d1b1269564736f6c63430008130033000000000000000000000000655edce464cc797526600a462a8154650eee4b7700000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80635b16dcd91161008c5780638da5cb5b116100665780638da5cb5b146101e9578063d9bd8ba4146101fa578063ea2748f11461020d578063f2fde38b1461022057600080fd5b80635b16dcd91461019157806370a08231146101b8578063715018a6146101e157600080fd5b806326a2ea94116100c857806326a2ea941461015a5780633ae9530a146101635780633ccfd60b146101765780634b13828e1461017e57600080fd5b806306bd9310146100ef5780631211540c1461013357806318160ddd14610148575b600080fd5b6101167f000000000000000000000000655edce464cc797526600a462a8154650eee4b7781565b6040516001600160a01b0390911681526020015b60405180910390f35b610146610141366004610d49565b610233565b005b6003545b60405190815260200161012a565b61014c60045481565b610146610171366004610d49565b610250565b61014661025a565b61014661018c366004610d7e565b610287565b6101167f00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb81565b61014c6101c6366004610da8565b6001600160a01b031660009081526002602052604090205490565b610146610405565b6000546001600160a01b0316610116565b610146610208366004610dc3565b610417565b61014c61021b366004610da8565b610575565b61014661022e366004610da8565b61059e565b61023b610630565b61024481610689565b61024d60018055565b50565b61024d3382610287565b610262610630565b3360009081526002602052604090205461027b81610689565b5061028560018055565b565b61028f610630565b6040517fdf592f7d0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb6001600160a01b03169063df592f7d90602401602060405180830381865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610de5565b15610367576040517f7d56b90000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61039c6001600160a01b037f000000000000000000000000655edce464cc797526600a462a8154650eee4b7716333084610734565b60006103a7826107eb565b90506103b38382610845565b60408051838152602081018390526001600160a01b038516917f68110eff112678c2b41e26b6f6fb09e80adcf42e4c096268137d5633787b0715910160405180910390a25061040160018055565b5050565b61040d6108b4565b610285600061090e565b61041f6108b4565b600081610431846402540be400610e1d565b61043b9190610e3a565b905061044d60146402540be400610e3a565b811115610486576040517f96c8678300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a806004546104979190610e5c565b4210156104d0576040517f282921d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4260045560006402540be4006104e4610976565b6104ee9084610e1d565b6104f89190610e3a565b905061052e6001600160a01b037f000000000000000000000000655edce464cc797526600a462a8154650eee4b77163383610a1f565b60408051858152602081018590529081018290527f26092d07f0187f928cdea6737c0e6d7496aea7e4d4fb32daf1ccd48793ce0b8e9060600160405180910390a150505050565b6001600160a01b03811660009081526002602052604081205461059781610a6d565b9392505050565b6105a66108b4565b6001600160a01b0381166106275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61024d8161090e565b6002600154036106825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161061e565b6002600155565b806000036106aa5760405163c945242d60e01b815260040160405180910390fd5b60006106b582610a6d565b90506106c13383610aa7565b6106f56001600160a01b037f000000000000000000000000655edce464cc797526600a462a8154650eee4b77163383610a1f565b604080518281526020810184905233917f86ef7829731d23705c76edb615e2feb99fd3832d911fd10bfca814e372925523910160405180910390a25050565b6040516001600160a01b03808516602483015283166044820152606481018290526107e59085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610b41565b50505050565b600080826107f7610976565b6108019190610e6f565b9050600061080e60035490565b905081158061081b575080155b1561082857509192915050565b816108338286610e1d565b61083d9190610e3a565b949350505050565b6001600160a01b03821661086c576040516311fd259960e11b815260040160405180910390fd5b806003600082825461087e9190610e5c565b90915550506001600160a01b038216600090815260026020526040812080548392906108ab908490610e5c565b90915550505050565b6000546001600160a01b031633146102855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061e565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000655edce464cc797526600a462a8154650eee4b776001600160a01b0316906370a0823190602401602060405180830381865afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a9190610e82565b905090565b6040516001600160a01b038316602482015260448101829052610a689084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610781565b505050565b600080610a7960035490565b90508015610a9e5780610a8a610976565b610a949085610e1d565b6105979190610e3a565b50600092915050565b6001600160a01b038216610ace576040516311fd259960e11b815260040160405180910390fd5b6001600160a01b03821660009081526002602052604090205481811015610b085760405163c945242d60e01b815260040160405180910390fd5b6001600160a01b0383166000908152600260205260408120838303905560038054849290610b37908490610e6f565b9091555050505050565b6000610b96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c269092919063ffffffff16565b805190915015610a685780806020019051810190610bb49190610de5565b610a685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161061e565b606061083d848460008585600080866001600160a01b03168587604051610c4d9190610ebf565b60006040518083038185875af1925050503d8060008114610c8a576040519150601f19603f3d011682016040523d82523d6000602084013e610c8f565b606091505b5091509150610ca087838387610cab565b979650505050505050565b60608315610d1a578251600003610d13576001600160a01b0385163b610d135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061e565b508161083d565b61083d8383815115610d2f5781518083602001fd5b8060405162461bcd60e51b815260040161061e9190610edb565b600060208284031215610d5b57600080fd5b5035919050565b80356001600160a01b0381168114610d7957600080fd5b919050565b60008060408385031215610d9157600080fd5b610d9a83610d62565b946020939093013593505050565b600060208284031215610dba57600080fd5b61059782610d62565b60008060408385031215610dd657600080fd5b50508035926020909101359150565b600060208284031215610df757600080fd5b8151801515811461059757600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610e3457610e34610e07565b92915050565b600082610e5757634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610e3457610e34610e07565b81810381811115610e3457610e34610e07565b600060208284031215610e9457600080fd5b5051919050565b60005b83811015610eb6578181015183820152602001610e9e565b50506000910152565b60008251610ed1818460208701610e9b565b9190910192915050565b6020815260008251806020840152610efa816040850160208701610e9b565b601f01601f1916919091016040019291505056fea2646970667358221220983efd902a60291e973f8bb3c4b952077a0306bd7c11efaf91bde1a5d1b1269564736f6c63430008130033

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

000000000000000000000000655edce464cc797526600a462a8154650eee4b7700000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb

-----Decoded View---------------
Arg [0] : theExchange (address): 0x655eDCE464CC797526600a462A8154650EEe4B77
Arg [1] : theSanctionsContract (address): 0x40C57923924B5c5c5455c48D93317139ADDaC8fb

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000655edce464cc797526600a462a8154650eee4b77
Arg [1] : 00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb


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.