# Airdrop 계획 진행

Airdrop Operator 권한을 획득한 Contract 는 생성 시 정한 유동성 풀과 토큰을 이용해 Airdrop을 시작할 수 있습니다.&#x20;

{% hint style="warning" %}

1. Amount 설정 시 사용되는 단위는 Decimal이 포함된 단위입니다.

   예) KLAY 10개 = 10 \* (10^18) = 10000000000000000000
2. KLAY를 Airdrop Token으로 설정 시 \
   zero address(`0x0000000000000000000000000000000000000000`)로 설정해야 합니다.
3. Airdrop 설정은 Contract 마다 1개의 LP, 1개의 Token 만 설정 가능하므로 다른 LP 혹은 다른 Token 설정 시 새로운 Airdrop Contract를 배포해야 합니다.&#x20;
   {% endhint %}

### Airdrop 수수료&#x20;

* Airdrop 생성에는 일정량의 KSP가 필요할 수 있습니다.&#x20;
* KSP 수수료가 있다면 생성 전 필요한 KSP를 Operator에 전송해야 합니다.

### Airdrop 생성

AirdropOperator Contract의 createDistribution 함수를 실행합니다.

* Valid Operator 권한 획득 후 진행해야 합니다.&#x20;
* 필요한 토큰의 수량과 수수료는 Contract에 Deposit이 아닌 Transfer 해두어야 합니다.&#x20;
* Request Parameters
  * totalAmount : Airdrop으로 분배할 총 Token 수량
  * blockAmount : 블럭마다 분배할 Token 수량
  * startBlock : Airdrop 시작 Block 번호

```
function createDistribution(
    uint totalAmount,
    uint blockAmount,
    uint startBlock,
) public
```

### Airdrop Token 충전

Airdrop 진행 중 Token 소진, 연장의 이슈가 있어 Token이 부족하다면 AirdropOperator Contract의  Deposit 함수로 토큰을 충전할 수 있습니다.

* 함수 실행 시 지갑에 입력한 amount 이상의 토큰을 Transfer 해두어 합니다.
* Operator 생성 시에 지정한 Token을 충전합니다.
* 물량 소진으로 재 충전 시, 충전 이후 Block 부터 적용됩니다.

```
function deposit(uint amount) public
```

### Airdrop 수정

* 블럭 당 분배되는 토큰의 양을 수정합니다
* Transaction이 실행된 다음 Block부터 적용됩니다.

```
function refixBlockAmount(uint blockAmount) public
```

### **Airdrop 토큰 출금**

* Airdrop 계획 진행 후 남아있는 토큰을 출금할 수 있습니다.
* Owner 계정으로 출금됩니다.

```
function withdraw(address tokenAddr) public
```


---

# 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/airdrop/airdrop.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.
