ETH Price: $3,477.84 (-0.35%)

Contract

0x7104b7D4D7Df61531260fD6ae109958Fa2fC946F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Start Vesting59978182018-07-20 11:37:062350 days ago1532086626IN
0x7104b7D4...Fa2fC946F
0 ETH0.000338995

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
59873282018-07-18 16:33:312352 days ago1531931611  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
TokenVestingWithConstantPercent

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-07-18
*/

pragma solidity ^0.4.24;
// Developed by Phenom.Team <[email protected]>

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        c = a * b;
        assert(c / a == b);
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        assert(c >= a);
        return c;
    }
}

contract ERC20 {
    uint public totalSupply;

    mapping(address => uint) balances;
    mapping(address => mapping (address => uint)) allowed;

    function balanceOf(address _owner) view returns (uint);
    function transfer(address _to, uint _value) returns (bool);
    function transferFrom(address _from, address _to, uint _value) returns (bool);
    function approve(address _spender, uint _value) returns (bool);
    function allowance(address _owner, address _spender) view returns (uint);

    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);

}

contract Ownable {
    address public owner;

    constructor() public {
        owner = tx.origin;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, 'ownership is required');
        _;
    }
}

contract BaseTokenVesting is Ownable() {
    using SafeMath for uint;

    address public beneficiary;
    ERC20 public token;

    bool public vestingHasStarted;
    uint public start;
    uint public cliff;
    uint public vestingPeriod;

    uint public released;

    event Released(uint _amount);

    constructor(
		address _benificiary,
		uint _cliff,
		uint _vestingPeriod,
		address _token
	) internal 
	{
        require(_benificiary != address(0), 'can not send to zero-address');

        beneficiary = _benificiary;
        cliff = _cliff;
        vestingPeriod = _vestingPeriod;
        token = ERC20(_token);
    }

    function startVesting() public onlyOwner {
        vestingHasStarted = true;
        start = now;
        cliff = cliff.add(start);
    }

    function sendTokens(address _to, uint _amount) public onlyOwner {
        require(vestingHasStarted == false, 'send tokens only if vesting has not been started');
        require(token.transfer(_to, _amount), 'token.transfer has failed');
    }

    function release() public;

    function releasableAmount() public view returns (uint _amount);

    function vestedAmount() public view returns (uint _amount);
}

contract TokenVestingWithConstantPercent is BaseTokenVesting {

    uint public periodPercent;

    constructor(
        address _benificiary,
        uint _cliff,
        uint _vestingPeriod,
        address _tokenAddress,
        uint _periodPercent
    ) 
        BaseTokenVesting(_benificiary, _cliff, _vestingPeriod, _tokenAddress)
        public 
    {
        periodPercent = _periodPercent;
    }

    function release() public {
        require(vestingHasStarted, 'vesting has not started');
        uint unreleased = releasableAmount();

        require(unreleased > 0, 'released amount has to be greter than zero');
        require(token.transfer(beneficiary, unreleased), 'revert on transfer failure');
        released = released.add(unreleased);
        emit Released(unreleased);
    }


    function releasableAmount() public view returns (uint _amount) {
        _amount = vestedAmount().sub(released);
    }

    function vestedAmount() public view returns (uint _amount) {
        uint currentBalance = token.balanceOf(this);
        uint totalBalance = currentBalance.add(released);

        if (now < cliff || !vestingHasStarted) {
            _amount = 0;
        }
        else if (now.sub(cliff).div(vestingPeriod).mul(periodPercent) > 100) {
            _amount = totalBalance;
        }
        else {
            _amount = totalBalance.mul(now.sub(cliff).div(vestingPeriod).mul(periodPercent)).div(100);
        }
    }

    

}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"sendTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cliff","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestedAmount","outputs":[{"name":"_amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"releasableAmount","outputs":[{"name":"_amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"release","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"released","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodPercent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingHasStarted","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"start","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startVesting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_benificiary","type":"address"},{"name":"_cliff","type":"uint256"},{"name":"_vestingPeriod","type":"uint256"},{"name":"_tokenAddress","type":"address"},{"name":"_periodPercent","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Released","type":"event"}]

Deployed Bytecode

0x6080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305ab421d146100d557806313d033c01461012257806338af3eed1461014d57806344b1231f146101a45780635b940081146101cf5780637313ee5a146101fa57806386d1a69f146102255780638da5cb5b1461023c57806396132521146102935780639f963c4e146102be578063bb7a6dba146102e9578063be9a655514610318578063deb36e3214610343578063fc0c546a1461035a575b600080fd5b3480156100e157600080fd5b50610120600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103b1565b005b34801561012e57600080fd5b5061013761069e565b6040518082815260200191505060405180910390f35b34801561015957600080fd5b506101626106a4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101b057600080fd5b506101b96106ca565b6040518082815260200191505060405180910390f35b3480156101db57600080fd5b506101e46108c3565b6040518082815260200191505060405180910390f35b34801561020657600080fd5b5061020f6108e6565b6040518082815260200191505060405180910390f35b34801561023157600080fd5b5061023a6108ec565b005b34801561024857600080fd5b50610251610c05565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029f57600080fd5b506102a8610c2a565b6040518082815260200191505060405180910390f35b3480156102ca57600080fd5b506102d3610c30565b6040518082815260200191505060405180910390f35b3480156102f557600080fd5b506102fe610c36565b604051808215151515815260200191505060405180910390f35b34801561032457600080fd5b5061032d610c49565b6040518082815260200191505060405180910390f35b34801561034f57600080fd5b50610358610c4f565b005b34801561036657600080fd5b5061036f610d54565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610475576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6f776e657273686970206973207265717569726564000000000000000000000081525060200191505060405180910390fd5b60001515600260149054906101000a900460ff161515141515610526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f73656e6420746f6b656e73206f6e6c792069662076657374696e67206861732081526020017f6e6f74206265656e20737461727465640000000000000000000000000000000081525060400191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156105eb57600080fd5b505af11580156105ff573d6000803e3d6000fd5b505050506040513d602081101561061557600080fd5b8101908080519060200190929190505050151561069a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f746f6b656e2e7472616e7366657220686173206661696c65640000000000000081525060200191505060405180910390fd5b5050565b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050506040513d60208110156107b657600080fd5b810190808051906020019092919050505091506107de60065483610d7a90919063ffffffff16565b90506004544210806107fd5750600260149054906101000a900460ff16155b1561080b57600092506108be565b606461084a60075461083c60055461082e60045442610d9690919063ffffffff16565b610daf90919063ffffffff16565b610dc590919063ffffffff16565b1115610858578092506108bd565b6108ba60646108ac61089d60075461088f60055461088160045442610d9690919063ffffffff16565b610daf90919063ffffffff16565b610dc590919063ffffffff16565b84610dc590919063ffffffff16565b610daf90919063ffffffff16565b92505b5b505090565b60006108e16006546108d36106ca565b610d9690919063ffffffff16565b905090565b60055481565b6000600260149054906101000a900460ff161515610972576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f76657374696e6720686173206e6f74207374617274656400000000000000000081525060200191505060405180910390fd5b61097a6108c3565b9050600081111515610a1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f72656c656173656420616d6f756e742068617320746f2062652067726574657281526020017f207468616e207a65726f0000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b0157600080fd5b505af1158015610b15573d6000803e3d6000fd5b505050506040513d6020811015610b2b57600080fd5b81019080805190602001909291905050501515610bb0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f726576657274206f6e207472616e73666572206661696c75726500000000000081525060200191505060405180910390fd5b610bc581600654610d7a90919063ffffffff16565b6006819055507ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c565816040518082815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b60075481565b600260149054906101000a900460ff1681565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6f776e657273686970206973207265717569726564000000000000000000000081525060200191505060405180910390fd5b6001600260146101000a81548160ff02191690831515021790555042600381905550610d4c600354600454610d7a90919063ffffffff16565b600481905550565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008183019050828110151515610d8d57fe5b80905092915050565b6000828211151515610da457fe5b818303905092915050565b60008183811515610dbc57fe5b04905092915050565b600080831415610dd85760009050610df7565b8183029050818382811515610de957fe5b04141515610df357fe5b8090505b929150505600a165627a7a72305820a56c90f9ccab636ad2126e269a75d8a0c2efc8c2fd63e7d63ee946fc6f019ae30029

Swarm Source

bzzr://a56c90f9ccab636ad2126e269a75d8a0c2efc8c2fd63e7d63ee946fc6f019ae3

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  ]
[ 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.