# 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 %}
