# Core Concept

<br>

![KLAYswap Smart Contract Structure](/files/-ML2woMr_grECGMZAxby)

## Smart Contract Structure

#### Types of contract:&#x20;

* Factory Smart Contract
* Exchange Smart Contract
* FactoryView Smart Contract
* Governance Smart Contract

These contracts will be explained with detail later in the contract section of this book.&#x20;

## Swap Request

#### Positive Swap request

* Request swap with input token amount

#### Negative Swap

* Request swap with output token amount

#### Routing Swap

* Swap through multiple pool exchanges.

## About Mining

#### mined

* Total mined KSP amount

#### miningIndex

* Mining reward Index for each liquidity pool.

#### mining rate

* Mining rate for each pool. (1\~100, total sum of pools mining rate will be 100)&#x20;

#### Calculating Claimable amount

* ( Current market index - last user index ) \* ( user LP token amount )


---

# 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.klayswap.com/core-concept.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.
