Custom tokens should standardize how balances are stored #1592
Replies: 3 comments 9 replies
-
I believe this SEP goes against the smart contract design philosophy. Data storage is considered an implementation detail. Public interface provides the necessary getters in an abstract fashion. In order to get the respective field the getter has to be called. While this philosophy is not set in stone, it is what we've used and promoted thus far. I realize that unified data layout might have some benefits, but I'm not sure if standardizing it is really feasible. It seems to restrict the token implementation details significantly. |
Beta Was this translation helpful? Give feedback.
-
I don't think this is a sufficient reason to constrain innovation and to exclude contract tokens that don't adhere to a standard data storage mechanism. In other ecosystems there is sufficient evidence that data ingestion products are able to navigate a variety of token implementations without relying only on the storage data. Making an external integration slightly easier at the expense of contract dev flexibility (which will impair innovation) seems like not a great trade off. Is the lack of a standard storage format currently inhibiting progress in the ecosystem, or products built on Stellar? Does it solve problems that cannot already be solved by the standard interop points that already exist: functions (internally) and events (externally)? |
Beta Was this translation helpful? Give feedback.
-
I think this discussion can be closed. Because there is no required use case there is no need to add a standard. This topic can be revisited again when a use case that isn't solvable through contract events or other means does arise |
Beta Was this translation helpful? Give feedback.
-
Proposal
Any custom token balance should be stored the same as SACs
Changes
Reasoning
Having a standard structure for token balances would make it easier to analyze token balance information. Instead of tracing contract events, the balance can be found for a token consistently through ledger entries instead. This reduces the overhead for point in time balance lookups by skipping the need to process contract events all together. This would also make processing custom tokens and SACs largely similar making a token/balance tracking pipeline much easier to implement
Beta Was this translation helpful? Give feedback.
All reactions