[Ethereum] Examples of Token Vesting logic for ERC20 Token Launch

erc-20tokens

We are trying to implement a token contract in ethereum which will have some tokenomics strategies built-in, for eg. Some tokens will be pre allocated to certain addresses on contract deployment itself.. Some tokens will follow a vesting schedule before unlocking to be withdrawn to certain address, while also an inflation logic for a chunk of tokens.. Do we have any example contracts as such in solidity that deals with such tokenomics strategies?

Best Answer

For vesting strategies you can check the Ethereum's Stackexchange question Time Lock and vesting smart contract with what the author describe as a

really quick and untested scribble to give you some ideas. Starting with the ERC20 interface by openzeppelin

Also in Openzeppelin there is a smart contract called VestingWallet.sol that

handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens can be given to this contract, which will release the token to the beneficiary following a given vesting schedule. The vesting schedule is customizable through the {vestedAmount} function.

There is a medium post about the Cardstack token vesting strategy influenced by the OpenZeppelin implementation.

There is also a youtube video from the Dapp Academy called Create Token Vesting with Smart Contracts - #12 Real World ICO on Ethereum

Regarding an inflation logic you can start by checking the OpenZeppelin's MintableToken implementation and a solution like AION to schedule calls to the contract at a point in the future

I hope this answer your question, there are smart contracts with various tokenomics strategies out there.

Related Topic