# Core Concept

<br>

<figure><img src="https://2618380029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlEjyveZVVY0NXibsLATk%2Fuploads%2F7jfawul4wchlTt2upoVc%2Fimage.png?alt=media&#x26;token=e2323000-8ce1-48c4-95fe-b44b4bee3e2e" alt=""><figcaption></figcaption></figure>

## 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 )
