Back to Home

TokenVesting

0x94b74efcc0cc...a930ae497b84
ByzantiumSource VerifiedEdit this contract
Deployed March 10, 2018 (8 years ago)Block 5,227,179

OpenZeppelin's token vesting escrow: holds an ERC-20 balance for one beneficiary and releases it linearly after a cliff, with an optional owner revoke.

Byzantium EraVerified Source

Historical Significance

Vesting was the standard answer to the 2017 and 2018 question of how a team locks its own allocation in public. OpenZeppelin's version became the default because it got the revoke case right: revoking does not claw back what has already vested, it only stops the clock, so the contract is safe for a beneficiary to accept. Deployments of this exact code are one per grant, which is why the same bytecode appears again and again across that period.

Key Facts
Deployment Block
5,227,179
Deployment Date
Mar 10, 2018, 12:01 AM
Code Size
3.4 KB

Description

The contract stores a beneficiary, a start time, a cliff timestamp, a duration and a revocable flag, all fixed at construction. It holds no token address of its own: release and revoke each take the token as an argument, so a single vesting schedule can cover several tokens at once, tracked by the released and revoked mappings.

vestedAmount works from the contract's current balance plus everything already released, which means tokens sent in later are folded into the same schedule rather than being stranded. Before the cliff it returns zero; after start plus duration, or once revoked, it returns the whole balance; in between it is a straight-line proportion of elapsed time.

revoke is owner-only and one-way per token. It computes what is vested at that moment, leaves that amount in the contract for the beneficiary to claim, and returns the remainder to the owner.

This is zeppelin-solidity's TokenVesting, compiled with the optimizer off.

Source Verified

Solidityeh_crack_source_verified
Compiler: v0.4.21

Bytecode Overview

Opcodes3,443
Unique Opcodes198
Jump Instructions151
Storage Operations40

External Links