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

# Maintain documentation variables

Maintain RIP and marketplace variables and their daily public onchain refresh.

RIP vault and marketplace pages use native GitBook space variables in `.gitbook/vars.yaml`. Inline expressions reference `space.vars` inside an HTML code element with `class="expression"`. The same variables can be edited in GitBook's **Library → Variables** while working in a change request. Updating a value updates every expression that references it once the change is merged and published.

The daily GitHub Actions job reads public onchain getters and commits updated variables to `main`, which GitBook imports through Git Sync. All pages referencing those variables update together. It uses no wallet, signer, AWS access, or RPC secret. Reviewed source rules remain separate from daily getter observations.

## Daily refresh

The `GitBook documentation` workflow runs once per day at 13:23 UTC. You can also run it from Actions with **Run workflow**. It validates docs and tests, then reads the public HyperEVM RPC at one block for both production contracts. It rejects the wrong chain, a block older than one hour, invalid addresses or results, unexpected wrapped tokens or decimals, and failed getters. A failed read leaves the previous file intact and the workflow fails. Check the Actions failure notification and the displayed observation time if values stop advancing.

The job refreshes production vault deposit/redemption fees, manager and fee recipient, deposit cap, deposit/redemption minimums, partial-payout minimum, liquidity sweep threshold, NAV drift and staleness. For the production marketplace it refreshes the base fee, discount token, community collection, factory/registry/beacon, owner, fee recipient, pause state and configured collection eligibility. Amounts remain exact decimal strings; zero deposit cap means disabled. Dates come from the observed block timestamp, not the runner clock.

The job deliberately keeps contract targets, collection target, URLs, support contacts, LP address, NFT trading fees, expected keeper timing, discount tiers and source constants under review. A getter observation does not establish service health, source equivalence, trade execution or production-launch readiness. When upgrading contracts, review the getter ABI in `scripts/refresh-vars.mjs` and the rules in these guides. A removed getter stops the refresh rather than publishing partial values.

For local checks, use Node 24 and run:

```sh
npm ci --ignore-scripts
npm test
npm run check:docs
npm run refresh:vars
npm run check:docs
```

The refresh uses only `eth_chainId`, `eth_blockNumber`, `eth_getBlockByNumber` and `eth_call`. It writes `.gitbook/vars.yaml` only after all reads pass. The scheduled job validates expressions and links before committing that file. If another commit reaches `main` first, the push fails without overwriting it; rerun the workflow.

## What belongs in variables

The `marketplace_` variables hold the product name, network and token labels, URLs, production contract addresses, fee rates and thresholds, price tick, auction and form limits, support address, environment label and observation references. Rates use basis points and the pages derive percentages rather than storing a second percentage value.

Addresses and dates must remain quoted YAML strings. Never put secrets, access passwords, private RPC endpoints, API credentials, or signing material in GitBook variables. These are documentation content and may be publicly visible.

## Refresh after a production configuration change

1. Read the named public parameters under `/rip/prod/public`, then check the deployed frontend configuration. Release settings are explicit build inputs; old source fallback addresses are not authoritative.
2. Read the production target parameters `NFT_MARKETPLACE_ADDRESS`, `HYPURR_NFT_ADDRESS`, `RHYPURR_VAULT_ADDRESS`, `WHYPE_TOKEN_ADDRESS`, `NFT_VAULT_FACTORY_ADDRESS`, `NFT_VAULT_REGISTRY_ADDRESS` and `RHYPURR_NATIVE_DEPOSITOR_ADDRESS`. Compare them with their corresponding variables and deployed getters. Frontend build inputs use `VITE_HYPURRMARKET_*` aliases; verify the values in the deployed bundle rather than treating those aliases as SSM parameter names.
3. At the chosen marketplace, read `feeBps`, `feeDiscountToken`, `hypurrNFT`, `wrappedNative`, `vaultFactory`, `owner`, `paused`, and `collectionConfigs(collection)`. The collection getter returns `strategy`, `tokenStandard`, and `allowed`, in that order. Check the factory's `registry` and `vaultBeacon`; reconcile the configured registry and native-deposit helper as well.
4. Verify helper ownership and its linked vault before changing the fee-flow description. Check ownership of the factory, registry, helper, and beacon separately before claiming a shared administrator.
5. Review the contract implementation and frontend changes for fee thresholds, price increments, bid increments, expiry limits, payment-token support, pause behavior, and recovery methods. Changing a variable alone cannot correct a changed rule.
6. Update reviewed target addresses and source-rule variables in `.gitbook/vars.yaml`, then run the refresh. Observation timestamps and blocks must come from that successful read.
7. Preview the guides in GitBook. Check expressions, tables, navigation, links, and each trading path affected by the release. Confirm that variables render as values and do not appear as raw expression markup.

Read-only checks do not require submitting financial transactions. They establish observed configuration, not successful execution of every documented trade or bytecode equivalence with a local build.

## Change a production target

Change the marketplace and collection target addresses only after checking the deployed production app, public configuration, implementation and linked dependencies. Re-run the complete refresh and preview affected trading guides before merging. The daily job follows these configured targets; it does not discover new deployments.

Production vault references use `rhypurr_` variables and their own observation fields. The community NFT and discount token are read from the production marketplace.

## Authoring references

GitBook documents [variables and expressions](https://gitbook.com/docs/create-content/variables-and-expressions), [content configuration and navigation](https://gitbook.com/docs/docs-as-code/git-sync/content-configuration), and the native Git Sync variable format in its [official authoring reference](https://github.com/GitbookIO/gitbook-skills/blob/main/skills/write-docs/references/frontmatter.md#variables-and-expressions).
