Skip to content

Getrichordietryng/erc20-redeemable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC20-Redeem

This implements an erc20 distribution scheme in which admin publish a merkle root of a token distribution and users can claim their tokens via merkle proofs.

Context

Balancer has a weekly distribution of BAL tokens for liquidity providers. This process is called liquidity mining and its main objective is to distribute BAL governance tokens to stakeholders, achieving a healthy distribution in the space. The calculation of rewards due to each liquidity provider in v1 is calculated off-chain using these scripts: bal-mining-scripts

Initially, these tokens were distributed actively by Balancer Labs (disperse.app was used to send them) every Tuesday evening. Distributing BAL with an ERC-20 mass transfer was very gas intensive.

Allowing users to retrieve their own BAL reduces the overhead of the transfer of BAL tokens.

Directory structure

This repo contains a /merkle directory with smart contracts and a merkle tree library that powers the distribution, and /client that provides an interface to claiming BAL.

User Stories

Liquidity Provider: As a balancer liquidity provider I earn tokens based on my contribution to my liquidity pools - so I navigate to balancer.exchange and click redeem to retrieve the tokens that are owed to me. This sends a transaction to a smart contract which sends the tokens I am owed to my account.

Balancer governance user: As a balancer employee, I need to send users their accrued BAL based on the value of tokens in their pools. I may want to restrict how long before a user can unlock their BAL

Balancer v2

This method for distributing BAL will eventually be replaced with an on-chain distribution calculation in v2. v2 distributors

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vue 29.3%
  • TypeScript 27.6%
  • JavaScript 26.3%
  • Solidity 8.8%
  • CSS 4.3%
  • SCSS 2.9%
  • Other 0.8%