# Panda Token

## PandaToken

ERC20-compliant token with bonding curve mechanics and permit functionality.

### Core Functions

#### Token Information

**`name`**

```solidity
function name() public view returns (string memory)
```

Returns the token name.

**`symbol`**

```solidity
function symbol() public view returns (string memory)
```

Returns the token symbol.

#### Token Operations

**`transfer`**

```solidity
function transfer(
    address to,
    uint256 amount
) public returns (bool)
```

Transfer tokens to a specified address.

**Parameters:**

* `to`: Recipient address
* `amount`: Amount of tokens to transfer

**Returns:**

* `true` if transfer successful

**Errors:**

* `PandaToken: INVALID_TRANSFER` - When transferring to DEX pair before graduation

**`approve`**

```solidity
function approve(
    address spender,
    uint256 amount
) public returns (bool)
```

Approve address to spend tokens.

**Parameters:**

* `spender`: Address to approve
* `amount`: Amount of tokens to approve

**Returns:**

* `true` if approval successful

**`permit`**

```solidity
function permit(
    address owner,
    address spender,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
) public
```

Approve spending using a signature (EIP-2612).

**Parameters:**

* `owner`: Token owner address
* `spender`: Spender address
* `value`: Amount to approve
* `deadline`: Timestamp after which permit is invalid
* `v`, `r`, `s`: Signature components

#### DEX Information

**`dexPair`**

```solidity
function dexPair() public view returns (address)
```

Returns the DEX pair address for this token.

**Returns:**

* Address of the token's DEX trading pair

#### State Information

**`graduated`**

```solidity
function graduated() public view returns (bool)
```

Returns whether the token has graduated to DEX trading.

**`getCurrentPrice`**

```solidity
function getCurrentPrice() public view returns (uint256)
```

Returns the current price from the bonding curve.

#### Trading Functions

Inherits all trading functions from PandaPool:

* `buyTokens`
* `buyTokensWithBera`
* `sellTokens`
* `sellTokensForBera`

See PandaPool documentation for detailed trading function specifications.

### Events

#### Standard ERC20 Events

```solidity
event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
)
```

```solidity
event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
)
```

#### Graduation Event

```solidity
event LiquidityMoved(
    uint256 amountPanda,
    uint256 amountBase
)
```

Emitted when the token graduates to DEX trading.


---

# 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://documentation.kodiak.finance/developers/panda/smart-contract-reference/panda-token.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.
