provenance-io / provenance

A distributed, proof of stake blockchain designed for the financial services industry.
https://provenance.io
Apache License 2.0
89 stars 39 forks source link

Use the bank module to track the value owners of scopes. #2137

Closed SpicyLemon closed 1 month ago

SpicyLemon commented 2 months ago

Summary

Use the bank module to keep track of the value owner of a scope.

Problem Definition

Scopes have to be read and written in order to update the value owners which causes a lot of unneeded read/writes. There are several operations that only update the value owner, though, that could be made much cheaper by extracting the value owner into its own record. Further, things like quarantine and sanction should apply to scope value owners too.

Proposal

Use the bank module to record the value owner of scopes by giving each the denom "nft/", e.g. nft/scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel.


For Admin Use

iramiller commented 2 months ago

Drawbacks:

  • More complex metadata module since it'll now be using/managing bank state too.

This would be a reason to not convert existing endpoints to their bank managed counter parts... I guess that still doesn't let us simplify this away though because creating a scope means minting the token with the bank module as well...