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

feat: LPPD wheat distribution mechanism #3445

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

snobbee
Copy link
Contributor

@snobbee snobbee commented Jun 13, 2024

No description provided.

@snobbee
Copy link
Contributor Author

snobbee commented Jun 13, 2024

successful test result using the latest mainnet snapshot:

1:10AM INF burned tokens from module account amount=2056812157657503236rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=2561784605123429573wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=2561784605123429573rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=68473282315503587381wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=68473282315503587381rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=2499495014542979wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=2499495014542979rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=155600636249641718wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=155600636249641718rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=952399054146586wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=952399054146586rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=102281337646wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=102281337646rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=711803510478673019wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=711803510478673019rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=61900048864384774wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=61900048864384774rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=11971071282414919wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=11971071282414919rowan from=clp module=x/bank
1:10AM INF minted coins from module account amount=36270964128580252730wheat from=clp module=x/bank
1:10AM INF burned tokens from module account amount=36270964128580252730rowan from=clp module=x/bank
$ sifnoded q bank balances sif1ze2ye5u5k3qdlexvt2e0nn0508p04094hjrdfv
balances:
[...]
- amount: "476126316820300604929818"
  denom: rowan
- amount: "2366540646251346"
  denom: wheat


for _, lpPool := range lpPoolMap[lpAddress] {
poolRowanMap[lpPool.Pool] = poolRowanMap[lpPool.Pool].Sub(lpPool.Amount)
}
Copy link
Contributor

@timlind timlind Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snobbee can you add a comment here describing what this for loop is doing?

err = cfg.RegisterMigration(types.ModuleName, 5, m.MigrateToVer6)
if err != nil {
panic(err)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the need for a migration? I don't see any store migration functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants