Comment on page
A token timelock that releases continuously at the same rate
A timelock for releasing tokens over a continuous linear schedule. There is an appointed beneficiary who controls the tokens when vested. The beneficiary can set a new one if needed using the offer-accept pattern.
The contract maintains the following:
T- a total token amount which includes any already released and locked tokens. It can increase if new tokens enter the timelock but it cannot decrease.
C- the current held tokens in the contract
The portion of T available for release is T*t/d.
The already released amount is T - C.
The net amount available for release is the total available minus already released. The beneficiary can claim these at any time, and distribute to any address.
A release of timelocked tokens
A change in beneficiary to the timelock
A change in pending beneficiary to the timelock
function lockedToken() external view returns (IERC20);
Returns the address of the locked token casted as an IERC20 interface.
function beneficiary() external view returns (address);
Returns the current beneficiary address.
function pendingBeneficiary() external view returns (address);
Returns the pending beneficiary, which could assume the beneficiary role at any time by calling
function initialBalance() external view returns (uint256);
Returns the initial total amount of locked tokens. If new tokens are dropped into the timelock, this number increases to prevent accounting errors.
function availableForRelease() external view returns (uint256);
The amount of
lockedTokenavailable to be released by the beneficiary.
function totalToken() external view returns(uint256);
Returns the total amount of tokens held by the timelock pending release.
function alreadyReleasedAmount() external view returns (uint256);
The amount of
lockedTokenalready released by the beneficiary.
function acceptBeneficiary() external;
Accepts the beneficiary role for
msg.sender. Must already be the pending beneficiary.
function release(address to, uint amount) external;
amountof timelocked tokens to address
amountmust be less than or equal to the released amount of tokens.
function setPendingBeneficiary(address _pendingBeneficiary) external;
Sets the pending beneficiary to
LinearTokenTimelock Interface ABI