# Community Coins

## 1. Introduction

Community Coins create coins around interests, projects, and news you believe in. Each coin makes community-building fun, rewarding, and super simple. • Launch: Create your coin with a single post, share with friends, raise ETH to successfully launch the forum. • Earn: After the coin graduates, member earn tokens by posting, with 0.15% of your community tokens rewarded weekly after • Grow: Make cool decisions together using the shared treasury and reward the people who make it happen.

Built on Base, Community Coins turn passive holders into real members.

## 2. Default Parameters for Community Coin Configuration

### Token Distribution

| Parameter            | Value | Description                                                               |
| -------------------- | ----- | ------------------------------------------------------------------------- |
| Bonding Curve Supply | 65%   | Percentage of tokens sold via bonding curve                               |
| Liquidity Allocation | 12.5% | Percentage of tokens allocated to liquidity on launchpad (if cap reached) |
| Treasury Allocation  | 15%   | Percentage of tokens held by the treasury                                 |
| Contest Allocation   | 7.5%  | Percentage of tokens deposited into autogenerated contest                 |

### Fee Structure

| Parameter                | Value         | Description                                                 |
| ------------------------ | ------------- | ----------------------------------------------------------- |
| Uniswap Launch Fee       | 0.4%          | Percentage of Uniswap pool token amount                     |
| Additional Liquidity Fee | 0.8%          | Percentage of raised liquidity from the $25k pool (\~$200)  |
| Protocol Trading Fee     | 1%            | General Launchpad protocol fee on each buy/sell transaction |
| Token Launch Fee         | 0.0004440 ETH | One-time fee for token launch                               |

### Contest Configuration

| Parameter          | Value                        | Description                                     |
| ------------------ | ---------------------------- | ----------------------------------------------- |
| Prize Distribution | 1st: 50%, 2nd: 35%, 3rd: 15% | Distribution percentages for contest winners    |
| Contest Type       | Recurring                    | Contest automatically renews                    |
| Contest Duration   | 7 days                       | Default length for recurring token contests     |
| Content Topic      | General                      | Default topic category                          |
| Voting Mechanism   | Weighted                     | Voting power determined by token holdings       |
| Vote Weight        | 100 Tokens = 1 Vote          | Default voting power ratio                      |
| Weekly Prize Share | 0.15%                        | Percentage of total supply distributed per week |
| Contest Manager    | LPContestManager             | Address that creates and manages contests       |
| Community ID       | \[Token Address]             | ID derived from the community token             |

### Governance Parameters

| Parameter     | Value    | Description                                                          |
| ------------- | -------- | -------------------------------------------------------------------- |
| Quorum        | 12.5%    | Minimum percentage of token supply required for governance decisions |
| Voting Delay  | 0.5 days | Time between proposal submission and voting start                    |
| Voting Period | 2 days   | Duration of the voting period                                        |

### Bonding Curve Parameters

| Parameter             | Value             | Description                                                       |
| --------------------- | ----------------- | ----------------------------------------------------------------- |
| Total Supply          | 1,000,000,000     | Maximum token supply (1B tokens)                                  |
| Min Initial Liquidity | 0.00000000001 ETH | Minimum starting liquidity (1E8 wei)                              |
| Initial Liquidity     | 4.167 ETH         | Initial liquidity amount (creates first sale at $1000 market cap) |
| Connector Weight      | 830,000           | Parameter controlling the shape of the curve                      |

## 3. Key Components

### Bonding Curve

The CurveManager contract implements a bonding curve mechanism that determines token pricing based on supply. Each community coin uses a specific curve implementation to create a predictable pricing model.

```
┌───────────────┐     ┌─────────────┐     ┌───────────────┐
│ CurveManager  │────▶│ CurveLogic  │────▶│ Token Pricing │
└───────────────┘     └─────────────┘     └───────────────┘
```

The CurveManager contract handles:

* Creation and management of different curve implementations
* Price calculations based on token supply and demand
* Security controls to prevent manipulation

### Recurring Contest System

Community coins automatically fund recurring contests to drive community engagement. The contest system distributes rewards to content creators and voters based on configured parameters.

```
┌──────────────┐     ┌───────────────┐     ┌───────────────────┐
│ ContestToken │────▶│ ContestManager│────▶│ Prize Distribution│
└──────────────┘     └───────────────┘     └───────────────────┘
```

The Contest system includes:

* Weekly content contests with configured prize pools
* Voting mechanisms based on token holdings
* Automated reward distribution to winners and voters

### Token Governance

Each community token is paired with a governance contract that enables community decision-making with the following workflow:

```
┌────────────┐     ┌─────────────┐     ┌──────────┐     ┌────────────┐
│ Proposal   │────▶│ Voting Delay│────▶│ Voting   │────▶│ Execution  │
└────────────┘     └─────────────┘     └──────────┘     └────────────┘
```

The CommonGovernor contract provides:

* Proposal submission functionality
* Voting mechanisms with configured parameters
* Execution of approved proposals

## 4. Technical Implementation

### CommunityStake Contract

The CommunityStake contract is a core component that manages buying and selling of community stake tokens using the bonding curve mechanism.

**Key Functions:**

* `buyStake`: Allows users to purchase community stake tokens with ETH or ERC20 tokens
* `sellStake`: Allows users to sell community stake tokens back to the contract
* `getPrice`: Calculates the current price of tokens based on supply and the bonding curve

**Rules:**

* All transactions are subject to protocol and namespace fees
* Token purchases and sales use the bonding curve for price determination
* The first token can only be purchased by the community owner or factory contract

### Token Trading Flow

The token trading process follows this sequence:

1. CommunityStake contract determines if the namespace and token ID are whitelisted
2. Contract calculates the current price using the CurveManager's implementation
3. Buyer sends sufficient ETH or tokens to cover the purchase price plus fees
4. Contract mints community stake tokens to the buyer
5. Collected fees are distributed to protocol and namespace fee destinations

For a complete technical specification of the token trading flow, please refer to the [official documentation](https://docs.common.xyz/commonwealth/protocol/launchpad_docs#token-trading-flow).

## 5. CurveManager Implementation

The CurveManager contract handles the bonding curve logic that determines token pricing. It implements access control mechanisms to manage curve creation and updates.

**Roles:**

* CURVE\_MASTER: Can create, update, and manage curves
* TRADE\_MASTER: Can freeze curves to prevent trading

**Functions:**

* `createCurve`: Creates a new bonding curve with specified parameters
* `updateCurve`: Updates an existing curve if not vetted as immutable
* `freezeCurve`: Temporarily pauses trading on a specific curve
* `calculatePrice`: Delegates to the curve's logic contract to determine token price

The bonding curve system is designed to provide:

* Predictable price increases as supply decreases
* Liquidity for community tokens at all times
* Customizable curve parameters for different community needs

## 6. Additional Resources

For further technical details on contract implementations, please refer to:

* [CommunityStake Documentation](https://github.com/hicommonwealth/user-docs/blob/docs/protocol/page_under_construction.md)
* [CurveManager Documentation](https://github.com/hicommonwealth/user-docs/blob/docs/protocol/page_under_construction.md)
* [ContestGovernor Documentation](https://github.com/hicommonwealth/user-docs/blob/docs/protocol/page_under_construction.md)

For integration guidance and detailed API documentation, please visit [docs.common.xyz](https://docs.common.xyz).


---

# 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://docs.common.xyz/commonwealth/launch/community-coins.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.
