Persistent, on-chain values that store data used across rules.
Trackers are persistent, on-chain variables defined within a policy. They allow you to store historical, cumulative, or computed values. Tracker values can be referenced and updated by rules in the policy.Trackers are great for scenarios like thresholds or quotas (e.g. “users can only mint X per day”), storing cumulative activity (e.g. total tokens sold, volume), and anything you want to track over time.
Once defined, you can reference any tracker in any expression in the policy. For example, you can use a tracker in a rule’s condition expression, or use a tracker in a tracker’s update expression (its own or another’s).
Trackers are updated by using the update tracker effect in a rule. When using this effect, you’ll provide the name of the tracker and the update expression.For full details on how to use trackers in your policy, see our Trackers Guide.
Be mindful of the ordering of your rules that use and update trackers. Trackers are updated as
rule effects, so the new value is only visible in later rules—not the one that triggered the
update. Also, if multiple rules update the same tracker, make sure it’s deliberate.
While trackers are internal to your policy, they are stored on-chain and can be read externally. External contracts can query current tracker values, use them as part of onchain or off-chain logic, integrate them into dashboards, etc.Available SDK functions for trackers here.