# KUB Application Protocol (KAP)

To better serve the network and provide a more customized solution to the ecosystem, a standard called the **KUB Application Protocol (KAP)** has been introduced. This standard is based on the [Ethereum Request for Comments (ERC)](https://ethereum.org/en/developers/docs/standards/) standard.

The most notable KAP standards with real-world applications are the KAP token standards: KAP-20, KAP-721, and KAP-1155. In summary, KAP tokens have a `adminTransfer` function that allows the token administrator to transfer tokens back from the attacker's address in case of a rug pull, fraud, or compromise. The `adminTransfer` function adds an extra layer of security to the KUB token system.&#x20;

Moreover, the KAP token standard also supports `internalTransfer` and `externalTransfer` functions to allow token transfers between internal addresses that have completed KYC for both the sender and the recipient. These functions are required if the developer wishes to integrate the [KUB Wallet](https://www.kubwallet.com/) into their project.

{% hint style="info" %}
The KUB network supports both KAP standard tokens and ERC standard tokens. Both standards are compatible with the KUB network.
{% endhint %}

## KAP-20

The KAP-20 token standard is a protocol used on the KUB network, which includes a `adminTransfer` function. This function is designed to automatically create transactions on behalf of token holders who have been victims of fraudulent transactions and have been deemed illegal by a court of law. The KAP-20 token developers can use the function at their discretion, and they also regulate the users who can use it.&#x20;

It is important to note that KUB has no control over user settings and access to the `adminTransfer` function, and it is solely operated by token developers. The KAP-20 token developers also have the right to disable the `adminTransfer` function. It is essential to keep in mind that the `adminTransfer` function does not apply to the KUB Coin in digital asset exchanges.

{% hint style="info" %}
If KUB holders transfer their KUB from a digital asset exchange to [KUB Wallet](https://www.kubwallet.com/), the transferred KUB will be wrapped into KKUB.
{% endhint %}

## KAP-721

On KUB, the standard for indicating ownership of non-fungible tokens (NFTs) is referred to as KAP-721. Compared to KAP-20, KAP-721 is a more complex standard that is distributed among different contracts and has many potential expansions. It provides a set of guidelines for creating unique tokens that represent digital assets. These tokens are non-fungible, meaning that they cannot be traded for each other due to their unique attributes. KAP-721 is significant because it simplifies the process of creating NFTs, which can be used for art, gaming, collectibles, and many other purposes.

## KAP-1155

KUB also uses a multi-token standard named KAP-1155. This standard allows for both fungible (KAP-20) and non-fungible (KAP-721) token representation in one smart contract. The KAP-1155 standard has many benefits, such as efficiency. It stores all token types within a single contract, which enables batch transfer of various token types in one transaction. Instead of deploying a new contract for each token type, a single KAP-1155 token contract can hold the whole system state, which reduces deployment costs and complexity.


---

# 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.kubchain.com/build-on-kub/kub-application-protocol-kap.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.
