Rewards
Rewards covers where ATLAS comes from: the configuration that governs emission, the treasuries that hold it, and the commitments against it. Capability-only entry.
import { getAtlasRewardConfig, getAtlasRewardTreasury,} from '@aephia/atlas-kit/rewards';Configuration is versioned
Section titled “Configuration is versioned”Reward configuration changes over time, and reading the wrong version gives you numbers that were true once:
const registry = await getAtlasRewardRegistry(ctx);const version = selectAtlasRewardConfigVersion(registry, epoch);const config = await getAtlasRewardConfig(ctx, version);Selecting a version is explicit rather than implicit. The SDK will not silently pick one for you, because “the current config” is a question with a time-dependent answer, and guessing it wrong produces plausible numbers that are quietly incorrect.
Treasuries and commitments
Section titled “Treasuries and commitments”const treasury = await getAtlasRewardTreasury(ctx);const commitment = await maybeGetRewardCommitment(ctx, lootAddress);maybe again: a commitment that was never made is absent rather than an error.
Gotchas
Section titled “Gotchas”Do not cache a config across a version change. It will keep answering, with the previous rules.
ATLAS amounts are bigint. These are among the largest numbers in the game;
number will lose precision.
Reward state and loyalty banks are different things. Loyalty tracks contributions and their accumulated bank. This entry covers the reward system those draw from.