Composable NFTs for use in Vehicles

Vincent de Almeida
6 min readJan 6, 2021

--

Imagining if Tesla added an Ethereum account to all vehicles…

Assuming you know what NFTs are, you might be asking: “What are composable NFTs?”. Well, lets take a look at wrapped Bitcoin:

wBTC is an Ethereum token and a wrapper over Bitcoin locked up on the Bitcoin blockchain. However, the value can be spent, moved etc on the Ethereum blockchain until such a time that it is unwrapped to claim the underlying Bitcoin on the Bitcoin blockchain.

What does that have to do with composable NFTs? Well, composable NFTs are a way to wrap NFTs within another NFT according to the ERC998 standard. Another way of thinking of it is that it’s a way of embedding 1-to-many NFTs within a single NFT. Therefore, he or she who owns a composable NFT implicitly owns all the children and this opens up many interesting use cases.

After working on Digitalax’s composable garment NFT with BlockRocket.tech, I’ve been going down the composable NFT rabbit hole and often think about further use cases for composable NFTs. Whilst I have thought of a few ideas, one I wanted to explore was the use of composable NFTs in vehicles.

The what and why surrounding composable NFTs for vehicles

For a second, let’s step back from the blockchain magic and look at vehicle ownership today. When a car is new it has no history, no previous owners, no mileage etc. This changes overtime as the vehicle is re-sold, serviced, assessed for roadworthiness (MOT in UK, WoF in New Zealand etc) and more. All this documentation is passed to the next individual or company that purchases the vehicle. Critically, they have to trust that the documentation is genuine and has not been tampered.

If we look at Mazda for example, they have been offering a digital service record feature since 2005. A vehicle owner could check their history via an app where the information is stored in a central database. Tricky thing with this setup (and applies to other vehicle manufacturers that offer this) is that it’s not easy to access by a potential buyer. Further, you have to trust that the data is going to be well managed by the vehicle manufacturer for the life of the vehicle and that it won’t be accidentally lost, corrupted, tampered with etc.

Instead, what if all critical documents and events like vehicle ownership change were tokenised as an ERC721 NFT? Well, provided that the data associated with the tokens is accurate at the time of minting and minted by either the vehicle manufacturer or an authorised service partner, then you have a secure asset that cannot be altered. Additionally, by creating a provably scarce digital asset on a public blockchain, it is really easy to access and verify. Whilst I can appreciate that certain PII relating to the current or previous owners should be encrypted and kept private, number of owners, MOT history (which by the way is already public thanks to the UK gov) and service history should absolutely be public to protect future buyers.

Let’s imagine that Tesla Motors, an innovative company committed to world-changing technology, wanted to use composable NFTs in their vehicles. I’m sure their hardware and software engineering teams would have no problems integrating a secure element in their vehicles that stores a set of Ethereum keys (never exposing the private keys like the Ledger and Trezor hardware wallets). Once such a feature is available, Tesla could mint a unique Vehicle NFT for every vehicle that they manufacture and send this straight to the vehicle. Initially, the Vehicle NFT would contain basic information such as the vehicle’s unique identification number (chassis number) but crucially it would offer the ability to compose / wrap / embed other NFTs within that master NFT.

The diagram above shows how authorised service partners can then compose NFTs like a service history or ownership change into the master NFT.

You may ask why the NFTs cannot be separate and directly sent to the vehicle’s Ethereum account instead of wrapped in an NFT. Alternatively, you may ask why the vehicle NFT contract can’t be a super contract that tracks number of owners, service history, MOT certificates etc. Of course, whilst these are valid questions, I’ll try to lay out a few reasons why the composable architecture is better:

  • Easier to lookup all documents related to the vehicle in one contract
  • You can control what NFTs are allowed to be wrapped within the parent Vehicle NFT
  • The vehicle contract is much simpler, flexible and extensible

By implementing the ERC998 enumerable interface, it means that anyone can query a Vehicle NFT for all children wrapped within. The possible children NFTs that can be embedded in a Vehicle NFT can be controlled with an address whitelist. If an NFT contract address is not in the whitelist then any attempts to embed a child in the parent NFT will fail and the transaction will revert. However, an Ethereum EOA on its own cannot reject any inbound NFTs (or any assets for that matter). This means that anyone could build an NFT that is made to look legitimate to a future owner and then send it to a vehicle’s account. The key thing is that the Vehicle NFT is the single source of truth with regards to valid documents. Any other NFTs in the vehicle’s EOA would not be a valid vehicle document.

With regards to simplicity and flexibility, we can cover them separately.

Simplicity — By separating service history and other documentation from the Vehicle NFT, you reduce the overall contract size of the Vehicle NFT. It streamlines things and makes the Vehicle NFT easier to read, audit etc.

Flexibility — documentation for a vehicle will vary from country to country. For example, a Warrant of Fitness in New Zealand is a similar but different document to the MOT in the UK. Further, it would be hard nay impossible to predict future documentation requirements. Composability enables a new NFT contract to be created easily, whitelisted in the Vehicle NFT and then added to the relevant vehicles making this aspect of it future proof.

Proof of concept

As I am a full stack, web 3 builder, I wanted to build a proof of concept suite of smart contracts for Ethereum. You can find my PoC code here:

https://github.com/vince0656/vehicle-nft

It is a hard hat, Solidity 7 project with a core Vehicle NFT contract inheriting from the OpenZeppelin suite of smart contracts. Additionally it contains other ERC721 compatible smart contracts that can be composed into the Vehicle NFT such as ServiceHistory.sol and MOTHistory.sol.

Challenges

One of the main challenges will be the infrastructure around making this possible but the core and critical piece of infrastructure, Ethereum, is ready to go. Having said that, there would need to be thoughts about how to get authorised service partners minting tokens etc. Going back to Mazda and their digital service record, there are already a number of partners that interface with their system to add service records. Therefore, it’s not impossible to imagine these partners using something like this.

Final Thoughts

Whilst adding an Ethereum wallet to a vehicle would be great for supporting NFTs as discussed above, it opens up many further features. One feature could be automated digital toll payments. Imagine streaming a regular payment of stable coins to your vehicle with Superfluid so that it can pay for the use of toll roads as you are driving. The automated payments would be settled within the 15 second confirmation time that Ethereum offers and permanently forgotten about as the vehicle takes care of the rest.

Generally speaking there is a lot of real world assets that are ripe for being tokenised and some more than others. I think vehicles are the perfect fit for an asset to be tokenised. Furthermore, I believe machine to machine communication and exchange of value will be common place in the future and will be backed by Blockchain technology 🚀

AFP VIA GETTY IMAGES

--

--