Contract 0x2775b1c75658Be0F640272CCb8c72ac986009e38 2

 
Txn Hash Method
Block
From
To
Value
0x5055117880e671c7d23da9db4764cd5d44b842aa463fd75a73204259e974569eDrip134419742021-10-18 13:03:559 days 3 hrs ago0x0bb43efc1a613658177d8f67ccf9cffd8b25b906 IN  Compound: Reservoir0 Ether0.004143719706 71.084344713
0x966cf030404ea375bce09b68f1298c8399789e3c6aeb2eee699ec65fe7162c25Drip134251762021-10-15 21:59:3011 days 18 hrs ago0x0006e4548aed4502ec8c844567840ce6ef1013f5 IN  Compound: Reservoir0 Ether0.005111348213 87.683739274
0x60e18302c0d734dc725562d22109fbf55cd797c17a084af2213306440e82e544Drip133675282021-10-06 20:18:3620 days 20 hrs ago0xea58de708abc631b424dc853556b8a6f39df2a79 IN  Compound: Reservoir0 Ether0.006891181988 118.21628649
0xc61d4ae81d8d5433c0abcc4c533083ad4d707360c2831e2288832ee43660ecaeDrip133674812021-10-06 20:09:0520 days 20 hrs ago0xea58de708abc631b424dc853556b8a6f39df2a79 IN  Compound: Reservoir0 Ether0.008347731698 143.202986603
0x9a2ec6eb92ff6805b3ac7414d1ccaa9e7c84d23730edfbce2fe50c9d88268f7aDrip133673962021-10-06 19:53:4420 days 20 hrs ago0xea58de708abc631b424dc853556b8a6f39df2a79 IN  Compound: Reservoir0 Ether0.006388704113 109.596420048
0xe5ef692b4fd80d2962c7c984b617b05033d723f10dde8e56ab48e5feced7da99Drip133586222021-10-05 10:47:2622 days 5 hrs ago0x9c9550871c8d714e90ee03e610b21f156381bdf1 IN  Compound: Reservoir0 Ether0.005681096989 97.457619085
0x52c13608fcc10c225174543416d5e7d6a410bdedaef80e234dc17eb0c6a1fb5bDrip133583352021-10-05 9:41:3322 days 6 hrs ago0x478fa4c971a077038b4fc5c172c3af5552224ccc IN  Compound: Reservoir0 Ether0.003837725477 65.835099884
0xb6fe04babe68d663388e4430879db352f6ebc67c920d627299d24c85ca928848Drip133580192021-10-05 8:34:0622 days 7 hrs ago0xfd3a879d8a492a68a846607abed995b9a7d20a8a IN  Compound: Reservoir0 Ether0.00398661515268.38926033
0xc1eda2bef1cdbafcfb9fc03de826e5b0d6b3d930754e48d9e075d6a95e82e357Drip133580182021-10-05 8:33:5922 days 7 hrs ago0xfd3a879d8a492a68a846607abed995b9a7d20a8a IN  Compound: Reservoir0 Ether0.00451178800277.398452693
0xda889f9a1e8f246d8255ed79159966c19f9bb23a65cb91c7da0e49c657c79324Drip133550412021-10-04 21:31:0922 days 19 hrs ago0x6f36a32195dc557b6e440565f20742e7d489196c IN  Compound: Reservoir0 Ether0.005955817217 102.170367247
0xbf2ff9acb2b9aa0963c0b98efc1fdb3c4f364c6a41b79c8faa70cd481115f310Drip133543592021-10-04 18:53:0122 days 21 hrs ago0x78ea4b7d7e5cadd0cb513a37756803ba33e66705 IN  Compound: Reservoir0 Ether0.005741899498 98.500669016
0x094c0f1ea9600ec35f1f9ec525021376006c512870a0246e4f0d605f111a9bbdDrip133542852021-10-04 18:39:4222 days 21 hrs ago0xea994add097015891a53bb059c563b633a287e62 IN  Compound: Reservoir0 Ether0.006315884091 108.347213078
0x30f5b87cc19a64717f74593313b5c4df8a9098a3ce69098aa04e5501c9c97636Drip133542312021-10-04 18:28:0622 days 22 hrs ago0xaedf1faa2bf66d06a43d084ec81b8365f5fb916e IN  Compound: Reservoir0 Ether0.005618340592 96.381050772
0x695b309d17bd07010838b1fd6f1bb514b0d4bb809f5113fa89305821ff53fb4cDrip133534772021-10-04 15:50:2323 days 40 mins ago0x33f79f4d6e1eae5ca94d8a924341421a35aa6e1b IN  Compound: Reservoir0 Ether0.006715950317 115.210236528
0x72364476c73f5ab708f7783b240719193508251d43451e30f318d290c33e1110Drip133527582021-10-04 13:06:2123 days 3 hrs ago0x933258bddd49beeca77f6d1889633c5429af45ea IN  Compound: Reservoir0 Ether0.003701643542 63.500652612
0xc124a888376c3e8e576aecc55f55a2a8cc9deb64fbfd20fc603bbd2002a4fee9Drip133527212021-10-04 12:59:2323 days 3 hrs ago0xbed5c4e636756dc373158a80d953719b4b405a3c IN  Compound: Reservoir0 Ether0.004646048717 79.701657442
0x3a9ed55bdb307bffe0121de2f4d3523f8e917aed849f0d3129af1997ec072f48Drip133527172021-10-04 12:58:2623 days 3 hrs ago0x2cdbad7b5704f8f0034a216d1b3b7522982e8bf7 IN  Compound: Reservoir0 Ether0.005215937543 89.477939784
0x8d79e4cd98bcca3e4f6c088518b38ad1c488ca650ac3df69239b47197a1db579Drip133523952021-10-04 11:43:2223 days 4 hrs ago0x2e53549136197ccdb60c2b62c4b078bf0a8a8335 IN  Compound: Reservoir0 Ether0.002998900178 51.445288087
0xeb5242cc6700fa8cb14c86f0782699c3ee5af0d60eec3cf73dd5b14fb8dda990Drip133513922021-10-04 7:55:5023 days 8 hrs ago0x65afc7380d3147b49d8ab29c45210d34fa94896e IN  Compound: Reservoir0 Ether0.00385067481666.057242142
0xad8b1cf3a8a8455e7b811f073bbc085b7f5d5932db8414c72ba69e4fdb437433Drip133511572021-10-04 7:03:1223 days 9 hrs ago0x8c70d45566f6786cefcb15c9c9570407f826f5c9 IN  Compound: Reservoir0 Ether0.002973999793 51.018128996
0x861fc827e7cd98b50644e282fce8587daf2862ad64f9d434a2774ab8ce395080Drip133511432021-10-04 7:00:5623 days 9 hrs ago0xf41feaa9d4544b80b2806a981f82c679589e75ae IN  Compound: Reservoir0 Ether0.004225897753 72.494085967
0xbb0aec6f087955c48be9eda2f840c1bd5118b96ea49ceb158e45a88634800e41Drip133503502021-10-04 3:53:2523 days 12 hrs ago0x2d0a42fc969b064a87adf3b657ef3fd315f82cd8 IN  Compound: Reservoir0 Ether0.00352640578 60.494498144
0xe56c64bd4ee18f75d150b1cb6d7c72ae8ede3bb230d00166844512752e093165Drip133503232021-10-04 3:47:5823 days 12 hrs ago0x6f25865e0cd6aa0eaed6d7117b8bc6c848deed77 IN  Compound: Reservoir0 Ether0.004519741467 77.534892139
0xc65718ee6cf04f45e79b922e7d40bd00671e34956228f24d4b7eb1d530a0df91Drip133502632021-10-04 3:33:5523 days 12 hrs ago0xabfcac505aeb2fc74f4d2856411c7407285e46ff IN  Compound: Reservoir0 Ether0.003077870452.8
0xcd6a46c1c259b194b4f736a862437a707514af3281eb218fa3a3d5d17fe123b9Drip133495522021-10-04 0:50:3923 days 15 hrs ago0xc7d2fde79bdae639115607a5bddd1596058e9c29 IN  Compound: Reservoir0 Ether0.003666156215 62.891877499
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Reservoir

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : EIP20Interface.sol
pragma solidity ^0.5.16;

/**
 * @title ERC 20 Token Standard Interface
 *  https://eips.ethereum.org/EIPS/eip-20
 */
interface EIP20Interface {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);

    /**
      * @notice Get the total number of tokens in circulation
      * @return The supply of tokens
      */
    function totalSupply() external view returns (uint256);

    /**
     * @notice Gets the balance of the specified address
     * @param owner The address from which the balance will be retrieved
     * @return The balance
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
      * @notice Transfer `amount` tokens from `msg.sender` to `dst`
      * @param dst The address of the destination account
      * @param amount The number of tokens to transfer
      * @return Whether or not the transfer succeeded
      */
    function transfer(address dst, uint256 amount) external returns (bool success);

    /**
      * @notice Transfer `amount` tokens from `src` to `dst`
      * @param src The address of the source account
      * @param dst The address of the destination account
      * @param amount The number of tokens to transfer
      * @return Whether or not the transfer succeeded
      */
    function transferFrom(address src, address dst, uint256 amount) external returns (bool success);

    /**
      * @notice Approve `spender` to transfer up to `amount` from `src`
      * @dev This will overwrite the approval amount for `spender`
      *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
      * @param spender The address of the account which may transfer tokens
      * @param amount The number of tokens that are approved (-1 means infinite)
      * @return Whether or not the approval succeeded
      */
    function approve(address spender, uint256 amount) external returns (bool success);

    /**
      * @notice Get the current allowance from `owner` for `spender`
      * @param owner The address of the account which owns the tokens to be spent
      * @param spender The address of the account which may transfer tokens
      * @return The number of tokens allowed to be spent (-1 means infinite)
      */
    function allowance(address owner, address spender) external view returns (uint256 remaining);

    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(address indexed owner, address indexed spender, uint256 amount);
}

File 2 of 2 : Reservoir.sol
pragma solidity ^0.5.16;

/**
 * @title Reservoir Contract
 * @notice Distributes a token to a different contract at a fixed rate.
 * @dev This contract must be poked via the `drip()` function every so often.
 * @author Compound
 */
contract Reservoir {

  /// @notice The block number when the Reservoir started (immutable)
  uint public dripStart;

  /// @notice Tokens per block that to drip to target (immutable)
  uint public dripRate;

  /// @notice Reference to token to drip (immutable)
  EIP20Interface public token;

  /// @notice Target to receive dripped tokens (immutable)
  address public target;

  /// @notice Amount that has already been dripped
  uint public dripped;

  /**
    * @notice Constructs a Reservoir
    * @param dripRate_ Numer of tokens per block to drip
    * @param token_ The token to drip
    * @param target_ The recipient of dripped tokens
    */
  constructor(uint dripRate_, EIP20Interface token_, address target_) public {
    dripStart = block.number;
    dripRate = dripRate_;
    token = token_;
    target = target_;
    dripped = 0;
  }

  /**
    * @notice Drips the maximum amount of tokens to match the drip rate since inception
    * @dev Note: this will only drip up to the amount of tokens available.
    * @return The amount of tokens dripped in this call
    */
  function drip() public returns (uint) {
    // First, read storage into memory
    EIP20Interface token_ = token;
    uint reservoirBalance_ = token_.balanceOf(address(this)); // TODO: Verify this is a static call
    uint dripRate_ = dripRate;
    uint dripStart_ = dripStart;
    uint dripped_ = dripped;
    address target_ = target;
    uint blockNumber_ = block.number;

    // Next, calculate intermediate values
    uint dripTotal_ = mul(dripRate_, blockNumber_ - dripStart_, "dripTotal overflow");
    uint deltaDrip_ = sub(dripTotal_, dripped_, "deltaDrip underflow");
    uint toDrip_ = min(reservoirBalance_, deltaDrip_);
    uint drippedNext_ = add(dripped_, toDrip_, "tautological");

    // Finally, write new `dripped` value and transfer tokens to target
    dripped = drippedNext_;
    token_.transfer(target_, toDrip_);

    return toDrip_;
  }

  /* Internal helper functions for safe math */

  function add(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
    uint c = a + b;
    require(c >= a, errorMessage);
    return c;
  }

  function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
    require(b <= a, errorMessage);
    uint c = a - b;
    return c;
  }

  function mul(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
    if (a == 0) {
      return 0;
    }
    uint c = a * b;
    require(c / a == b, errorMessage);
    return c;
  }

  function min(uint a, uint b) internal pure returns (uint) {
    if (a <= b) {
      return a;
    } else {
      return b;
    }
  }
}

import "./EIP20Interface.sol";

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"dripRate_","type":"uint256"},{"internalType":"contract EIP20Interface","name":"token_","type":"address"},{"internalType":"address","name":"target_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[],"name":"drip","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"dripRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dripStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dripped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"target","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract EIP20Interface","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161052c38038061052c8339818101604052606081101561003357600080fd5b5080516020820151604090920151436000908155600192909255600280546001600160a01b039485166001600160a01b031991821617909155600380549490921693169290921790915560045561049d8061008f6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806388a91a8a1461006757806395f632b3146100815780639f678cca14610089578063d326159214610091578063d4b8399214610099578063fc0c546a146100bd575b600080fd5b61006f6100c5565b60408051918252519081900360200190f35b61006f6100cb565b61006f6100d1565b61006f6102c9565b6100a16102cf565b604080516001600160a01b039092168252519081900360200190f35b6100a16102de565b60005481565b60045481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b15801561012057600080fd5b505afa158015610134573d6000803e3d6000fd5b505050506040513d602081101561014a57600080fd5b50516001546000805460045460035460408051808201909152601281527164726970546f74616c206f766572666c6f7760701b60208201529596509394919390926001600160a01b03909116914391906101a9908790878503906102ed565b905060006101e382866040518060400160405280601381526020017264656c74614472697020756e646572666c6f7760681b8152506103a0565b905060006101f189836103fa565b9050600061022487836040518060400160405280600c81526020016b1d185d5d1bdb1bd9da58d85b60a21b815250610413565b9050806004819055508a6001600160a01b031663a9059cbb87846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561028d57600080fd5b505af11580156102a1573d6000803e3d6000fd5b505050506040513d60208110156102b757600080fd5b50919b50505050505050505050505090565b60015481565b6003546001600160a01b031681565b6002546001600160a01b031681565b6000836102fc57506000610399565b8383028385828161030957fe5b041483906103955760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561035a578181015183820152602001610342565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5090505b9392505050565b600081848411156103f25760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a578181015183820152602001610342565b505050900390565b600081831161040a57508161040d565b50805b92915050565b600083830182858210156103955760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a57818101518382015260200161034256fea265627a7a7231582097280a1b285840f7c294f6cf19d3126dcd6debd8c971896e1d4eb946582b6a8f64736f6c6343000510003200000000000000000000000000000000000000000000000006f05b59d3b20000000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b

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

00000000000000000000000000000000000000000000000006f05b59d3b20000000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b

-----Decoded View---------------
Arg [0] : dripRate_ (uint256): 500000000000000000
Arg [1] : token_ (address): 0xc00e94cb662c3520282e6f5717214004a7f26888
Arg [2] : target_ (address): 0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [1] : 000000000000000000000000c00e94cb662c3520282e6f5717214004a7f26888
Arg [2] : 0000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.