
Core services
Functions
Write and deploy serverless JavaScript functions that execute custom onchain logic. Functions run in isolated VMs, scale horizontally, and support external API calls.
Subscriptions
Receive real-time updates triggered by smart contract events or internal loyalty actions. Route notifications to webhooks or trigger functions automatically.
Relayers
Secure private key management for signing messages and relaying transactions onchain. Enable gasless transactions and sponsored actions for your users.
Onchain Tokens
Maintain ERC-20 token balances onchain for any Snag loyalty currency with automated synchronization between off-chain points and onchain tokens.
How Stratus works
Stratus services are designed to work together or independently. A typical workflow combines multiple services:- Subscribe to onchain events (e.g., a token transfer or contract interaction) using Subscriptions
- Process the event data with a serverless Function that applies your custom business logic
- Execute onchain actions through a Relayer, such as minting rewards or updating token balances
All Stratus services are available through the Snag admin dashboard. Functions and relayers also support programmatic access via the Snag API with a Stratus-scoped API key.
Use cases
- Custom loyalty rules — Write a Stratus function that checks onchain state and rewards users based on your own criteria using the Stratus function loyalty rule
- Gasless transactions — Use relayers to sponsor gas for your users when they claim rewards, mint NFTs, or interact with smart contracts
- Onchain event tracking — Subscribe to smart contract events and automatically trigger reward distributions or update user balances
- Token-backed points — Sync your off-chain loyalty currency to an onchain ERC-20 token so users can trade, stake, or bridge their points
- Automated airdrops — Schedule a function on a cron to periodically check leaderboard rankings and distribute token rewards
Getting started
Access Stratus in the admin dashboard
Navigate to the Stratus section in the Snag admin dashboard. You will see tabs for Functions, Subscriptions, Relayers, and Onchain Tokens.
Create a Stratus API key
Go to the API Keys page and create a new key with the Stratus scope. This key is used for webhook invocations and API access to Stratus services.
Build your first function
Head to Functions to write and deploy your first serverless function. Check out the function templates for common patterns.
Related pages
Function Syntax
Reference guide for writing valid Stratus functions with proper exports, parameters, and module imports.
Function Templates
Pre-built templates for common use cases like airdrops, token gating, and custom reward logic.
Webhooks
Configure webhook endpoints to receive real-time notifications for onchain and loyalty events.
Function Loyalty Rule
Create custom loyalty rules powered by Stratus serverless functions.