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

# The door

The door is how someone becomes a member. The head sets the mode at creation and can change it later (locks tab). Caps and the allow-list sit on top of the mode.

Join checks always run first, regardless of mode:

* protocol trading is not paused,
* the family's **joins lock** is off,
* if you are a new member and `maxMembers` is set, the family is not full.

Then the mode applies. **Current members** (shares > 0) and **allow-listed** addresses skip the mode check and may top up or walk in, still subject to the gates above.

If the vault has shares but **no value left** (everything distributed), joins revert — see [How a family works](/the-product/how-a-family-works.md). Escrowed approval-mode deposits can still be cancelled for a refund.

## Open

Anyone with a wallet can join. Default for KOL families in the wizard.

## Approval

Deposits are **escrowed** in the vault until a head or mod acts.

1. The applicant calls `requestJoin` (or `requestJoinETH` on a WETH family). Quote sits in `pendingDeposit`; it is not yet shares.
2. A mod (or the head) **approves** or **declines**. Decline refunds the quote.
3. The applicant **completes** the join (`completeJoin`) with the same mirror-buy legs as a normal join. Until they complete, they are approved but not yet a member.
4. The applicant can **cancel** at any time before completion and take the escrow back.

The family page and Telegram waitlist also collect "hands" (off-chain) when the door is shut; waving someone in is an allow-list write.

## Invite codes

EIP-712 typed data, **signed by the head**, verified on-chain against this vault.

| Field     | Meaning                                                                 |
| --------- | ----------------------------------------------------------------------- |
| `codeId`  | Opaque id for this code (use-count key)                                 |
| `maxUses` | 0 = unlimited; otherwise the code dies after that many successful joins |
| `expiry`  | Unix timestamp; the contract rejects a later `join`                     |
| `bound`   | `address(0)` = anyone holding the signature; otherwise only that wallet |

Domain: name `familio.trade`, version `1`, chain id 4663, verifying contract = the vault. The app issues links at `/join/<code>` and stores the payload (including the signature) in the URL.

{% hint style="info" %}
Mods can also sign invite **links** in the head panel. Those links prove the crew handed them out, so they can open a **private** family's numbers. The vault itself only honours a signature from the **current head**. A mod-signed code will not get you through an on-chain invite door.
{% endhint %}

## Holder-gated

The joining wallet must hold at least `gateMin` of `gateToken` (`balanceOf` at join time). The head picks the token and the minimum. Changing door mode later can clear or replace the gate.

## Allow-list

`setAllowlist(account, on)` — head or mod. An allow-listed wallet skips the join **mode** (open / approval / invite / holder-gated) but still hits joins-locked, max members, and the protocol pause.

The head is allow-listed in `initialize`, so they never need a second transaction to enter their own closed family.

## Caps

| Cap                   | 0 means   | What it counts                                                                                                                                |
| --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `maxMembers`          | unlimited | Distinct addresses with shares > 0. Top-ups by existing members do not consume a seat.                                                        |
| `maxTotalContributed` | unlimited | Net quote still in from current members (deposits minus a pro-rata reduction on exit). A join that would push the total over the cap reverts. |

The create wizard exposes max members. `maxTotalContributed` is on-chain and can be set in `setCaps`; the wizard currently sends 0 (unlimited).

## What the door does not do

* It does not lock exits.
* It does not replace the allow-list: you can keep a closed door and wave people in.
* It does not hide the family. Visibility is a separate, off-chain flag. See [Public vs private](/the-product/public-vs-private.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.familio.trade/the-product/the-door.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.
