Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Layer2 Issuance and Vesting Logic #676

Open
5 tasks
kmlbgn opened this issue Jun 5, 2024 · 0 comments
Open
5 tasks

Refactor Layer2 Issuance and Vesting Logic #676

kmlbgn opened this issue Jun 5, 2024 · 0 comments
Assignees
Labels
invalid This doesn't seem right Priority: Critical refactor Codebase cleaning & improvement x/layer2

Comments

@kmlbgn
Copy link
Collaborator

kmlbgn commented Jun 5, 2024

Description

Current logic regarding issuance and vesting involve LP tokens since DP tokens are never minted.

Expected Bahaviour

A refactor is needed in accordance with #675

  • Minted LP tokens are only concerned about the drip parameter of dapp.IssuanceConfig. After proposal approval, LPs are automatically sent to Spending Pool with deterministic name lp_appname and rate calculated using drip param.
  • premint and postmint parameters are amount of dp/denom token (and NOT LP tokens) to be minted additionally to the dapp.LiquidityPool.pooled_dptoken. They happen at premint_time and postmint_time respectively.
  • postmint_time parameter is missing and should be created. It's a duration that starts when premint_time happens.
  • premint_time happens when proposal is approved. No change required.
  • deposit is an optional parameter of dapp.IssuanceConfig which contains an ALREADY CREATED Spending Pool (must check if spending pool exists otherwise tx must fails with explicit error). If deposit is set, then minted postmint and premint should be sent to the spending pool. If it is not set it should be sent to dapp.teamreserve.

Proto Example

IssuanceConfig

PARAMETER TYPE
drip uint64
deposit string
postmint types.Int
premint types.Int
premint_time uint64
postmint_time uint64
@kmlbgn kmlbgn added the refactor Codebase cleaning & improvement label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right Priority: Critical refactor Codebase cleaning & improvement x/layer2
Projects
None yet
Development

No branches or pull requests

2 participants