ETH Price: $3,192.96 (+1.21%)
Gas: 0.06 GWei

Contract

0x2938b0932eF3fd7a58a9FC077398CAD981495741
Transaction Hash
Method
Block
From
To
Value
Set Recipient8870222023-11-17 20:06:39239 days ago1700251599IN
Mendi Finance: Team Vesting Claim
0 ETH0.000075462.8
0x610140608870202023-11-17 20:06:23239 days ago1700251583IN
 Contract Creation
0 ETH0.00153292.67336762

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To Value
66241712024-07-10 22:45:543 days ago1720651554
Mendi Finance: Team Vesting Claim
0 ETH
66241712024-07-10 22:45:543 days ago1720651554
Mendi Finance: Team Vesting Claim
0 ETH
65614762024-07-09 11:55:585 days ago1720526158
Mendi Finance: Team Vesting Claim
0 ETH
65614762024-07-09 11:55:585 days ago1720526158
Mendi Finance: Team Vesting Claim
0 ETH
64804232024-07-07 14:54:016 days ago1720364041
Mendi Finance: Team Vesting Claim
0 ETH
64804232024-07-07 14:54:016 days ago1720364041
Mendi Finance: Team Vesting Claim
0 ETH
64483042024-07-06 21:01:547 days ago1720299714
Mendi Finance: Team Vesting Claim
0 ETH
64483042024-07-06 21:01:547 days ago1720299714
Mendi Finance: Team Vesting Claim
0 ETH
63886802024-07-05 11:54:079 days ago1720180447
Mendi Finance: Team Vesting Claim
0 ETH
63886802024-07-05 11:54:079 days ago1720180447
Mendi Finance: Team Vesting Claim
0 ETH
63884702024-07-05 11:47:079 days ago1720180027
Mendi Finance: Team Vesting Claim
0 ETH
63884702024-07-05 11:47:079 days ago1720180027
Mendi Finance: Team Vesting Claim
0 ETH
63821632024-07-05 8:16:539 days ago1720167413
Mendi Finance: Team Vesting Claim
0 ETH
63821632024-07-05 8:16:539 days ago1720167413
Mendi Finance: Team Vesting Claim
0 ETH
63153502024-07-03 19:09:3910 days ago1720033779
Mendi Finance: Team Vesting Claim
0 ETH
63153502024-07-03 19:09:3910 days ago1720033779
Mendi Finance: Team Vesting Claim
0 ETH
63084002024-07-03 15:17:5310 days ago1720019873
Mendi Finance: Team Vesting Claim
0 ETH
63084002024-07-03 15:17:5310 days ago1720019873
Mendi Finance: Team Vesting Claim
0 ETH
62209062024-07-01 14:40:2612 days ago1719844826
Mendi Finance: Team Vesting Claim
0 ETH
62209062024-07-01 14:40:2612 days ago1719844826
Mendi Finance: Team Vesting Claim
0 ETH
61883602024-06-30 20:35:0513 days ago1719779705
Mendi Finance: Team Vesting Claim
0 ETH
61883602024-06-30 20:35:0513 days ago1719779705
Mendi Finance: Team Vesting Claim
0 ETH
61883102024-06-30 20:33:2513 days ago1719779605
Mendi Finance: Team Vesting Claim
0 ETH
61883102024-06-30 20:33:2513 days ago1719779605
Mendi Finance: Team Vesting Claim
0 ETH
61879972024-06-30 20:22:5813 days ago1719778978
Mendi Finance: Team Vesting Claim
0 ETH
View All Internal Transactions
Loading...
Loading

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

Contract Name:
VesterCliff

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, Unlicense license
File 1 of 6 : VesterCliff.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "./Vester.sol";

contract VesterCliff is Vester {
    using SafeMath for uint256;

    uint256 public immutable vestingCliff;

    constructor(
        address mendi_,
        address recipient_,
        uint256 vestingAmount_,
        uint256 vestingBegin_,
        uint256 vestingEnd_,
        uint256 vestingCliff_
    ) Vester(mendi_, recipient_, vestingAmount_, vestingBegin_, vestingEnd_) {
        require(
            vestingCliff_ >= vestingBegin_,
            "VesterCliff::constructor: cliff is too early"
        );
        require(
            vestingCliff_ <= vestingEnd_,
            "VesterCliff::constructor: cliff is too late"
        );
        vestingCliff = vestingCliff_;
    }

    function claim() public virtual override returns (uint256 amount) {
        uint256 blockTimestamp = getBlockTimestamp();
        if (blockTimestamp < vestingCliff) return 0;

        amount = super.claim();
    }
}

File 2 of 6 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

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

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 3 of 6 : Vester.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "./interfaces/IMendi.sol";
import "./interfaces/IClaimable.sol";
import "./interfaces/IVester.sol";

contract Vester is IVester, IClaimable {
    using SafeMath for uint256;

    uint256 public constant override segments = 100;

    address public immutable mendi;
    address public recipient;

    uint256 public immutable override vestingAmount;
    uint256 public immutable override vestingBegin;
    uint256 public immutable override vestingEnd;

    uint256 public previousPoint;
    uint256 public immutable finalPoint;

    constructor(
        address mendi_,
        address recipient_,
        uint256 vestingAmount_,
        uint256 vestingBegin_,
        uint256 vestingEnd_
    ) {
        require(vestingEnd_ > vestingBegin_, "Vester: END_TOO_EARLY");

        mendi = mendi_;
        recipient = recipient_;

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

        finalPoint = vestingCurve(1e18);
    }

    function vestingCurve(uint256 x) public pure virtual returns (uint256 y) {
        uint256 speed = 1e18;
        for (uint256 i = 0; i < 100e16; i += 1e16) {
            if (x < i + 1e16) return y + (speed * (x - i)) / 1e16;
            y += speed;
            speed = (speed * 976) / 1000;
        }
    }

    function getUnlockedAmount() internal virtual returns (uint256 amount) {
        uint256 blockTimestamp = getBlockTimestamp();
        uint256 currentPoint = vestingCurve(
            (blockTimestamp - vestingBegin).mul(1e18).div(
                vestingEnd - vestingBegin
            )
        );
        amount = vestingAmount.mul(currentPoint.sub(previousPoint)).div(
            finalPoint
        );
        previousPoint = currentPoint;
    }

    function claim() public virtual override returns (uint256 amount) {
        require(msg.sender == recipient, "Vester: UNAUTHORIZED");
        uint256 blockTimestamp = getBlockTimestamp();
        if (blockTimestamp < vestingBegin) return 0;
        if (blockTimestamp > vestingEnd) {
            amount = IMendi(mendi).balanceOf(address(this));
        } else {
            amount = getUnlockedAmount();
        }
        if (amount > 0) IMendi(mendi).transfer(recipient, amount);
    }

    function setRecipient(address recipient_) public virtual {
        require(msg.sender == recipient, "Vester: UNAUTHORIZED");
        recipient = recipient_;
    }

    function getBlockTimestamp() public view virtual returns (uint256) {
        return block.timestamp;
    }
}

File 4 of 6 : IClaimable.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

interface IClaimable {
    function claim() external returns (uint256 amount);

    event Claim(address indexed account, uint256 amount);
}

File 5 of 6 : IMendi.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

//IERC20
interface IMendi {
    function balanceOf(address account) external view returns (uint256);

    function transfer(address dst, uint256 rawAmount) external returns (bool);
}

File 6 of 6 : IVester.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0;

interface IVester {
    function segments() external view returns (uint256);

    function vestingAmount() external view returns (uint256);

    function vestingBegin() external view returns (uint256);

    function vestingEnd() external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"mendi_","type":"address"},{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"vestingAmount_","type":"uint256"},{"internalType":"uint256","name":"vestingBegin_","type":"uint256"},{"internalType":"uint256","name":"vestingEnd_","type":"uint256"},{"internalType":"uint256","name":"vestingCliff_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mendi","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previousPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"segments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"x","type":"uint256"}],"name":"vestingCurve","outputs":[{"internalType":"uint256","name":"y","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"vestingEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063796b89b91161008c578063cf19036011610066578063cf190360146101e3578063e29bc68b146101ec578063e2d6870a14610213578063f3640e741461021b57600080fd5b8063796b89b9146101a357806384a1931f146101a957806389b1e13f146101d057600080fd5b8062728f76146100d3578063062f04291461010d5780633bbed4a0146101345780634e71d92d146101495780635f33f2811461015157806366d003ac14610190575b600080fd5b6100fa7f00000000000000000000000000000000000000000009ed194db19b238c00000081565b6040519081526020015b60405180910390f35b6100fa7f0000000000000000000000000000000000000000000000020f4c241228d3057b81565b6101476101423660046106c9565b610242565b005b6100fa6102ba565b6101787f00000000000000000000000043e8809ea748eff3204ee01f08872f063e44065f81565b6040516001600160a01b039091168152602001610104565b600054610178906001600160a01b031681565b426100fa565b6100fa7f0000000000000000000000000000000000000000000000000000000068a1d25081565b6100fa6101de3660046106f2565b6102fb565b6100fa60015481565b6100fa7f0000000000000000000000000000000000000000000000000000000064de19d081565b6100fa606481565b6100fa7f0000000000000000000000000000000000000000000000000000000065588b2081565b6000546001600160a01b031633146102985760405162461bcd60e51b815260206004820152601460248201527315995cdd195c8e8815539055551213d49256915160621b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000427f0000000000000000000000000000000000000000000000000000000065588b208110156102ed57600091505090565b6102f56103ae565b91505090565b6000670de0b6b3a7640000815b670de0b6b3a76400008110156103a75761032981662386f26fc10000610721565b84101561036857662386f26fc100006103428286610739565b61034c9084610750565b610356919061076f565b6103609084610721565b949350505050565b6103728284610721565b92506103e8610383836103d0610750565b61038d919061076f565b91506103a0662386f26fc1000082610721565b9050610308565b5050919050565b600080546001600160a01b031633146104005760405162461bcd60e51b815260206004820152601460248201527315995cdd195c8e8815539055551213d49256915160621b604482015260640161028f565b427f0000000000000000000000000000000000000000000000000000000064de19d081101561043157600091505090565b7f0000000000000000000000000000000000000000000000000000000068a1d2508111156104e8576040516370a0823160e01b81523060048201527f00000000000000000000000043e8809ea748eff3204ee01f08872f063e44065f6001600160a01b0316906370a0823190602401602060405180830381865afa1580156104bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e19190610791565b91506104f3565b6104f0610597565b91505b81156105935760005460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490527f00000000000000000000000043e8809ea748eff3204ee01f08872f063e44065f9091169063a9059cbb906044016020604051808303816000875af115801561056d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059191906107aa565b505b5090565b6000428161062d6101de6105eb7f0000000000000000000000000000000000000000000000000000000064de19d07f0000000000000000000000000000000000000000000000000000000068a1d250610739565b610627670de0b6b3a76400006106217f0000000000000000000000000000000000000000000000000000000064de19d088610739565b9061069e565b906106b1565b90506106927f0000000000000000000000000000000000000000000000020f4c241228d3057b61062761066b600154856106bd90919063ffffffff16565b7f00000000000000000000000000000000000000000009ed194db19b238c0000009061069e565b60019190915592915050565b60006106aa8284610750565b9392505050565b60006106aa828461076f565b60006106aa8284610739565b6000602082840312156106db57600080fd5b81356001600160a01b03811681146106aa57600080fd5b60006020828403121561070457600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156107345761073461070b565b500190565b60008282101561074b5761074b61070b565b500390565b600081600019048311821515161561076a5761076a61070b565b500290565b60008261078c57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156107a357600080fd5b5051919050565b6000602082840312156107bc57600080fd5b815180151581146106aa57600080fdfea264697066735822122004a61b70a4c6e91f48b95d076c950a2187320ad661d57c5368234eb069dd7d8b64736f6c634300080a0033

Block Transaction Gas Used Reward
view all blocks sequenced

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