Onchain tasks

What are Onchain tasks?

The Onchain task type allows you to track blockchain-based events directly in claimr.

Unlike API tasks that receive events through external API calls, Onchain tasks automatically read blockchain events directly and use them to trigger rewards.

Use Onchain tasks to

  • Reward users for specific blockchain actions recorded on-chain.

  • Track event counts or values tied to smart contract interactions.

  • Automate rewards for verified on-chain activity without requiring API configuration.

Onchain tasks combine both event-based and value-based logic. They function similarly to API tasks but operate entirely on blockchain event data.

For detailed information about general task settings, including task name, header, description, rewards, dependencies, and more, refer to Task settings.

There are two main types of Onchain tasks you can configure:

  • Onchain Events Count: Count specific blockchain events.

  • Onchain Events Value: Track the total numeric value from blockchain events.

Onchain events count

  1. Go to your quest and click + Create new task.

  2. Under the Category section, select Onchain Actions.

  3. In the Groups list, choose Web3.

  4. Then, select Onchain Events Count from the list of task types.

  5. Click Continue to proceed to task settings.

Now move on to configuring the specific settings for your task.

  • Completion points: Set the number of points awarded once the user reaches the required event count.

  • Points multiplier (%): Add a percentage-based bonus to the total reward. For example, a 5% multiplier increases the final reward by 5%.

  • Recurrence: Control how often users can complete the task:

    Once – can only be completed one time per user.

    8h – available once every eight hours.

    Daily – available once every 24 hours.

    Weekly – available once every 7 days.

    Multiple – stays open and can be completed as many times as needed, one after another, without any waiting time.

  • Event category (optional): Create a tag that helps you organize and group event types.

  • Event name: Set the exact event identifier being tracked. Example, “Session”.

  • Query (optional): Create a filter that defines which blockchain events should be counted based on specific parameters inside the event data.

    Example: [?age > '21']

    This filter counts only those events where the field “age” is greater than 21.

    If no query is set, all received events are counted.

  • Events count: Set the minimum number of blockchain events required to trigger the reward.

  • Start at (optional): The date and time when the task becomes active. If set, events that occur before this time are ignored.

  • End at (optional): The date and time when the task stops being active. If set, events after this time are ignored.

    If both Start at and End at are defined, only events that occur within this period are counted.

  • Claim button text (optional): Customize the task’s claim button. Example: Get your reward.

  • Refresh button text (optional): Customize the button that updates task progress. Example: Update.

Optional toggles

  • Hide progress? Hide progress information from the user interface.

  • Is progressive reward? Enable scaling of the final reward based on how much the user exceeds the required event value. Example: if the expected value is 100 and the user reaches 300, they receive 3× the reward.

  • Is continuous? Keep the task open after completion so users can continue earning additional points each time they reach the required value again. This option also affects recurrence logic.

    • With daily recurrence and continuous off – the total value is counted across all events.

    • With daily recurrence and continuous on – only the value from the last 24 hours is considered.

  • Max progressive value (optional): Set the highest total value used to calculate progressive rewards. If the user exceeds this number, the reward is capped at the maximum. Example: if the maximum progressive value is 1,000 and the user reaches 10,000, they receive the reward for 1,000 only.

Once you’re done:

Click Create task to save and add it to your quest right away. You’ll now see the task listed in your quest. From there, you can reorder it, delete it, or edit it anytime.

Or click Advanced settings to configure additional options specific to this task type.

Onchain events value

  1. Go to your quest and click + Create new task.

  2. Under the Category section, select Onchain Actions.

  3. In the Groups list, choose Web3.

  4. Then, select Onchain events value from the list of task types.

  5. Click Continue to proceed to task settings.

Now move on to configuring the specific settings for your task.

  • Completion points: The number of points awarded when the user completes the task.

  • Points multiplier (%): Add a percentage-based bonus to the total reward. For example, a 10% multiplier increases the final reward by 10%.

  • Recurrence: Control how often users can complete the task:

    Once – can only be completed one time per user.

    8h – available once every eight hours.

    Daily – available once every 24 hours.

    Weekly – available once every 7 days.

    Multiple – stays open and can be completed as many times as needed, one after another, without any waiting time.

  • Event category (optional): Create a tag that helps you organize and group event types.

  • Event name: Set the exact blockchain event identifier being tracked. Example: “Transfer”.

  • Query (optional): Configure a path that extracts or filters the numeric value from incoming blockchain events.

    Example: [].data.bet — extracts the bet value from each event in a list. If no query is set, all event values are included.

  • Events value: Set the minimum total value across all received events required to trigger the reward.

  • Start at (optional): Set the date and time when the task becomes active. If set, events that occur before this time are ignored.

  • End at (optional): Set the date and time when the task stops being active. If set, events after this time are ignored.

    If both Start at and End at are defined, only events that occur within this period are counted.

  • Claim button text (optional): Customize the label for the task’s claim button. Example: “Get reward”.

  • Refresh button text (optional): Customize the label for the button that updates task progress. Example: “Update”.

Optional toggles

  • Hide progress? Hide progress information from the user interface.

  • Is progressive reward? Enable scaling of the final reward based on how much the user exceeds the required event value. Example: if the expected value is 100 and the user reaches 300, they receive 3× the reward.

  • Is continuous? Keep the task open after completion so users can continue earning additional points each time they reach the required value again. This option also affects recurrence logic.

    • With daily recurrence and continuous off – the total value is counted across all events.

    • With daily recurrence and continuous on – only the value from the last 24 hours is considered.

  • Max progressive value (optional): Set the highest total value used to calculate progressive rewards. If the user exceeds this number, the reward is capped at the maximum. Example: if the maximum progressive value is 1,000 and the user reaches 10,000, they receive the reward for 1,000 only.

Once you’re done:

Click Create task to save and add it to your quest right away. You’ll now see the task listed in your quest. From there, you can reorder it, delete it, or edit it anytime.

Or click Advanced settings to configure additional options specific to this task type.

Last updated

Was this helpful?