Amazon has patented a distributed ledger-based system for proving the authenticity of consumer goods.