# contract parameters

Every parameter below is **immutable** — set at deploy time, never modifiable. The contract is non-upgradeable. The only mutable state is paused/unpaused and the Treasury address.

You can verify all of this on [BaseScan](https://basescan.org/address/0x2fc6188e5d5e8d33856bb2ca60244dfdb5c0391a#code).

***

## Network

| Field            | Value                                        |
| ---------------- | -------------------------------------------- |
| Network          | Base mainnet                                 |
| Chain ID         | 8453                                         |
| Contract address | `0x2fc6188e5D5e8d33856bb2cA60244DFdB5c0391A` |
| Solidity         | 0.8.24                                       |
| OpenZeppelin     | v5.0.2 (ReentrancyGuard only)                |
| Optimizer        | enabled, 200 runs                            |

## Supply & limits

| Constant               | Value  | Meaning                           |
| ---------------------- | ------ | --------------------------------- |
| `TOTAL_TILES`          | 10,000 | Maximum tiles that can ever exist |
| `MAX_TILES_PER_WALLET` | 5      | Per-address hard cap              |

## Pricing

| Constant          | Value     | Meaning                                                  |
| ----------------- | --------- | -------------------------------------------------------- |
| `ADMISSION_PRICE` | 0.007 ETH | Sent to Treasury on every claim                          |
| `INITIAL_DEPOSIT` | 0.003 ETH | Tax reserve seeded on claim                              |
| `CLAIM_TOTAL`     | 0.01 ETH  | Total `msg.value` required on `claimTile`                |
| `MIN_PRICE`       | 0.01 ETH  | Floor for any `declaredPrice`                            |
| `MAX_PRICE_MULT`  | 3         | A single `setPrice` can raise price at most 3× effective |

## Taxes & decay

| Constant               | Value         | Meaning                                        |
| ---------------------- | ------------- | ---------------------------------------------- |
| `TAX_RATE_BPS`         | 500 (5%)      | Weekly Harberger tax rate                      |
| `TAX_PERIOD`           | 604,800 sec   | One week, in seconds                           |
| `DECAY_PERIOD`         | 1,209,600 sec | Two weeks, in seconds                          |
| `DECAY_RATE_BPS`       | 2,000 (20%)   | Price drops 20% every 2 weeks                  |
| `DECAY_FLOOR_BPS`      | 1,000 (10%)   | Floor: 10% of original (capped at `MIN_PRICE`) |
| `APPRECIATION_TAX_BPS` | 3,000 (30%)   | Tax on price increases                         |
| `BUYOUT_FEE_BPS`       | 1,000 (10%)   | Buyout fee on top of price                     |

## Revenue splits

| Source                    | Treasury                      | Holders pool                     |
| ------------------------- | ----------------------------- | -------------------------------- |
| Admission (claim)         | 100%                          | —                                |
| Buyout fee (10% of price) | 90% (`BUYOUT_DEV_BPS = 9000`) | 10% (`BUYOUT_HOLDER_BPS = 1000`) |
| Weekly Harberger tax      | 50% (`TAX_DEV_BPS = 5000`)    | 50% (`TAX_TREASURY_BPS = 5000`)  |
| Appreciation tax          | 60% (`APPR_DEV_BPS = 6000`)   | 40% (`APPR_TREASURY_BPS = 4000`) |
| Token fees received       | 10% (`DEV_FEE_BPS = 1000`)    | 90% (`HOLDER_FEE_BPS = 9000`)    |

> All protocol-share amounts accumulate into the **Treasury** balance, which can be withdrawn by the Treasury address at any time. The contract exposes a public read function for the current Treasury balance.

## Function summary

### Public, anyone can call

| Function                                             | What it does                                                                    |
| ---------------------------------------------------- | ------------------------------------------------------------------------------- |
| `claimTile(tileId, declaredPrice, repoName)` payable | Claim an empty tile. Send exactly 0.01 ETH.                                     |
| `buyoutTile(tileId)` payable                         | Buy a tile from its owner. Send `effectivePrice × 1.1` minimum.                 |
| `pokeTax(tileId)`                                    | Force tax collection on any tile. Triggers foreclosure if deposit is exhausted. |
| `claimFees()`                                        | Withdraw your accumulated holder share.                                         |
| `getTile(tileId)` view                               | Read tile state.                                                                |
| `getPlayer(addr)` view                               | Read player state.                                                              |
| `getEffectivePrice(tileId)` view                     | Read price after decay.                                                         |
| `isTileHolder(addr)` view                            | Check if address holds any tile.                                                |

### Owner-only (per tile)

| Function                             | What it does                                                          |
| ------------------------------------ | --------------------------------------------------------------------- |
| `addDeposit(tileId)` payable         | Top up your tax deposit.                                              |
| `withdrawDeposit(tileId, amount)`    | Pull excess deposit (after tax settlement).                           |
| `setPrice(tileId, newPrice)` payable | Change your declared price. Send ETH if raising and deposit is short. |
| `abandonTile(tileId)`                | Exit. Refund remaining deposit.                                       |

### Admin (authority)

| Function                     | What it does                                   |
| ---------------------------- | ---------------------------------------------- |
| `setPaused(bool)`            | Pause/unpause claims and buyouts.              |
| Set Treasury address         | Rotate the Treasury receiving address.         |
| `transferAuthority(address)` | Hand over admin role.                          |
| `emergencyWithdraw()`        | Available only after 90 days of zero activity. |

## Events

| Event                                            | When                                                                |
| ------------------------------------------------ | ------------------------------------------------------------------- |
| `TileClaimed(tileId, owner, price)`              | Tile is claimed for the first time (or after foreclosure / abandon) |
| `PlanetClaimed(tileId, owner, repoName)`         | Same tx as `TileClaimed`, carries the repo name                     |
| `TileBuyout(tileId, newOwner, prevOwner, price)` | Tile is bought from previous owner                                  |
| `TileAbandoned(tileId, owner)`                   | Owner abandons                                                      |
| `PriceChanged(tileId, oldPrice, newPrice)`       | Owner runs `setPrice`                                               |
| `TaxCollected(tileId, amount)`                   | `pokeTax` or any tile-touching tx triggers tax                      |
| `TileForeclosed(tileId, prevOwner)`              | Deposit ran out, tile returned to market                            |
| `FeesClaimed(player, amount)`                    | Holder withdraws their share                                        |
| `TokenFeesReceived(total, toDev, toHolders)`     | ETH sent to contract via `receive()`                                |
| `DepositAdded(tileId, amount)`                   | `addDeposit`                                                        |
| `DepositWithdrawn(tileId, amount)`               | `withdrawDeposit`                                                   |

The frontend reads `PlanetClaimed` logs to reconstruct the tile ↔ repo mapping. `TileBuyout`, `FeesClaimed`, and `TokenFeesReceived` populate the timeline in the tile modal.


---

# Agent Instructions: 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:

```
GET https://gitverse.gitbook.io/gitverse-docs/contract-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
