Assets as Ownable Smart Contracts

Assets in EW-DOS

In the context of EW-DOS, an Asset is a digital representation of a physical or virtual device on the Energy Web Chain. An Asset could represent, for example, a solar photovoltaic panel, a battery, an electric vehicle, or an IOT device.

Assets must have a Decentralized Identifier - DID in the Energy Web Chain's DID Registry in order to participate in applications and marketplace activities. Once an Asset has a DID, it can take on roles within an organization or application. This is discussed further below.

Asset Smart Contracts

Assets and their chain of custody are managed by smart contracts that are deployed on the Energy Web Chain.

When an Asset is first created, it is registered in the IdentityManager smart contract as an owned identity (the owner address being the Asset owner, discussed below).

The main purpose of the IdentityManager smart contract is to have a on-chain location which aggregates known assets. In other words, it provides a kind of "asset-registry" functionality. This can allow one for instance, to more easily answer questions such as "how many assets have been registered in total?".

While there are many OfferableIdentity smart contracts, there is intended to be fewer IdentityManager smart contracts as the IdentityManager's main purpose is the aggregation of OfferableIdentity information. For instance, an enterprise could have a single IdentityManager to all assets which are registered by their employees.

The Asset owner can offer ownership to another DID. The OfferableIdentity smart contract provides methods to verify, offer and transfer ownership of Assets (these concepts are discussed in further detail below).

Other contracts in the Ethereum ecosystem exist which track ownership such as popular NFT contract or contracts which implement ERC-173 such as ERC-725. However, a key requirement of Energy Web's asset implementation was that ownership transfers cannot be performed unilaterally and so these aforementioned options were not used.

Asset Owners

Every Asset must have an owner. Asset owners initiate the registration, transference and enrolment activity of their Assets. This requires them to make transactions on behalf of their Asset, so the owner must have an address on the Energy Web Chain that is connected to an Ethereum-compatible crypto-currency wallet such as MetaMask. The owner of an Asset is recorded in the Asset's identity on-chain.

Asset Chain-of-Custody

The iam-client-library Asset service provides high-level methods to facilitate the chain of custody for an Asset.

Chain-of-custody events (registration, ofference and transference) for an Asset are emitted from the IdentityManager smart contract. SSI Hub listens for and persists the details of these events. All historical owners of an Asset and the dates of offer, transference and acceptance are accessible through SSI Hub's API.

Register Asset

Registering as Asset involves creating an OfferableIdentity smart contract for the Asset on the Energy Web Chain, and registering its identity in the IdentityManager smart contract. This is initiated by the Asset owner. Because each Energy Web Chain address is a valid DID under the did:ethr DID method, each asset inherently has a DID.

Transfer Asset Ownership

The owner of a registered Asset can transfer ownership to another address on the Energy Web Chain. (The new owner's address must have signing capabilities in order to sign transactions associated with asset management).

The OfferableIdentity smart contract provides methods to facilitate Asset transferance. This contract makes calls to the IdentityManager smart contract so that the state of the Asset is updated at each phase of the transfer.

1. Offer Asset

When a transfer is initialized, an 'offer' of transfer is made to the recipient DID.

The state of the Asset identity is marked as 'offered' in the IdentityManager smart contract.

2a. Accept Asset

The DID that the Asset was offered to must accept the Offer before it is transferred to them. iam-client-library provides a method to accept the transfer. The Asset's owner is updated in the IdentityManager smart contract to reflect the new ownership.

2b. Reject Asset

The DID that the Asset was offered to has the option to reject the transfer. The Asset's 'offered' status in the IdentityManager smart contract is set to 'false'.

Asset Enrolment

An Asset can take on (enrol to) roles within an organization or an application. If their enrolment request is approved by the role issuer, the Asset is issued a role-based verifiable credential.

Read more about role-based credentials in the documentation here

Read more about credentials in the IAM stack here.

  • If the Asset's owner is an authorized issuer of the desired role, the Asset owner can directly issue a role-based verifiable credential to their Asset.

  • If the Asset's owner is not an authorized issuer of the desired role, the owner can submit an enrolment request on behalf of their Asset to the issuer.

iam-client-library provides the high-level methods to request and issue enrolments. See the API documentation here.

Using and Managing Assets in EW-DOS

Switchboard provides an interface for users to register, transfer and enroll Assets. If you are logged into Switchboard, you can view the Asset management interface here.

iam-client-library contains the high-level functions for managing (registering, fetching, transferring, etc.) assets and their corresponding data. You can view the service API documentation for Assets in the library here.

Use Case: Stedin Decentralized Asset Management

Energy Web and the distribution system operator (DSO) Stedin jointly developed a decentralized energy asset management system leveraging the EW-DOS components and architecture discussed above.

The goal of this collaboration was to:

  • Facilitate secure, encrypted communication between distributed energy resources (DERs) (i.e. solar panels, batteries, etc) and the grid

  • Enable DERs to provide grid services (e.g. selling excess energy back to the grid)

Grid assets (e.g, smart meters, distribution automation devices), and distrubuted energy resources (DERs) were assigned DIDs. The DID is anchored on the asset's pre-existing SIM cards. Each asset exists as an identity in the IdentityManager smart contract on the Energy Web Chain. Cryptographically signed information (such as control signals and commands) from the DSO (Stedin) can then be sent to targeted assets. This allows for an awareness and exchange of grid services between the DSO and DERs.

You can read more about this use case in the official press release here.

Last updated