Cosmos-sdk: Rejected proposal deposits shouldn't be burned

Created on 15 Apr 2019  Â·  3Comments  Â·  Source: cosmos/cosmos-sdk

Summary of Bug

The DeleteDeposit should be renamed and the funds from rejected proposals should go to the community pool.

Quoting the whitepaper:

If more than half of the voters choose to take the deposit (e.g. because the proposal was spam), the deposit goes to the reserve pool, except any atoms which are burned.

Steps to Reproduce


See line 448:

https://github.com/cosmos/cosmos-sdk/blob/21e0d3cc6bbfc291448deb5a56a0fc443e70d9bb/x/gov/keeper.go#L438-L455

cc: @alessio @sunnya97


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

Acceptance Criteria

AC1

Given a governance proposal
If the proposal is rejected
Then the existing Deposit (if any) amount should be transfer to the CommunityPool

AC2

Given a governance proposal P
Given P is rejected
When I query the CommunityPool using gaiacli q distr community-pool
Then it should return the updated amount of coins

AC3

Given a governance proposal P
Given P is rejected
When I query the CommunityPool using GET /distribution/community_pool
Then it should return the updated amount of coins

blocked gov

Most helpful comment

Per Zaki's suggestion, which I think is obvious, this should be implemented given the approval of a text governance proposal.

All 3 comments

/cc @zmanian

Per Zaki's suggestion, which I think is obvious, this should be implemented given the approval of a text governance proposal.

merged to master #4373

Was this page helpful?
0 / 5 - 0 ratings