# Creating Tokens

To create a new token, call the `createToken()` function:

```solidity
function createToken(
    string memory name,           // Token name (e.g., "My Token")
    string memory symbol,         // Token symbol (e.g., "MTK")
    string memory image_uri,      // IPFS or HTTP URL for token image
    string memory description,    // Token description
    string memory website,        // Website URL (optional)
    string memory twitter,        // Twitter handle (optional)
    string memory telegram,       // Telegram link (optional)
    string memory discord,        // Discord link (optional)
    uint8 dexIndex               // Reserved; use 0
) external payable returns (address tokenAddress)
```

## Initial Buy Protection

Any HYPE sent with the `createToken` transaction will be automatically used to purchase tokens for the creator. This protects against snipers who try to buy tokens immediately after creation.

### How It Works

1. **Token Creation**: New token is deployed with virtual liquidity
2. **Automatic Purchase**: Any HYPE value sent with the transaction immediately buys tokens for the creator
3. **Fair Launch**: Ensures the creator gets first access to their own token

## Token Creation Process

1. **Token Deployment**: A new ERC20 token is created with your specified metadata
2. **Virtual Liquidity**: Initial bonding curve reserves are established
3. **Initial Purchase**: Any HYPE sent automatically purchases tokens for creator
4. **Ready to Trade**: Token becomes available for public trading

## Token Parameters

### Required Parameters

* **name**: Full name of your token (e.g., "Awesome Coin")
* **symbol**: Trading symbol, typically a few characters (e.g., "AWE")
* **image\_uri**: URL for token logo/image (IPFS recommended)
* **description**: Brief description of your token's purpose
* **dexIndex**: Use `0`

### Optional Parameters

* **website**: Project website URL
* **twitter**: Twitter handle or URL
* **telegram**: Telegram group/channel link
* **discord**: Discord server link

## Token Specifications

Every token created has these properties:

* **Total Supply**: 1,000,000,000 tokens (1B)
* **Decimals**: 6
* **Tokens for Sale**: 649,300,000 (64.93% of supply)
* **Virtual Liquidity**: 300 HYPE
* **Initial Price**: 0.0000003 HYPE per token
* **Price Discovery**: Your initial buy helps establish early price momentum
* **Community Signal**: Shows commitment to your own token

## Creator Restrictions

* **1-hour sell restriction**: Token creators cannot sell their tokens for 1 hour after creation
* This prevents immediate dumping and gives the community time to participate

## What Happens After Creation

1. **Immediate Trading**: Your token is instantly available for purchase
2. **Creator Position**: You own tokens from any initial HYPE sent
3. **Bonding Curve Active**: Price increases as tokens are bought
4. **Community Building**: Share your token to build interest

Your token is now live with your initial position secured, ready for the community to discover and trade!
