Feature Tip: Add private address tag to any address under My Name Tag !
Compound: Reservoir
Source Code
Latest 25 from a total of 149 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Drip | 22455172 | 300 days ago | IN | 0 ETH | 0.00017897 | ||||
| Drip | 22134921 | 344 days ago | IN | 0 ETH | 0.00004572 | ||||
| Drip | 22134917 | 344 days ago | IN | 0 ETH | 0.00005104 | ||||
| Drip | 22083376 | 352 days ago | IN | 0 ETH | 0.00005124 | ||||
| Drip | 22075581 | 353 days ago | IN | 0 ETH | 0.00005117 | ||||
| Drip | 22060580 | 355 days ago | IN | 0 ETH | 0.00006771 | ||||
| Drip | 19618114 | 696 days ago | IN | 0 ETH | 0.00140182 | ||||
| Drip | 18679355 | 828 days ago | IN | 0 ETH | 0.00285261 | ||||
| Drip | 17759378 | 956 days ago | IN | 0 ETH | 0.00092994 | ||||
| Drip | 17647100 | 972 days ago | IN | 0 ETH | 0.00077922 | ||||
| Drip | 16749008 | 1099 days ago | IN | 0 ETH | 0.001974 | ||||
| Drip | 16127161 | 1186 days ago | IN | 0 ETH | 0.00133911 | ||||
| Drip | 15390636 | 1292 days ago | IN | 0 ETH | 0.00204238 | ||||
| Drip | 14700703 | 1403 days ago | IN | 0 ETH | 0.00852338 | ||||
| Drip | 14503162 | 1434 days ago | IN | 0 ETH | 0.00366672 | ||||
| Drip | 13908546 | 1527 days ago | IN | 0 ETH | 0.00606355 | ||||
| Drip | 13441974 | 1600 days ago | IN | 0 ETH | 0.00414371 | ||||
| Drip | 13425176 | 1602 days ago | IN | 0 ETH | 0.00511134 | ||||
| Drip | 13367528 | 1612 days ago | IN | 0 ETH | 0.00689118 | ||||
| Drip | 13367481 | 1612 days ago | IN | 0 ETH | 0.00834773 | ||||
| Drip | 13367396 | 1612 days ago | IN | 0 ETH | 0.0063887 | ||||
| Drip | 13358622 | 1613 days ago | IN | 0 ETH | 0.00568109 | ||||
| Drip | 13358335 | 1613 days ago | IN | 0 ETH | 0.00383772 | ||||
| Drip | 13358019 | 1613 days ago | IN | 0 ETH | 0.00398661 | ||||
| Drip | 13358018 | 1613 days ago | IN | 0 ETH | 0.00451178 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Reservoir
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
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";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);
}{
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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"}]Contract Creation Code
608060405234801561001057600080fd5b5060405161052c38038061052c8339818101604052606081101561003357600080fd5b5080516020820151604090920151436000908155600192909255600280546001600160a01b039485166001600160a01b031991821617909155600380549490921693169290921790915560045561049d8061008f6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806388a91a8a1461006757806395f632b3146100815780639f678cca14610089578063d326159214610091578063d4b8399214610099578063fc0c546a146100bd575b600080fd5b61006f6100c5565b60408051918252519081900360200190f35b61006f6100cb565b61006f6100d1565b61006f6102c9565b6100a16102cf565b604080516001600160a01b039092168252519081900360200190f35b6100a16102de565b60005481565b60045481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b15801561012057600080fd5b505afa158015610134573d6000803e3d6000fd5b505050506040513d602081101561014a57600080fd5b50516001546000805460045460035460408051808201909152601281527164726970546f74616c206f766572666c6f7760701b60208201529596509394919390926001600160a01b03909116914391906101a9908790878503906102ed565b905060006101e382866040518060400160405280601381526020017264656c74614472697020756e646572666c6f7760681b8152506103a0565b905060006101f189836103fa565b9050600061022487836040518060400160405280600c81526020016b1d185d5d1bdb1bd9da58d85b60a21b815250610413565b9050806004819055508a6001600160a01b031663a9059cbb87846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561028d57600080fd5b505af11580156102a1573d6000803e3d6000fd5b505050506040513d60208110156102b757600080fd5b50919b50505050505050505050505090565b60015481565b6003546001600160a01b031681565b6002546001600160a01b031681565b6000836102fc57506000610399565b8383028385828161030957fe5b041483906103955760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561035a578181015183820152602001610342565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5090505b9392505050565b600081848411156103f25760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a578181015183820152602001610342565b505050900390565b600081831161040a57508161040d565b50805b92915050565b600083830182858210156103955760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a57818101518382015260200161034256fea265627a7a7231582097280a1b285840f7c294f6cf19d3126dcd6debd8c971896e1d4eb946582b6a8f64736f6c6343000510003200000000000000000000000000000000000000000000000006f05b59d3b20000000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806388a91a8a1461006757806395f632b3146100815780639f678cca14610089578063d326159214610091578063d4b8399214610099578063fc0c546a146100bd575b600080fd5b61006f6100c5565b60408051918252519081900360200190f35b61006f6100cb565b61006f6100d1565b61006f6102c9565b6100a16102cf565b604080516001600160a01b039092168252519081900360200190f35b6100a16102de565b60005481565b60045481565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b15801561012057600080fd5b505afa158015610134573d6000803e3d6000fd5b505050506040513d602081101561014a57600080fd5b50516001546000805460045460035460408051808201909152601281527164726970546f74616c206f766572666c6f7760701b60208201529596509394919390926001600160a01b03909116914391906101a9908790878503906102ed565b905060006101e382866040518060400160405280601381526020017264656c74614472697020756e646572666c6f7760681b8152506103a0565b905060006101f189836103fa565b9050600061022487836040518060400160405280600c81526020016b1d185d5d1bdb1bd9da58d85b60a21b815250610413565b9050806004819055508a6001600160a01b031663a9059cbb87846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561028d57600080fd5b505af11580156102a1573d6000803e3d6000fd5b505050506040513d60208110156102b757600080fd5b50919b50505050505050505050505090565b60015481565b6003546001600160a01b031681565b6002546001600160a01b031681565b6000836102fc57506000610399565b8383028385828161030957fe5b041483906103955760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561035a578181015183820152602001610342565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5090505b9392505050565b600081848411156103f25760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a578181015183820152602001610342565b505050900390565b600081831161040a57508161040d565b50805b92915050565b600083830182858210156103955760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561035a57818101518382015260200161034256fea265627a7a7231582097280a1b285840f7c294f6cf19d3126dcd6debd8c971896e1d4eb946582b6a8f64736f6c63430005100032
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
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.23
Net Worth in ETH
0.000115
Token Allocations
MTV
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $0.000228 | 1,000 | $0.2284 |
Loading...
Loading
Loading...
Loading
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.