arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

Assets as Ownable Smart Contracts

hashtag
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.

hashtag
Asset Smart Contracts

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

hashtag

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

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.

hashtag

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

circle-info

Other contracts in the Ethereum ecosystem exist which track ownership such as popular NFT contract or contracts which implement such as . 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.

hashtag
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 . The owner of an Asset is recorded in the Asset's identity on-chain.

hashtag
Asset Chain-of-Custody

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

Chain-of-custody events (, and ) for an Asset are emitted from the . 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.

hashtag
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 . 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.

hashtag
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 associated with asset management).

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

hashtag
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 .

hashtag
2a. Accept Asset

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

hashtag
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 is set to 'false'.

hashtag
Asset Enrolment

An Asset can take on . If their enrolment request is approved by the role issuer, the Asset is issued a role-based .

circle-info

Read more about role-based credentials in the documentation

Read more about credentials in the IAM stack .

  • 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.

provides the high-level methods to request and issue enrolments. See the API documentation .

hashtag
Using and Managing Assets in EW-DOS

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

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 .

hashtag
Use Case: Stedin Decentralized Asset Management

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

The goal of this collaboration was to:

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

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

Grid assets (e.g, smart meters, distribution automation devices), and were assigned DIDs. The DID is anchored on the asset's pre-existing SIM cards. Each asset exists as an identity in the 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 .

smart contractsarrow-up-right
IdentityManager smart contractarrow-up-right
IdentityManager smart contractarrow-up-right
below
OfferableIdentity smart contractarrow-up-right
OfferableIdentity smart contractarrow-up-right
ownership of Assets
below
ERC-173arrow-up-right
ERC-725arrow-up-right
Ethereum-compatible crypto-currency wallet such as MetaMask
iam-client-library Asset servicearrow-up-right
registration
ofference
transference
IdentityManager smart contractarrow-up-right
SSI Hub
IdentityManager smart contractarrow-up-right
sign transactions
OfferableIdentity smart contractarrow-up-right
IdentityManager smart contractarrow-up-right
IdentityManager smart contractarrow-up-right
iam-client-library
IdentityManager smart contractarrow-up-right
IdentityManager smart contractarrow-up-right
(enrol to) roles within an organization or an application
verifiable credential
here
here
iam-client-library
herearrow-up-right
Switchboard
herearrow-up-right
iam-client-library
herearrow-up-right
distribution system operator
Stedinarrow-up-right
discussed above
distributed energy resources (DERs)
DERs
distrubuted energy resources (DERs)
IdentityManager smart contract
herearrow-up-right