> For the complete documentation index, see [llms.txt](https://sdk.metamarket.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.metamarket.tech/core-concepts/resources-and-quotas.md).

# Resources and Quotas

Two kinds of number show up constantly in games: values that drift over time, and values that reset on a cycle. Health that regenerates, a wallet that only grows, energy that refills each day, a spin counter that tops back up. MetaMarket has one model for the first, resources, and one for the second, quotas.

## Resources

A resource is a keyed value with a rule for how it changes. The rule runs at read time, not on a background timer: the engine records when a value was last touched and settles it the moment someone reads it. A pet's hunger that decays over hours is caught up on the next read; nothing polls it in between. This keeps state cheap, one row and a timestamp instead of a scheduler ticking every player, and it means a value is settled to the moment you read it.

Resources come in a few shapes:

* A **counter** only moves when an action writes it, like a soft-currency balance.
* A **regenerating or decaying** value drifts toward a bound at a set rate, like energy refilling or hunger draining.
* A **derived** value is computed from other resources and never stored on its own, like a mood calculated from hunger and warmth.

Every resource has bounds. Values never fall below their floor, so a currency cannot go negative and a spend that would overshoot is rejected rather than silently clamped into strange territory. A resource can also be guarded so it only comes into existence through a deliberate grant, which keeps a pet's needs from activating before the onboarding step that is meant to introduce them.

## Quotas

A quota is a refillable allowance: so many uses, refilling on a cycle. Daily energy, a limited number of care actions, free spins that come back tomorrow. Each use spends one charge, and the allowance regenerates up to its cap on its schedule, so a returning player finds it topped back up. Regeneration is capped and does not stack: someone away for a week comes back to a full allowance, not seven times the daily amount.

The cycle is anchored to the calendar rather than to a rolling window, so a daily quota refills at the day boundary, and every player on that quota rolls over at the same moment. When a quota is spent, the next attempt to use it is refused until it regenerates, which is what makes "four times a day" mean exactly that. The [Worked Examples](/evaluate-and-integrate/examples.md) show the precise request and the response a spent quota returns.

Resources and quotas are declared in a game's configuration, which is where their rates, bounds, and cycles live. See [App Configuration](/evaluate-and-integrate/app-configuration.md).
