# PoolVoting

이 컨트랙트는 최대 투표 가능한 풀 수 (10개),  풀 전체의 투표 정보, 풀 투표 순위 등  KLAYswap의 유동성 풀 투표를 관리합니다. 풀 투표자에 대한 보상으로 풀 거래 수수료의 50%를 보유한 투표 지분에 따라 분배합니다.&#x20;

## Code

Github Link: (Will be updated after official launch)

## Address

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

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

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

## Events

**AddVoting**

```solidity
event AddVoting(address user, address exchange, uint amount);
```

* vKSP를 투표시 발생되는 이벤트
* amount는 정수 단위로 입력 가능&#x20;

**RemoveVoting**

```solidity
event RemoveVoting(address user, address exchange, uint amount);
```

* vKSP를 철회시 발생되는 이벤트
* amount는 투표 한도내에 정수 단위로 입력 가능

**GiveReward**

```solidity
event GiveReward(address user, address exchange, address token, uint amount, uint lastIndex, uint rewardSum);
```

* 투표자에게 거래 수수료 보상 지급 시 발생되는 이벤트

{% endtab %}

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

## Read-Only Functions

**isValidPool**

* KSP 보상 풀 여부

**MAX\_VOTING\_POOL\_COUNT**

* 분배 가능한 유동성 풀 수

**poolAmount**

* 유동성 풀 투표

**poolCount**

* 유동성 풀 개

**poolRanking**

* 투표 풀 순위

**prevPoolAmount**

* 다음 라운드 풀 투표 수

**prevValidPool**

* 다음 라운드 상위 풀 여부

**snapShotAmount**

* 풀 투표 수 스냅샷

**snapShotValidPool**

* 상위 풀 여부 스냅샷

**totalVotingAmount**

* 전체 투표 수

**userVotingPoolAddress**

* 투표자가 투표한 풀의 주소

**userVotingPoolAmount**

* 투표자가 투표한 풀의 투표권 수량

**userVotingPoolCount**

* 투표자가 투표의 풀의 개

**validPoolCount**

* 투표 가능한 풀의 개

{% endtab %}

{% tab title="State-Changing Functions" %}

## **State-Changing Functions**

**addVoting**

```solidity
function addVoting(address exchange, uint amount) public
```

* &#x20;투표 함수
* vKSP 정수 단위 허용

**removeVoting**

```solidity
function removeVoting(address exchange, uint amount) public
```

* 풀 투표 철회 함수&#x20;
* 투표 수량 범위내의 vKSP 정수 단위 허용

**claimReward**

```solidity
function claimReward(address exchange) public 
```

* 투표 풀의 거래 수수료 보상 청 함수

**claimRewardAll**

```solidity
function claimRewardAll() public
```

* 투표 풀 전체에 대한 거래 수수료 보상 청구 함수

**removeAllVoting**

```solidity
function removeAllVoting() public
```

* 투표 풀 전체에 대한 철회 함수
  {% endtab %}
  {% endtabs %}

&#x20;


---

# 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/kr/developer/contract/poolvoting.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.
