# PlusPool Factory

This contract creates PlusPools and manages the state of each PlusPool.

## Address

* Cypress :[ ](https://scope.klaytn.com/account/0x05343b228d61402e84d973ce114f34bc3f9e5987?tabId=txList)[0x01431F2a0D8c25646d1995e9ad345581D523341D](https://scope.klaytn.com/account/0x01431F2a0D8c25646d1995e9ad345581D523341D?tabId=txList)

## Events, Read-Only Functions, and State-Changing Functions

{% tabs %}
{% tab title="Events" %}

## Events

**CreatePool**

```solidity
event CreatePool(address tokenA, address tokenB, address lpToken, uint borrowFactor, uint liquidationFactor, bool borrowableA, bool borrowableB, address poolAddress, uint exid);
```

* Event to create new PlusPool
* Parameters
  * `tokenA` : A token address in LP
  * `tokenB` : B token address in LP
  * `lpToken` : address in LP
  * `borrowFactor` : Utilization cost interest rate of utilized assets
  * `liquidationFactor` : automatic return factor
  * `borrowableA` : Whether tokenA can be borrowable
  * `borrowableB` : Whether tokenB can be borrowable
  * `poolAddress` : PlusPool contract address of this pool
  * `exid` : PlusPool id

**SetDepositActive**

```solidity
event SetDepositActive(address plusPoolAddress, bool b);
```

* Event that occurs when PlusPool deposit availability is changed

**SetWithdrawActive**

```solidity
event SetWithdrawActive(address plusPoolAddress, bool b);
```

* Event that occurs when PlusPool withdrawal availability is changed
  {% endtab %}

{% tab title="Read-Only Functions" %}

#### getPoolCount

* Number of PlusPools

**getPoolAddressByIndex**

```solidity
function getPoolAddressByIndex(uint idx) public view returns (address) 
```

* get PlusPool address by index number
  {% endtab %}
  {% endtabs %}


---

# 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/developers/contract/pluspool-factory.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.
