> For the complete documentation index, see [llms.txt](https://docs.cybercookie.party/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybercookie.party/security.md).

# Security & Anti-Cheat

CyberCookie is **server-authoritative**: the server owns your balance, energy, and every economic outcome. The client only sends intent (a tap batch, a bet, a tile to reveal); it can never set its own balance.

## Tap integrity

* The server regenerates your energy from elapsed time and **clamps** each tap batch to the energy you actually have. You can't earn beyond what the server itself regenerated.
* Tap batches are **signed with HMAC-SHA256** using a per-session key issued by the server. The server recomputes the signature and drops anything tampered with (e.g. in a proxy) or replayed (nonce + timestamp window).
* Autoclickers are allowed — they're just bounded by energy like everyone else.

## Casino integrity

* **Cookie Spin** rolls on the server; the client only sends the bet.
* **Mines** hides the mine positions on the server. The client sends the tile index to reveal; it can't see where the mines are. Bets are only settled on bust/cash-out.

## Economy integrity

* Balance is never accepted from the client. Every credit/debit (upgrades, boosts, gambling, codes, rewards) is computed and applied on the server.
* Profit/hour, tap power, max energy, and level are all **recomputed** on the server from your upgrades, boosts, role, and unlocked balancers.

## Anti-abuse

* **Referrals** are not credited for accounts on the **same IP** as the referrer.
* **Friend boosting** between two accounts on the same network is blocked (hashed IP fingerprint).
* Inputs are validated and coerced to prevent injection; uploads (avatars) are mime/size-checked; display names are sanitized.
* Reward codes are one-per-account.

## Privacy

* Raw IPs are only visible to admins and hidden by default in the admin panel.
* You can make your profile **private** (Settings) so other players see only your identity card, not your stats.

Back to [Introduction](/readme.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cybercookie.party/security.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
