• Hackathons
  • Features
  • Blog

Multi-Token transparent vesting

Transparent multi-token vesting for all

  • 0 Raised
  • 8 Views
  • 0 Juries

Categories

  • ETHDam - DeFi Track
  • Scroll - Deploy on Scroll
  • Scroll - Best on Scroll: DeFi

Gallery

Description

A fun project developed during the ETHDam privacy event hackathon by a single smart contract / backend dev (Konrad). Unfortunately I didn't have the time to figure out a compelling front end so I demo using the ETH Scaffold tools.

Code, worked examples and videos can be found at : https://github.com/konradstrachan/ethdamhackathon23

Token Vesting is a proof of concept for a general purpose contract that can be used to escrow funds that are released on a certain time schedule.

It was developed not only to experiment with the idea of trustless vesting, but also an excuse to build a smart contract to experiment with the Scroll zkEVM alpha testnet (https://scroll.io/).

The PoC verified 🚀 contract is deployed at 🔗 https://blockscout.scroll.io/address/0x51A1ceB83B83F1985a81C295d1fF28Afef186E02

The Solidity smart contract implements a token vesting mechanism that allows users to stake ERC20 tokens and gradually release them over a predefined vesting period. The contract supports multiple beneficiaries, each with their own vesting schedules for different tokens.

Features

  • Fully transparent escrowed funds
  • Multiple beneficiaries can have staked ERC20 tokens
  • Each beneficiary can have multiple vesting schedules for different tokens
  • The vesting schedules include a cliff time and an end time completely configurable by the vesting originiator
  • Beneficiaries cannot withdraw funds before the cliff time
  • The amount available for withdrawal is restricted based on the elapsed time since the cliff time
  • Withdrawn funds are transferred from the contract to the beneficiary directly
  • The contract is compatible with any ERC20 token that implements the transfer and transferFrom functions (not native ETH/chain tokens currently)