InvestorVesting
Inherits:IVESTING, Context, Ownable2Step, ReentrancyGuard
Investor Vesting contract
Offers flexible withdrawal schedule (gas efficient)
Implements linear vesting schedule for investors
Note: security-contact: security@nebula-labs.xyz
State Variables
_start
start timestamp
uint64 private immutable _start;_duration
duration seconds
uint64 private immutable _duration;_token
token address
_erc20Released
amount of tokens released
Functions
constructor
Sets the owner to beneficiary address, the start timestamp and the vesting duration of the vesting contract.
release
Release the tokens that have already vested. Emits a {ERC20Released} event.
start
Getter for the start timestamp.
Returns
<none>
uint256
start timestamp
duration
Getter for the vesting duration.
Returns
<none>
uint256
duration seconds
end
Getter for the end timestamp.
Returns
<none>
uint256
end timnestamp
released
Getter for the amount of token already released
Returns
<none>
uint256
amount of tokens released so far
releasable
Getter for the amount of vested ERC20 tokens.
Returns
<none>
uint256
amount of vested tokens
vestedAmount
Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.
Parameters
timestamp
uint64
current timestamp
Returns
<none>
uint256
amount vested
_vestingSchedule
Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for an asset given its total historical allocation.
Parameters
totalAllocation
uint256
initial amount
timestamp
uint64
current timestamp
Returns
<none>
uint256
amount vested
Last updated