Let's say I want to represent bank notes. Let's say that there are 50 billions bills in circulation. Each bill has a unique serial number, starting from 1 and increasing by 1. Each note has some characteristics such as the denomination and series. Bank notes can be transferred between accounts and each account can hold as many bills as issued. Each account must be able to list the serial numbers it holds.

Q: is there an existing smart contract that represents the above?

I believe that the large number of bills makes it difficult from a practical standpoint. Maybe representing ranges of serial numbers sharing the same attributes ( so 1-1000 -> (100 USD, 2014) 1001-2000 (50 USD, 2002), ...) is a possibility, although with time fragmentation will occur and will need to be dealt with.

Any idea on how to deal with this?

  • You are describing something pretty similar to ERC721 tokens. – Ismael May 15 '18 at 19:56
  • Maybe, but can ERC721 handle billions of individualized tokens? – De Ni May 16 '18 at 7:59
  • The idea of ERC721 tokens is each token has an id like a serial, you can have 2^256 different ids. Then is up to the contract assign any property to the ids like denomination, weight or color. Each token can only be assigned to a single user, and users can exchange it between them. But using ethereum to store large amounts of data is expensive so if you want to store billions of tokens then you probably want to think a different approach, but some ideas from ERC721 can be reused. – Ismael May 16 '18 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.