Expand description

Subscription Add-On

abstract_os::subscription provides OS owners with a tool to easily create smart-contract subscriptions for their products.

Description

The subscription contract has three main uses.

  1. Provide a way to earn income with a subscription-style modal.
  2. Distribute income and native assets to project contributors. (optional)
  3. Distribute a native asset to your active users. (optional)

Income

The income of the instance can change over time as subscribers join and leave. If we want our infrastructure to change parameters based on the income of the unit, then we need a way of keeping track of that income. Because blockchains don’t have a notion of monthly settlement we settled on a per-month payment schema. We use a TimeWeightedAverage of the ongoing income to to determine a per-block income. We average the income over a monthly basis.

Emissions

Protocol emissions are an important part of creating a tight community of users and contributors around your product. The emissions feature of this module allows you to easily configure emission parameters based on your needs. These emission parameters are set when creating the module and are described on the UncheckedEmissionType struct.

Contributions

The contribution feature of this contract can be used to provide direct incentives for users to join in building out your product. Each contributor is registered with his own Compensation parameters.

  • The total income of the system is shared between the DAO and the contributors. See ContributionConfig.
  • (optional) Token emissions to contributor (and users) are dynamically set based on the protocol’s income. Meaning that the token emissions will rise if demand/income falls and vice-versa.

Modules

Structs

Enums