ETH Price: $3,925.70 (+5.83%)

Contract

0xb9431E19B29B952d9358025f680077C3Fd37292f
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim213015912024-11-30 16:09:114 days ago1732982951IN
dYdX: Rewards Treasury Vester
0 ETH0.0028167814.46275195
Claim212838702024-11-28 4:30:597 days ago1732768259IN
dYdX: Rewards Treasury Vester
0 ETH0.0014667.52720898
Claim212616442024-11-25 1:59:5910 days ago1732499999IN
dYdX: Rewards Treasury Vester
0 ETH0.001457327.48265662
Claim211292022024-11-06 14:27:4728 days ago1730903267IN
dYdX: Rewards Treasury Vester
0 ETH0.0034698617.81600804
Claim211070992024-11-03 12:24:4732 days ago1730636687IN
dYdX: Rewards Treasury Vester
0 ETH0.000813894.17894573
Claim202964702024-07-13 8:44:11145 days ago1720860251IN
dYdX: Rewards Treasury Vester
0 ETH0.000342021.75611476
Claim202962502024-07-13 7:59:59145 days ago1720857599IN
dYdX: Rewards Treasury Vester
0 ETH0.000326141.67457692
Claim198830592024-05-16 14:13:35202 days ago1715868815IN
dYdX: Rewards Treasury Vester
0 ETH0.001234266.33734895
Claim195824172024-04-04 12:31:47245 days ago1712233907IN
dYdX: Rewards Treasury Vester
0 ETH0.0047377324.3258809
Claim190503302024-01-20 20:01:23319 days ago1705780883IN
dYdX: Rewards Treasury Vester
0 ETH0.0032838316.86086665
Claim190007882024-01-13 21:55:23326 days ago1705182923IN
dYdX: Rewards Treasury Vester
0 ETH0.0037165219.08249127
Claim189829622024-01-11 10:02:23329 days ago1704967343IN
dYdX: Rewards Treasury Vester
0 ETH0.0046201423.72212094
Claim188243352023-12-20 3:05:35351 days ago1703041535IN
dYdX: Rewards Treasury Vester
0 ETH0.0066155533.96756939
Claim187426192023-12-08 16:05:35362 days ago1702051535IN
dYdX: Rewards Treasury Vester
0 ETH0.0086475644.40090384
Claim186975712023-12-02 8:37:59369 days ago1701506279IN
dYdX: Rewards Treasury Vester
0 ETH0.0065478633.62002632
Claim186824732023-11-30 5:55:35371 days ago1701323735IN
dYdX: Rewards Treasury Vester
0 ETH0.0071178129.48103806
Claim186097872023-11-20 1:40:47381 days ago1700444447IN
dYdX: Rewards Treasury Vester
0 ETH0.0037967519.49445004
Claim184917332023-11-03 13:08:47398 days ago1699016927IN
dYdX: Rewards Treasury Vester
0 ETH0.0048805525.0592014
Claim182227022023-09-26 21:43:11435 days ago1695764591IN
dYdX: Rewards Treasury Vester
0 ETH0.0028005914.37965037
Claim181535802023-09-17 5:03:47445 days ago1694927027IN
dYdX: Rewards Treasury Vester
0 ETH0.001473637.56640171
Claim181535652023-09-17 5:00:47445 days ago1694926847IN
dYdX: Rewards Treasury Vester
0 ETH0.00144627.42555806
Claim176339112023-07-06 9:26:59518 days ago1688635619IN
dYdX: Rewards Treasury Vester
0 ETH0.0072846637.40309907
Claim176337882023-07-06 9:02:11518 days ago1688634131IN
dYdX: Rewards Treasury Vester
0 ETH0.0090246.3132176
Claim176337872023-07-06 9:01:59518 days ago1688634119IN
dYdX: Rewards Treasury Vester
0 ETH0.0089279845.84073079
Claim174828952023-06-15 4:23:23539 days ago1686803003IN
dYdX: Rewards Treasury Vester
0 ETH0.0032321216.59534017
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:
TreasuryVester

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : TreasuryVester.sol
// Contracts by dYdX Foundation. Individual files are released under different licenses.
//
// https://dydx.community
// https://github.com/dydxfoundation/governance-contracts
//
// SPDX-License-Identifier: MIT

pragma solidity 0.7.5;

import { SafeMath } from '../dependencies/open-zeppelin/SafeMath.sol';

contract TreasuryVester {
    using SafeMath for uint256;

    address public dydx;
    address public recipient;

    uint256 public vestingAmount;
    uint256 public vestingBegin;
    uint256 public vestingCliff;
    uint256 public vestingEnd;

    uint256 public lastUpdate;

    constructor(
        address dydx_,
        address recipient_,
        uint256 vestingAmount_,
        uint256 vestingBegin_,
        uint256 vestingCliff_,
        uint256 vestingEnd_
    ) {
        require(vestingBegin_ >= block.timestamp, 'VESTING_BEGIN_TOO_EARLY');
        require(vestingCliff_ >= vestingBegin_, 'VESTING_CLIFF_BEFORE_BEGIN');
        require(vestingEnd_ > vestingCliff_, 'VESTING_END_BEFORE_CLIFF');

        dydx = dydx_;
        recipient = recipient_;

        vestingAmount = vestingAmount_;
        vestingBegin = vestingBegin_;
        vestingCliff = vestingCliff_;
        vestingEnd = vestingEnd_;

        lastUpdate = vestingBegin;
    }

    function setRecipient(address recipient_) public {
        require(msg.sender == recipient, 'SET_RECIPIENT_UNAUTHORIZED');
        recipient = recipient_;
    }

    function claim() public {
        require(block.timestamp >= vestingCliff, 'CLAIM_TOO_EARLY');
        uint256 amount;
        if (block.timestamp >= vestingEnd) {
            amount = IDydx(dydx).balanceOf(address(this));
        } else {
            amount = vestingAmount.mul(block.timestamp - lastUpdate).div(vestingEnd - vestingBegin);
            lastUpdate = block.timestamp;
        }
        IDydx(dydx).transfer(recipient, amount);
    }
}

interface IDydx {
    function balanceOf(address account) external view returns (uint256);
    function transfer(address dst, uint256 rawAmount) external returns (bool);
}

File 2 of 2 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.7.5;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, 'SafeMath: addition overflow');

    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, 'SafeMath: subtraction overflow');
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, 'SafeMath: multiplication overflow');

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, 'SafeMath: division by zero');
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, 'SafeMath: modulo by zero');
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(
    uint256 a,
    uint256 b,
    string memory errorMessage
  ) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"dydx_","type":"address"},{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"vestingAmount_","type":"uint256"},{"internalType":"uint256","name":"vestingBegin_","type":"uint256"},{"internalType":"uint256","name":"vestingCliff_","type":"uint256"},{"internalType":"uint256","name":"vestingEnd_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dydx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516106bb3803806106bb833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091428310156100ad576040805162461bcd60e51b815260206004820152601760248201527f56455354494e475f424547494e5f544f4f5f4541524c59000000000000000000604482015290519081900360640190fd5b82821015610102576040805162461bcd60e51b815260206004820152601a60248201527f56455354494e475f434c4946465f4245464f52455f424547494e000000000000604482015290519081900360640190fd5b818111610156576040805162461bcd60e51b815260206004820152601860248201527f56455354494e475f454e445f4245464f52455f434c4946460000000000000000604482015290519081900360640190fd5b600080546001600160a01b039788166001600160a01b0319918216179091556001805496909716951694909417909455600291909155600381905560049290925560055560065561050f806101ac6000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c806384a1931f1161006657806384a1931f146101055780638e4ec6ef1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d76101b4565b6100e9610341565b604080516001600160a01b039092168252519081900360200190f35b61009f610350565b6100e9610356565b61009f610365565b61009f61036b565b61009f610371565b60025481565b6001546001600160a01b03163314610192576040805162461bcd60e51b815260206004820152601a60248201527f5345545f524543495049454e545f554e415554484f52495a4544000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101fd576040805162461bcd60e51b815260206004820152600f60248201526e434c41494d5f544f4f5f4541524c5960881b604482015290519081900360640190fd5b6000600554421061028657600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561025357600080fd5b505afa158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b505190506102b6565b6102af600354600554036102a9600654420360025461037790919063ffffffff16565b906103d9565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561031257600080fd5b505af1158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b505050565b6001546001600160a01b031681565b60055481565b6000546001600160a01b031681565b60065481565b60035481565b60045481565b600082610386575060006103d3565b8282028284828161039357fe5b04146103d05760405162461bcd60e51b81526004018080602001828103825260218152602001806104b96021913960400191505060405180910390fd5b90505b92915050565b60006103d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561046757818101518382015260200161044f565b50505050905090810190601f1680156104945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104ae57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122087e79d51395641be17d761c90925a7346a52d71967348f6b0dafb4de6684219264736f6c6343000705003300000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e87100000000000000000000000000000000000000000131c039e0a8cd9b8344000000000000000000000000000000000000000000000000000000000000610959f000000000000000000000000000000000000000000000000000000000610959f0000000000000000000000000000000000000000000000000000000006a70acf0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100925760003560e01c806384a1931f1161006657806384a1931f146101055780638e4ec6ef1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d76101b4565b6100e9610341565b604080516001600160a01b039092168252519081900360200190f35b61009f610350565b6100e9610356565b61009f610365565b61009f61036b565b61009f610371565b60025481565b6001546001600160a01b03163314610192576040805162461bcd60e51b815260206004820152601a60248201527f5345545f524543495049454e545f554e415554484f52495a4544000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101fd576040805162461bcd60e51b815260206004820152600f60248201526e434c41494d5f544f4f5f4541524c5960881b604482015290519081900360640190fd5b6000600554421061028657600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561025357600080fd5b505afa158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b505190506102b6565b6102af600354600554036102a9600654420360025461037790919063ffffffff16565b906103d9565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561031257600080fd5b505af1158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b505050565b6001546001600160a01b031681565b60055481565b6000546001600160a01b031681565b60065481565b60035481565b60045481565b600082610386575060006103d3565b8282028284828161039357fe5b04146103d05760405162461bcd60e51b81526004018080602001828103825260218152602001806104b96021913960400191505060405180910390fd5b90505b92915050565b60006103d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561046757818101518382015260200161044f565b50505050905090810190601f1680156104945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104ae57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122087e79d51395641be17d761c90925a7346a52d71967348f6b0dafb4de6684219264736f6c63430007050033

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

00000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e87100000000000000000000000000000000000000000131c039e0a8cd9b8344000000000000000000000000000000000000000000000000000000000000610959f000000000000000000000000000000000000000000000000000000000610959f0000000000000000000000000000000000000000000000000000000006a70acf0

-----Decoded View---------------
Arg [0] : dydx_ (address): 0x92D6C1e31e14520e676a687F0a93788B716BEff5
Arg [1] : recipient_ (address): 0x639192D54431F8c816368D3FB4107Bc168d0E871
Arg [2] : vestingAmount_ (uint256): 369630137000000000000000000
Arg [3] : vestingBegin_ (uint256): 1628002800
Arg [4] : vestingCliff_ (uint256): 1628002800
Arg [5] : vestingEnd_ (uint256): 1785769200

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5
Arg [1] : 000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e871
Arg [2] : 00000000000000000000000000000000000000000131c039e0a8cd9b83440000
Arg [3] : 00000000000000000000000000000000000000000000000000000000610959f0
Arg [4] : 00000000000000000000000000000000000000000000000000000000610959f0
Arg [5] : 000000000000000000000000000000000000000000000000000000006a70acf0


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.