OpenOrg-gg / AmphoraProtocol

6 stars 6 forks source link

feat: implement vesting redemption contract and its tests. #5

Closed Soptq closed 2 years ago

Soptq commented 2 years ago

This PR implements a vesting redemption contracts and its tests. Specifically:

  1. The redeemable token is estimated by an inverse portioning function so that longer vesting duration will always have larger incentives than shorter vesting duration.
  2. Vesting function is a linear function.
  3. When a user makes redemptions for multiple times, multiple vesting positions (streams) are created. Users are able to claim all at once.
  4. Detailed configurations of each position of each user is retrievable through a view function.
  5. Contracts are documented and tested.

Feedbacks are welcomed ❤️

closes #1