The below step-by-step instructions outlines the process to create a PRIME vesting contract for either an ambassador or contributor payout of PRIME, discussed here. As a friendly reminder, all PRIME released for ambassadors and contributors must be locked in a vesting contract for at least one year, with a three month cliff. The article assumes preliminary understanding of Etherscan and Metamask.
Create your own unique token vesting contract with the desired parameters calling the create function in the TokenVesting Factory
Send the PRIME tokens via a proposal in Alchemy to your token vesting contract. PRIME should be vested from PrimeDAO on the Ethereum mainnet.
Claim the tokens till the vesting ends. You will have to wait for the cliff time to be reached and that the vesting is able to be revoked by the organization.
Your mainnet Ethereum account address where you will eventually receive the vested PRIME. It’s recommended to use the same account consistently to avoid confusion.
The start time in the format of Unix timestamp. This should be set to the date your vested PRIME allocation proposal is submitted to the Ethereum mainnet. That is, vesting should occur over the course of one year starting from when the PRIME is vested — the startdate should not be set to earlier.
Example: Start date of 11/01/2020 @ 12:00pm (UTC) is 1604232000
The duration of the cliff period in seconds. The cliff is the amount of time in which no PRIME can be withdrawn from the vesting contract. All vested PRIME is expected to have a minimum of a three month cliff.
Example: If Cliff date of 2/01/2021 @ 12:00pm (UTC) is 1612137600, the cliff duration is 1612137600 - 1604232000 = 7905600 seconds
The total duration of the vesting in seconds. The total amount of time before all PRIME can be withdrawn from the vesting contract.
Example: If End date of 11/01/2021 @ 12:00pm (UTC) is 1635724800, the cliff duration is 1635724800 - 1604232000 = 31492800 seconds
Set your contract to be able to be terminated by PrimeDAO. Here, the input is “true.” The DAO should have the ability to revoke the vesting if it so chooses.
1) Navigate to the TokenVesting Factory contract on Etherscan
2) Click “Connect to Web3” and connect using MetaMask
In “1. create”, you will see the following fields:
3) Fill in the fields with your inputs. Here we use the example inputs:
4) Click “Write.” This brings up a MetaMask window. Click “Confirm”
5) Once the transaction is mined go to the event logs. Look for the event “VestingCreated”
vestingContractAddress is the address of your vesting contract. This is where you will request to send your PRIME from your Alchemy Proposal. The above is only an example — your address will be different.
6) From PrimeDAO’s mainnet deployment, create a proposal that sends PRIME to the
vestingContractAddress. Once passed, the PRIME should transfer, and vesting will begin.
7) Wait until the start time plus cliffDuration time is reached, at which time you can execute the release function. Basically: wait at least three months, as this is the minimum time in which you can start to unlock PRIME tokens. The release function will release any vested PRIME to the beneficiary (address) already provided.
Navigate to your vesting contract address on Etherscan and go to the “Contract” tab. Then go to “Write Contract." Enter the PRIME token address into the field and click “Write”:
8) You should now have your vested PRIME.