ETH Price: $2,731.23 (-2.08%)

Contract

0xfd7b1FE5662fA18Fc0562700891d17a73e09b4E6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw216248432025-01-14 19:33:3538 days ago1736883215IN
0xfd7b1FE5...73e09b4E6
0 ETH0.000670378.5024785
Change Destinati...152304932022-07-28 10:29:20940 days ago1659004160IN
0xfd7b1FE5...73e09b4E6
0 ETH0.000137555.04953828
Withdraw139583832022-01-07 12:37:111141 days ago1641559031IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0074539494.53925851
Withdraw136854012021-11-25 19:46:081184 days ago1637869568IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0067455385.55435618
Withdraw133931332021-10-10 20:46:421230 days ago1633898802IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0048737261.81404243
Withdraw128380902021-07-16 13:10:311316 days ago1626441031IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0034322550
Withdraw126233842021-06-13 2:09:441350 days ago1623550184IN
0xfd7b1FE5...73e09b4E6
0 ETH0.000142836
Withdraw125233892021-05-28 14:36:221365 days ago1622212582IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0008332135
Withdraw125233882021-05-28 14:36:021365 days ago1622212562IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0030203844
Withdraw124275672021-05-13 18:10:361380 days ago1620929436IN
0xfd7b1FE5...73e09b4E6
0 ETH0.01469003214
Withdraw123378902021-04-29 21:44:251394 days ago1619732665IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0037754755
Withdraw123361932021-04-29 15:33:551394 days ago1619710435IN
0xfd7b1FE5...73e09b4E6
0 ETH0.00734501107
Withdraw123361912021-04-29 15:32:521394 days ago1619710372IN
0xfd7b1FE5...73e09b4E6
0 ETH0.00734501107
Withdraw123250542021-04-27 22:05:431396 days ago1619561143IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0038441256
Withdraw123115222021-04-25 20:10:351398 days ago1619381435IN
0xfd7b1FE5...73e09b4E6
0 ETH0.003363649
Withdraw122826272021-04-21 8:56:391403 days ago1618995399IN
0xfd7b1FE5...73e09b4E6
0 ETH0.00954165139
Withdraw122767352021-04-20 11:27:311403 days ago1618918051IN
0xfd7b1FE5...73e09b4E6
0 ETH0.01352306197
Withdraw122765922021-04-20 10:54:091404 days ago1618916049IN
0xfd7b1FE5...73e09b4E6
0 ETH0.013729200
Withdraw122763142021-04-20 9:52:381404 days ago1618912358IN
0xfd7b1FE5...73e09b4E6
0 ETH0.013729200
Withdraw122760582021-04-20 8:59:541404 days ago1618909194IN
0xfd7b1FE5...73e09b4E6
0 ETH0.02004434292
Withdraw122668372021-04-18 22:32:181405 days ago1618785138IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0063839893
Withdraw122434732021-04-15 8:10:291409 days ago1618474229IN
0xfd7b1FE5...73e09b4E6
0 ETH0.00534489.00000145
Withdraw122376052021-04-14 10:14:501410 days ago1618395290IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0054640991
Withdraw122346702021-04-13 23:17:191410 days ago1618355839IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0019805288
Withdraw122346702021-04-13 23:17:191410 days ago1618355839IN
0xfd7b1FE5...73e09b4E6
0 ETH0.0050437884
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1D851A20...4DB4Ee401
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
UniformTimeVault

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at Etherscan.io on 2021-03-30
*/

// SPDX-License-Identifier: GPL-3.0-only

pragma solidity 0.7.4;

library SafeMathLib {
  function times(uint a, uint b) public pure returns (uint) {
    uint c = a * b;
    require(a == 0 || c / a == b, 'Overflow detected');
    return c;
  }

  function minus(uint a, uint b) public pure returns (uint) {
    require(b <= a, 'Underflow detected');
    return a - b;
  }

  function plus(uint a, uint b) public pure returns (uint) {
    uint c = a + b;
    require(c>=a && c>=b, 'Overflow detected');
    return c;
  }

}


/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

contract UniformTimeVault {
    using SafeMathLib for uint;

    IERC20 public token;
    uint public numTranches = 0;
    uint public startTime = 0;
    uint public endTime = 0;
    uint public vestingPeriodLength = 0;
    uint public totalAllocation = 0;

    struct Tranche {
        uint id;
        address destination;
        uint totalCoins;
        uint currentCoins;
        uint coinsPerSecond;
        uint lastWithdrawalTime;
    }

    mapping (uint => Tranche) public tranches;

    event WithdrawalOccurred(uint trancheId, uint numTokens, uint tokensLeft);
    event TrancheAdded(uint id, address destination, uint totalCoins);

    constructor(address tokenAddr, address[] memory destinations, uint[] memory tokenAllocations, uint _endTime, uint _startTime) {
        token = IERC20(tokenAddr);
        endTime = _endTime;
        startTime = _startTime;
        vestingPeriodLength = endTime - startTime;
        require(vestingPeriodLength > 0 , 'start time must be before end time');

        for (uint i = 0; i < destinations.length; i++)  {
            uint trancheId = i + 1;
            uint coinsPerSecond = tokenAllocations[i] / vestingPeriodLength;
            totalAllocation = totalAllocation.plus(tokenAllocations[i]);
            tranches[trancheId] = Tranche(
                trancheId,
                destinations[i],
                tokenAllocations[i],
                tokenAllocations[i],
                coinsPerSecond,
                _startTime
            );
            emit TrancheAdded(trancheId, destinations[i], tokenAllocations[i]);
        }
        numTranches = destinations.length;
    }

    function withdraw(uint trancheId) external {
        Tranche storage tranche = tranches[trancheId];
        require(tranche.currentCoins >  0, 'No coins left to withdraw');
        uint currentWithdrawal = 0;

        // if after vesting period ends, give them the remaining coins
        if (block.timestamp >= endTime) {
            currentWithdrawal = tranche.currentCoins;
        } else {
            // compute allowed withdrawal
            currentWithdrawal = (block.timestamp.minus(tranche.lastWithdrawalTime)).times(tranche.coinsPerSecond);
        }

        // update struct
        tranche.currentCoins = tranche.currentCoins.minus(currentWithdrawal);
        tranche.lastWithdrawalTime = block.timestamp;

        // transfer the tokens, brah
        token.transfer(tranche.destination, currentWithdrawal);
        emit WithdrawalOccurred(trancheId, currentWithdrawal, tranche.currentCoins);
    }

    function changeDestination(uint trancheId, address newDestination) external {
        Tranche storage tranche = tranches[trancheId];
        require(tranche.destination == msg.sender, 'Can only change destination if you are the destination');
        tranche.destination = newDestination;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"address[]","name":"destinations","type":"address[]"},{"internalType":"uint256[]","name":"tokenAllocations","type":"uint256[]"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalCoins","type":"uint256"}],"name":"TrancheAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"trancheId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensLeft","type":"uint256"}],"name":"WithdrawalOccurred","type":"event"},{"inputs":[{"internalType":"uint256","name":"trancheId","type":"uint256"},{"internalType":"address","name":"newDestination","type":"address"}],"name":"changeDestination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numTranches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tranches","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"totalCoins","type":"uint256"},{"internalType":"uint256","name":"currentCoins","type":"uint256"},{"internalType":"uint256","name":"coinsPerSecond","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawalTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingPeriodLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"trancheId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c806378e979251161006657806378e979251461017d57806379203dc41461019b578063b3a56077146101b9578063db8e8e9b146101d7578063fc0c546a1461022557610093565b80631c7afe941461009857806326c25962146100b65780632e1a7d4d146101315780633197cbb61461015f575b600080fd5b6100a0610259565b6040518082815260200191505060405180910390f35b6100e2600480360360208110156100cc57600080fd5b810190808035906020019092919050505061025f565b604051808781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b61015d6004803603602081101561014757600080fd5b81019080803590602001909291905050506102bb565b005b61016761067f565b6040518082815260200191505060405180910390f35b610185610685565b6040518082815260200191505060405180910390f35b6101a361068b565b6040518082815260200191505060405180910390f35b6101c1610691565b6040518082815260200191505060405180910390f35b610223600480360360408110156101ed57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610697565b005b61022d61079e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60015481565b60066020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154908060050154905086565b6000600660008381526020019081526020016000209050600081600301541161034c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4e6f20636f696e73206c65667420746f2077697468647261770000000000000081525060200191505060405180910390fd5b600060035442106103635781600301549050610495565b427382d7630c5eb722557de6d76575c9a7b8de71850063f4f3bdc1909184600501546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156103c057600080fd5b505af41580156103d4573d6000803e3d6000fd5b505050506040513d60208110156103ea57600080fd5b81019080805190602001909291905050507382d7630c5eb722557de6d76575c9a7b8de718500631d3b9edf909184600401546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561045757600080fd5b505af415801561046b573d6000803e3d6000fd5b505050506040513d602081101561048157600080fd5b810190808051906020019092919050505090505b81600301547382d7630c5eb722557de6d76575c9a7b8de71850063f4f3bdc19091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156104f257600080fd5b505af4158015610506573d6000803e3d6000fd5b505050506040513d602081101561051c57600080fd5b8101908080519060200190929190505050826003018190555042826005018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b505050506040513d602081101561061d57600080fd5b8101908080519060200190929190505050507f9c444ca536e256f46459550ce8cc4ff4c578fd67037ddb7bf99e79e1288b692f8382846003015460405180848152602001838152602001828152602001935050505060405180910390a1505050565b60035481565b60025481565b60055481565b60045481565b60006006600084815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610756576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806107c36036913960400191505060405180910390fd5b818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe43616e206f6e6c79206368616e67652064657374696e6174696f6e20696620796f7520617265207468652064657374696e6174696f6ea2646970667358221220cd836f2485640fc7fa2ed417fa9f076e6968a9c0f44bbcfde34f5a6feba6da6164736f6c63430007040033

Libraries Used


Deployed Bytecode Sourcemap

3263:2932:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3357:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3732:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4955:931;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3423:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3391:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3495:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3453:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5894:298;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3331:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3357:27;;;;:::o;3732:41::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4955:931::-;5009:23;5035:8;:19;5044:9;5035:19;;;;;;;;;;;5009:45;;5097:1;5073:7;:20;;;:25;5065:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5139:22;5273:7;;5254:15;:26;5250:276;;5317:7;:20;;;5297:40;;5250:276;;;5434:15;:21;;;;5456:7;:26;;;5434:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5433:57;;;;5491:7;:22;;;5433:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5413:101;;5250:276;5587:7;:20;;;:26;;;;5614:17;5587:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5564:7;:20;;:68;;;;5672:15;5643:7;:26;;:44;;;;5738:5;;;;;;;;;;:14;;;5753:7;:19;;;;;;;;;;;;5774:17;5738:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5808:70;5827:9;5838:17;5857:7;:20;;;5808:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4955:931;;;:::o;3423:23::-;;;;:::o;3391:25::-;;;;:::o;3495:31::-;;;;:::o;3453:35::-;;;;:::o;5894:298::-;5981:23;6007:8;:19;6016:9;6007:19;;;;;;;;;;;5981:45;;6068:10;6045:33;;:7;:19;;;;;;;;;;;;:33;;;6037:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6170:14;6148:7;:19;;;:36;;;;;;;;;;;;;;;;;;5894:298;;;:::o;3331:19::-;;;;;;;;;;;;:::o

Swarm Source

ipfs://cd836f2485640fc7fa2ed417fa9f076e6968a9c0f44bbcfde34f5a6feba6da61

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.