How it Works

Incentivized Action Markets

Anyone can create an IAM via the factory contracts or through front-ends like Royco.org. There are two components of each IAM:

  1. Incentivized Action. The onchain transaction(s) that the market incentivizes.

  2. Intents. Onchain intents that enable Incentive Providers and users to express their willingness to incentivize and perform the Incentivized Action, respectively.

1. Incentivized Action

Each IAM revolves around an Incentivized Action. There are two types:

  • Vault Actions: Designed for deposits and withdrawals from 4626 Vaults.

  • Recipe Actions: Designed for complex actions to support any onchain action(s).

Vault Action (ERC4626)Recipe Action (Weiroll)

Compatibility

ERC4626 Vaults

All Onchain Actions

Incentive Schedules

  • Streaming Incentives ("Distribute 100 $COMP per day")

  • Upfront ("Distribute 100 $COMP upon completion")

  • Backend ("Distribute 100 $COMP after X days")

  • Forfeitable ("Distribute 100 $COMP after X days, but allow early withdrawal")

Collateralizable

Supported

N/A

Locking Assets

N/A

Supported

Transaction Builder

N/A

Supported

These types of Actions have different functionality and use cases. At a high-level these are displayed below:

Vault Actions

Vault Actions are explicitly designed to incentivize onchain actions around 4626 Vaults. These Actions expose the native yield of a given 4626 Vault so that users may create Intents that specify the incentives necessary to deposit or withdraw them from that Vault. For example, a user may create an Intent to "deposit me into Ethena's 4626 Vault if the APY is > 10%."

Notably, users can create unlimited Intents with assets currently in a Vault IAM using capital currently being deployed into ERC4626. This unlocks capital efficiency between Intents, and is called a "Collateralized Intent." Vault Actions are most effective for distributing incentives pro-rata among unlocked LPs in a liquidity pool. So, if an Incentive Provider wants to pay a constant weekly incentive amount pro rata to all pool users, they should create a Vault Action IAM.

Using Vault Action IAMs

  1. An Incentive Provider may create an Intent, expressing how much incentive they will provide for the 4626 Action(s) (i.e., reward $10 XYZ to all users pro-rata, daily). This Intent is emitted as an onchain event.

  2. Alternatively, a user may create an Intent, expressing their requirement to perform Action(s) via their 4626 Vault (i.e., deposit if $25 XYZ tokens are emitted daily). This Intent is emitted as an onchain event.

  3. When the onchain Intents of an Incentive Provider and a user satisfy each other, the Action(s) are programmatically executed, and the incentives change hands (i.e., withdrawal from their current 4626 Vault and deposit into another).

A user retains full custody of their assets throughout the process, and Intents may be canceled at any time before execution.

View more on creating a Vault IAM here.

View more on incentivizing a Vault IAM here.

Recipe Actions

Recipe Actions are designed to incentivize all other onchain transaction(s) or combinations of transactions. Recipe Actions use Weiroll: a functional scripting language where all functions are smart contract interactions. Weiroll is more expressive than multi-call in that it allows function call outputs to be chained into inputs of other smart contract function calls. For example, if your protocol requires calling a "deposit" function and outputs a "number of LP tokens minted," then Weiroll can use the number output in the following action. Unlike Vault Actions, however, Recipe Actions do not have a function to view an LP's assets after deposit easily or shared accounting logic. Given this, assets deployed in Weiroll markets cannot be used in Collateralized Intents.

Creating Recipe Action IAMs

  • Anyone can create Recipe Actions via the factory contracts or a Transaction Builder; for example, see the Royco.org Action Builder below.

View more on creating Recipe IAMs here.

View more on incentivizing Recipe IAMs here.

2. Intents

Intents are emitted as onchain events. Only their execution requirements are held onchain in contract storage. Supported assets: tokens and points.

User Intents

Each user Intent specifies:

  1. Incentives: Amount required to complete the Action(s). I.e. For streamed incentives, tokens per incentive, per second. For non-streamed incentives: tokens per incentive.

  2. Amount: Maximum input tokens willing to be allocated for the intent.

  3. Source: The user's wallet or 4626 Vault, where the input tokens can be withdrawn.

  4. Expiration: An expiry time when the Intent is no longer valid.

Incentive Provider Intents

  1. Incentives. Amount willing to give for completing the Action(s). I.e. For streamed incentives, distribute X tokens, per day to anyone who completes the Action(s). For non-streamed incentives: distribute X tokens to the first user who agrees to complete the Action.

Supported Incentive Schedules

Incentives can be offered to users in different schedules, including:

ScheduleDescriptionAction Type Compatibility

Streamed

Pay an ongoing stream of tokens.

Vault Action

Upfront

Pay all incentives at the completion of action.

Recipe Action

Backend

Lock user's assets and pay incentives once unlocked.

Recipe Action

Forfeitable

Lock user's assets and stream incentives, which are forfeited if withdrawn early.

Recipe Action

Programmatic Intent Execution

  • For streaming markets: as soon as the 4626 Vault's incentive rate satisfies the user's Intent, the user's transactions programmatically execute using the onchain event.

  • For non-streaming markets: as soon as the incentive rate satisfies the user's Intent, the user's transactions programmatically execute using the onchain event.

Royco SDK

All Intents, Markets, etc. are made easily queryable by the Royco SDK. This enables developers to embed IAMs into their own websites and novel products to be built on top of the platform.

Last updated