Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Connect Hub to the WoM #106

Closed srenault-meeds closed 4 months ago

srenault-meeds commented 7 months ago

Rationale

In order to be listed in the Hubs explorer AND to participate to the UEM (aka Mintium rewards), Hubs need a way to connect to the WoM. It means to reference a Deed they use.

It must be done "automatically" when starting a hub (AKA moving in) from the holders dApp.

It should be doable from the Hub when the server was not provisioned through the "Move In" feature of the dApp.

Also, it should be possible to change the Deed through which a Hub is connected to the WoM.

1. Functional Requirements

Top User Stories

Case 1: Connection from the Hub when not done yet

From the Hub itself, a platform admin can access a menu from Platform Settings > Recognition

image

Prerequisite to see the connection:

image

Once the wallet is connected, then list Deed NFTs that the Ethereum account owns or rents (lease)

Each Deed that is available and then listed will be introduced with the following characteristics:

image

Validation of the connection Once the Deed NFT is chosen, the admin is informed that:

The Hub's card is initialized from the Hubs data as follows:

And other pieces of information will be added to the card based the Hub status:

image

Case 2: Connection from the dApp when moving in

From the dApp, user can rent or acquire a Deed. Once he requests to move in, the new hub that will be started must be automatically connected to the WoM. This way, the admin doesn't need to do additional action to connect its hub to the WoM.

In case the user is wondering how to connect to the WoM, the user can access a user guide to know how to

Case 3: Update of the connection

In case you already have associated your Hub to a Deed, then you can decide to update it in order to benefit from different minting power or user limit, or to use a different lease.

Indeed, this can be useful when:

So from the same menu, the admin (after signing a message in Metamask to authenticate) will be able to edit the connection and choose another Deed NFT. In case you have Deeds available to use in another wallet, then you can easily switch to another blockchain account in Metamask and lead the Deeds and leases of this account

image

-> If the hub is no more connected to the WoM (end of lease for example), then a notification is sent to the admin that sends the user to this display:

image

Impacts

Gamification

NA

Notifications

Notification when the hub is no more connected to WoM (end of lease for example)

Analytics

Collect informations from hub to hub card (users, actions, rewards sent)

Unified Search

NA

2. Technical Requirements

Expected Volume & Performance

This feature shouldn't affect global performance of all applications of the Hub since this feature shouldn't be part of the applications business logic flows.

Security

The Meeds Product security model shouldn't be affected. Whereas, this new Feature should follow the following security Model:

  1. Only Deed NFT Host (the renter if exists else the owner) can attach a deed to a new Community
  2. Once a community is created by a Deed renter or a Deed owner, the community will be owned by the creator wallet
  3. Only Community owner (first wallet having requested to start a Deed) should be able to update related Deed NFT to a Hub
  4. A Community owner can transfer ownership to 0x wallet so that current Deed Host will acquire the priviledge to change the associated Deed NFT to the community or can as well transfer it to a dedicated wallet
  5. Each community has to be identified by a dedicated wallet address to be identified in the WoM.

Extensibility

N/A

Configurability

By default the deeds-tenant addon has to be installed in Meeds Package. This will allow anyone acquiring the Meeds package to connect its Hub, hosted by Association or in an owned infrastructure, to connect the Hub into the WoM.

Upgradability

N/A

Existing Features

N/A

Feature Flags

N/A

Other Non Functional Requirements

N/A

3. Software Architecture

Security

Knowing that the Deed NFT is managed in Ethereum Blockchain and that the WoM will be deployed on Polygon Blockchain, a centralized server will be used to allow bridging between both to submit any change on the WoM which will have to make the security checks before changing the WoM Hubs. Thus, any Hub connection to the WoM or modification of the Hub characteristics will be submitted through this server (wom.meeds.io) which will have to copy associated Deed NFT charcateristics from Ethereum Blockchain to Polygon Blockchain.

Access

The WoM Connection application will be part of the deeds-tenant addon which have to be part of the Meeds Product by default. This configuration has to be injected in Recognition Setup Portlet through extensionRegistry as made for Kudos, Wallet and Perks.

Services & processing

The following picture shows the used flow to Join the WoM by a Hub Owner: UEM-Software-Architecture-SequenceDiagramV2-Connect To WoM

A subset of information sent will be added into Polygon Blockchain such as:

The other information will be stored in WoM Centralized Server only in order to optimize Gas Fees. Those information, (such as URL, Desciption, Name and Color) will be used to display the Hub characteristics in Hubs Explorer under https://www.meeds.io/hub.

Data and persistence

The WoM contract will be deployed on Polygon Blockchain and will hold the following list of information

image image image

plamarque commented 7 months ago

@srenault-meeds updated with quite a few changes. Pease review fully.

srenault-meeds commented 7 months ago

Done! thanks for your update and proposition

srenault-meeds commented 5 months ago

Hi @margondicco Can you check please? Feedbacks are welcome

Thanks

margondicco commented 5 months ago

Hello very complete and no question :-)

plamarque commented 5 months ago

reviewed functional requirements one more time : LGTM

boubaker commented 5 months ago

Ready for tech spec review by DAO members ( eXo: @rdenarie )

rdenarie commented 5 months ago

Go tech

boubaker commented 5 months ago

Technical design has been updated to make the WoM connection more decentralized.

margondicco commented 5 months ago

Go Fonc for me

boubaker commented 5 months ago

Go Fonc for me

Sorry, we had already a Go-Func & Go-tech for this MIP. You may want to give a Go-func on #58 may be ?

margondicco commented 5 months ago

Go Fonc for me

Sorry, we had already a Go-Func & Go-tech for this MIP. You may want to give a Go-func on #58 may be ?

sorry and thank you

boubaker commented 4 months ago

ACC & PRs ready to review ( eXo : @rdenarie )

rdenarie commented 4 months ago

Hello, You can proceed to the merge.

boubaker commented 4 months ago

Hello, You can proceed to the merge.

Thanks, merged to develop