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

# Forest Playkit

> The no-code economic infrastructure layer powering every app and game on Forest Protocol. Builders focus on the experience. Playkit runs the economics.

#### **What is Playkit?**

Forest Playkit is the settlement and economy engine that sits between any app and the Forest Protocol economy. It handles every financial operation a game or app needs — wallets, trading, vaults, settlements, leaderboards — so builders ship with a complete economic stack without smart contract development

#### **Infrastructure Stack:**

* **Wallet Integration** — Automatic. Players connect once, every game reads their wallet. No SDK setup, no wallet libraries, no boilerplate.
* **In-Game Trading** — Players buy and sell tokens directly inside the game. They never leave the screen to trade.
* **Game Vaults** — Every project deploys with a dedicated vault. Creators set a reward pool percentage at launch. The vault funds automatically. Forest enforces solvency — if the vault runs low, payouts cap. It never pays out more than it holds.
* **Server-Side Settlement** — Game results settle through the developer's backend, not the browser. Signing secrets stay off the frontend. Safer for builders, harder to exploit.
* **Player-Approved Actions** — Before any game action is settled, the player authorizes the maximum amount that can be charged. No surprises. Full transparency on worst-case cost.
* **Settlement Validation** — Forest validates every settlement call against guardrails:
  * Max payout per action
  * Max payout multiplier
  * Daily payout caps
  * Idempotent action IDs (no duplicate settlements)
  * Vault solvency checks
* **Leaderboards** — Player rankings based on game activity, trading volume, or custom metrics. Built in, no extra development.
* **Reward Pools** — Configurable token pools that distribute to players based on activity. Funded from supply allocation, or manual top-up.
* **Deposits & Withdrawals** — Wallet-signed, on-chain transactions. Players deposit tokens into the game, play, and withdraw earnings. Full transaction history available.
* **Live Price Data** — Real-time swap quotes, price impact, and liquidity depth. Games can build UI around actual market conditions.
* **Balance-Aware Mechanics** — Read the player's live token balance and build game logic around it. Bet sizing, entry gates, reward tiers — all dynamic, all real.

#### **How the Settlement Flow Works:**

1. Player performs an action in the game
2. Game calls the developer's backend to determine the result
3. Developer backend submits the result to Forest's settlement API
4. Forest validates — balance, payout limits, vault solvency, action uniqueness
5. Game balance updates
6. Player withdraws to wallet anytime

Developers own the game logic. Forest owns the settlement layer. The separation is clean and secure.


---

# 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.forest.inc/forest-playkit.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.
