SNIP: A standard interface for manage modular Own Dapp

Simple Summary

A standard interface for manage modular Own Dapp.

Abstract

This SNRC is a system for manageing modular Own Dapps. Manages all Own Dapps without a limit on the number. Here, Own Dapp refers to a code logic that is declared. Own Dapps can share storage among themselves.

Motivation

  1. Provide a single smart contract address to support multiple Own Dapps.

  2. This proposal can be based on the Standard Account Interface SNIP-5, allowing each user to truly own their Own Dapp (e.g., Own NFT market, dex, inheritance, asset management, etc.).

  3. Shared storage for Own Dapps and reusable logic, offering stronger composability.

  4. Provide the ability to enable or disable one or more Own Dapps.

  5. Own Dapps can be developed progressively, allowing your to grow continuously.

  6. Modularly manages Own Dapps, and adding new Own Dapps does not require upgrading the smart contract.

  7. Direct support for some of the currently declared Dapp smart contracts.

Storage among different Own Dapps

External accounts call Own Dapp logic

Specification

Interface

An interface is a set of function signatures with concrete type parameters, usually represented by a trait. These are meant to be implemented as external by contracts complying with such interface. For example:

Event

Implementation

Example implementations are available at

Security Considerations

  1. An own dapp cannot use a constructor function and should adopt an init function

  2. An own dapp does not necessarily need to be deployed but must be declared.

  3. Shared storage should be carefully considered as it might lead to storage conflicts.

  4. Whenever one or more own dapps are added or removed, and also when all dapps are added, the contract must emit an event.

  5. All own dapp source code can be verified.

Copyright and related rights waived via MIT.

Last updated