Documentation: 0.5.0 (source: v0.5.0).
# Claim stakes

> Claims on celestial bodies, their lifecycle, and what they yield.

Markdown source of https://docs-v0-5-0.atlas-kit-docs.pages.dev/guides/claim-stakes/ — see https://docs-v0-5-0.atlas-kit-docs.pages.dev/ai/ for the full machine-readable surface.

A claim stake is a player's claim on a celestial body: a hub to build
infrastructure on, producing resources over time rather than in a single
action.

:::game[A Claim Stake turns land into a base]
A Claim Stake lets a player take an available plot on a planet controlled by
their faction. They can build extraction, processing, power, and other
facilities there, turning empty land into a working base. Placing the stake
costs resources and keeping the plot requires ongoing ATLAS rent. If the
player's faction loses control of the system, the buildings can be lost and
the Claim Stake asset is returned.
:::

## Reading them

By owner, which is the usual direction:

```ts
const stakes = await character.claimStakes.all();
```

Or by the body, when you want to know who holds a particular place:

```ts
const stakes = await sage.claimStakes.byBody(bodyAddress);
```

> **Runnable example — Read the claim stakes on a body.** Every claim stake placed on one celestial body, with its state. Run it in the browser at https://docs-v0-5-0.atlas-kit-docs.pages.dev/guides/claim-stakes/.

## Lifecycle is a state, not a flag

A stake's `state.kind` is one of `design`, `active`, or `deactivated`. Those are
genuinely different situations rather than degrees of the same one:

```ts
if (stake.state.kind === 'active') {
  // Producing. Other kinds are not.
}
```

Reading a stake and assuming it is producing is the mistake this shape exists
to prevent.

## Buildings and construction

A stake is not one thing — it is a plot with infrastructure on it. The
snapshot carries the whole layout:

```ts
const stakes = await character.claimStakes.all();
const layouts = stakes.map((stake) => ({
  buildings: stake.buildings.length,
  crew: stake.neededCrew,
  underConstruction: stake.constructionRemainingSeconds > 0n,
}));
```

`buildings` is what has been placed — extraction, processing, power, storage —
and each wants crew. Construction is live state: a stake can be active and
still have `constructionRemainingSeconds` left on recent changes.

## What it produces

Production follows the same pattern as [mining](/guides/mining/): rates
against a clock, not a stored total.

```ts
const output = stake.resources.netProduction;
const held = stake.resources.inventory;
```

`netProduction` is per-resource rates (consumption nets against generation —
a processing chain can make a rate negative), `inventory` and `capacity` are
what the stake holds right now, and `lastTickAtUnixSeconds` anchors the clock
you project from.

## Rent keeps it standing

A stake occupies land and pays for it: `rentBalanceRaw` is what remains and
`lastRentAtUnixSeconds` when it was last settled. A dry balance eventually
means eviction, and coming back from that is a respawn, not a resume.

:::game[Deployments cost rent]
A crafting hab or claim stake is not bought once and owned forever — it
occupies land, and land charges rent. Keeping the balance topped up is part of
running the operation; letting it run dry eventually gets the deployment
evicted, and rebuilding after that takes a respawn. The two systems share this
machinery: habs and stakes are both deployed, built upon, rented, and
reclaimed the same way.
:::

## Instances have no derivable address

Like crafting processes, claim stake **instances** cannot be computed from the
character and the body — the address is assigned at creation. That is why the
reads are `byCharacter` and `byBody` rather than a derivation, and why finding
one you have no reference to needs discovery.

## Gotchas

**A stake in `design` is not yet producing.** It exists, it is yours, and it
yields nothing. Filter on state before summing output.

**Capacity and yield come from definitions.** What a stake produces depends on
the body and the Game account's rules, not on fields stored in the stake
account alone.

**A body can hold stakes from several players.** `byBody` returns an array for
that reason.

## Reference

- [`claim-stakes`](/reference/claim-stakes/) — every export in this entry
- [`world`](/guides/world/) — the bodies stakes are placed on
- [Crafting habs](/guides/crafting-habs/) — the sibling deployment system,
  sharing the same lifecycle and rent machinery
