> For the complete documentation index, see [llms.txt](https://docs.kojascripts.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kojascripts.eu/free/carmarket/features/exchange-zones.md).

# Exchange Zones

A player can own an entire zone and run it like a small business: set listing fees, take commission on every sale, cap how many listings can run concurrently.

## How to become a zone owner

{% stepper %}
{% step %}

### Approach the zone NPC

Use any of the configured `Config.Zones` locations.
{% endstep %}

{% step %}

### Open the tablet → "Exchange owner"

If the zone has no owner, you'll see a **Buy entire zone** action.
{% endstep %}

{% step %}

### Pay `Config.Exchange.ZonePurchasePrice`

Default: `250,000` from your bank. The transaction is atomic — money is only deducted if the insert into `koja_carmarket_exchange` succeeds.
{% endstep %}

{% step %}

### Tweak settings to taste

Once you own it, the **Exchange owner panel** lets you set:

* **Max listings** — how many sellers can list at once
* **Listing fee per week** — what sellers pay you per active listing
* **Commission %** — your cut on every sale
  {% endstep %}
  {% endstepper %}

## What you earn

Every time **any** vehicle in your zone sells:

```
buyer pays $100,000
├─ commission to you  → $5,000  (if commission_percent = 5)
└─ remainder to seller → $95,000
```

Every active listing, every 7 days:

```
seller pays $500     → you receive $500 (minus any commission cut)
```

{% hint style="info" %}
If **you** list a car in **your own** zone, the weekly listing fee is **skipped** — you don't pay yourself.
{% endhint %}

## Settings persistence

| Setting          | Where it lives                                 |
| ---------------- | ---------------------------------------------- |
| Owner identifier | `koja_carmarket_exchange.owner_identifier`     |
| Listing fee      | `koja_carmarket_exchange.listing_fee_per_week` |
| Max listings     | `koja_carmarket_exchange.max_listings`         |
| Commission       | `koja_carmarket_exchange.commission_percent`   |

Defaults come from `Config.Exchange` until a player buys the zone, then their settings persist independently.

## Selling a zone

Currently **not implemented** — once you own a zone, ownership is permanent until a server admin runs SQL to release it:

```sql
UPDATE koja_carmarket_exchange SET owner_identifier = NULL WHERE zone_id = 'zone1';
```

This is on the roadmap for a future version (auction-style transfer).
