> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unvest.io/llms.txt
> Use this file to discover all available pages before exploring further.

# IVestingToken.sol

# IVestingToken

[Git Source](https://github.com/Unvest/protocol/blob/10af66632cb2249fdd76dc9760d2679b39ca2a8f/src/interfaces/IVestingToken.sol)

*Interface that describes the Milestone struct and initialize function so the `VestingTokenFactory` knows how to
initialize the `VestingToken`.*

## Functions

### initialize

Initializes the contract by setting up the ERC20 variables, the `underlyingToken`, and the
`milestonesArray` information.

```solidity theme={null}
function initialize(
    string memory name,
    string memory symbol,
    address underlyingTokenAddress,
    Milestone[] calldata milestonesArray
)
    external;
```

**Parameters**

| Name                     | Type          | Description                                           |
| ------------------------ | ------------- | ----------------------------------------------------- |
| `name`                   | `string`      | The token collection name.                            |
| `symbol`                 | `string`      | The token collection symbol.                          |
| `underlyingTokenAddress` | `address`     | The ERC20 token that will be held by this contract.   |
| `milestonesArray`        | `Milestone[]` | Array of all Milestones for this Contract's lifetime. |

## Structs

### Milestone

*`timestamp` represents a moment in time when this Milestone is considered expired.*

*`ramp` defines the behaviour of the release of tokens in period between the previous Milestone and the
current one.*

*`percentage` is the percentage of tokens that should be released once this Milestone has expired.*

```solidity theme={null}
struct Milestone {
    uint64 timestamp;
    Ramp ramp;
    uint64 percentage;
}
```

## Enums

### Ramp

\*Ramps describes how the periods between release tokens.

* Cliff releases nothing until the end of the period.
* Linear releases tokens every second according to a linear slope.

```
(0) Cliff             (1) Linear
|                     |
|        _____        |        _____
|       |             |       /
|       |             |      /
|_______|_____        |_____/_______
T0   T1               T0   T1*
```

```solidity theme={null}
enum Ramp {
    Cliff,
    Linear
}
```
