# Computed state

URL: /code/builders/startup/computed-state · Id: `page:code/builders/startup/computed-state`

> A Startup's state is computed from Events and never set by hand, so a status, a fit or a payback cannot go stale.

State is computed from [Events](/business/nouns/event), never set by hand. A computed property names the Events it reads and no [Verb](/business/nouns/verb) can write it, so it cannot go stale.

## How it works
A computed property lists the Events it reads. The platform recomputes it when one arrives, and the verifier fails any Verb that takes it as an input or sets it in an effect.

The usual failure is a field someone forgets to update: a stage, a win probability, a runway cell. A computed field has no one to forget it.

## Where it runs
| Property | Computed from |
| --- | --- |
| [Customer](/business/nouns/customer) `status` | `Offer.subscribed`, `Customer.activated`, `Subscription.unsubscribed`, `Subscription.renewed` and `Order.placed`; `atRisk` reads Customer health. |
| [Lead](/business/nouns/lead) `fit` | The Lead fit [Policy](/business/nouns/policy), graded `strong`, `partial` or `none`. |
| [Deal](/business/nouns/deal) `statusSince` | The Deal's own Events. |
| [Renewal](/business/nouns/renewal) `outcome` | The [Subscription](/business/nouns/subscription)'s Events at the end of its term. |
| [Play](/business/nouns/play) `paybackDays` | Posted [Entries](/business/nouns/entry) and collected [Invoices](/business/nouns/invoice), walked back through each Customer's [Acquisition](/business/nouns/acquisition). |

A Deal's probability defaults from the [Portfolio](/business/nouns/portfolio)'s measured conversion for the same [Motion](/business/nouns/motion), Deal size and time in stage. It shrinks toward the [Startup](/business/nouns/startup)'s own history as that grows.

## Sealed readings
A number an investor reads cites a [Proof](/business/nouns/proof): the [Metric](/business/nouns/metric), its value, the Policy that computed it and the log root. Verifying the Proof reruns the query against the log root and returns the same value, or the Proof fails.

## Example
A Customer subscribes, and `Offer.subscribed` makes the status `trialing`; two days later `Customer.activated` makes it `activated`. Three silent weeks drop Customer health below its line, the status reads `atRisk`, and [Retention](/workflows/processes/retention) starts a rescue. No [Worker](/business/nouns/worker) ever wrote the field.