Skip to content

Latest commit

 

History

History
141 lines (83 loc) · 8.04 KB

bep8-token-protocol.md

File metadata and controls

141 lines (83 loc) · 8.04 KB

BEP8 Token Protocol

Introduction

Currently, the cost to get a BEP2 token listed on Binance DEX is about 1500BNB, which is a big barrier to many small, promising projects. As explained in BEP8,the idea of BEP8 Tokens is raised to accommodate the small or micro projects, intellectual properties, and other small token economies to build a more comprehensive venue for token trading.

Based on the limitation usage of the network, the cost of issuing and listing of such BEP8 tokens are minimized to a different magnitude. Besides, any BEP8 token issuer can choose to directly list against BNB and BUSD without the voting process of validators. Stablecoin pairs of BEP8 will provide a UX advantage and make any two BEP82 tokens exchangeable.

Similar to SME board in the traditional stock markets, BEP8 tokens markets will increase the liquidity of utility tokens of startups or Intellectual Property (IP) tokens by removing the capital requirements for listing. One good example is the open-source license model. A software developer can issue a BEP8 token and link his work to it. This token will be used to cover licensing fees for his work in the future.

Token Management

Issue

Issue is a transaction used to create a new asset. Anyone can issue a new token with fee paid. After issuing, the token would appear in the issuer's account as free balance.

An issuance transaction contains:

  • Symbol: The length of the string for representing this asset is between 3 and 8 alphanumeric characters and is case insensitive. The symbol will have a suffix autogenerated by the algorithm: the first 3 bytes of the issue transaction hash, plus letter “M”.
  • TokenURI: Optional field. A distinct Uniform Resource Identifier (URI) for the token. The URI may point to a JSON file that conforms to the "Mini-BEP2 Metadata JSON Schema". The schema is also optional.
  • TokenType: 1 for tiny token and 2 for Mini token. Total supply range of tiny token is [1-10K] and mini-token is [1, 1 milllion]. Mini-token will charge more than tiny-token for issue.
  • TotalSupply: The total supply for this token can have a maximum of 8 digits of decimal and is boosted by 1e8 in order to store as int64. The amount before boosting should not exceed upper bound of supply range.
  • Owner: The initial issuer of this token, the BNB balance of issuer should be more than the fee for issuing tokens
  • Mintable: Whether this token could be minted(increased) after the initial issuing, --mintable means the token can be inflationary.

Commands

Example on mainnet:

./bnbcli token issue-tiny --home $home -s $symbol --token-name $token_name -n 10000 --mintable --from $from --token-uri http://www.example.com --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443 --trust-node
./bnbcli token issue-mini --home $home -s $symbol --token-name $token_name -n 1000000 --mintable --from $from --token-uri http://www.example.com --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443 --trust-node

Transfer

BEP8 Transfer type is the same as BEP2. The difference from BEP2 transfer is that the Mini-BEP2 transfer amount should be larger than or equal to 1, unless the sender sends the total amount of the free Mini-BEP2 token in his account.

Commands

Example on mainnet:

./bnbcli send --from $from-key-alias --to to-address --amount 200000000:mini-token-symbol --chain-id Binance-Chain-Tigris --node  https://dataseed5.defibit.io:443 --json

Freeze

The transaction type, message structure and transaction process are the same as BEP2, except that the amount should be larger than or equal to 1, or equal to the free account balance.

Commands

Example on mainnet:

./bnbcli token freeze --amount 200000000 --symbol $mini-token-symbol --from alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443 --trust-node

Unfreeze

The transaction type, message structure and transaction process are the same as BEP2 Tokens, except that the amount should be larger than or equal to 1, or equal to the frozen account balance.

Commands

Example on mainnet:

./bnbcli token unfreeze --amount 200000000 --symbol $mini-token-symbol --from alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443  --trust-node

Mint

The transaction type, message structure and transaction process are the same as BEP2 Tokens, except that the amount should be larger than or equal to 1.

Commands

Example on mainnet:

./bnbcli token mint --amount 10000000000 --symbol $mini-token-symbol --from alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443  --trust-node

Burn

The transaction type, message structure and transaction process are the same as BEP2 Tokens. The difference from BEP2 burn is that the Mini-BEP2 burn amount should be larger than or equal to 1, or equal to the free account balance.

Commands

Example on mainnet:

./bnbcli token burn --amount 100000000000 --symbol $mini-token-symbol --from alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443  --trust-node

Set Token URI

The SetURI transaction is to change the value of TokenURI. Only token issuer can send this transaction. The URI may point to a JSON file that conforms to the "Mini-BEP2 Metadata JSON Schema".

{  "name": "Mini Token Metadata",  "description": "Metadata description for the Mini Token",  "external_url": "https://example.com/token",  "image": "https://example.com/token/1.png",  "attributes": [    {      "name": "custom field",      "value": "custom value"    },    ...  ]}

Commands

Example on mainnet:

./bnbcli token set-uri-mini --symbol $mini-token-symbol --token-uri http://www.efg.com --from alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443  --trust-node

List BEP8 Tokens on Binance DEX

The listing process is different from BEP2 token list. BEP8 token issuer can list the Mini-BEP2 token without the agreement of Binance Chain validators. The BEP8 token can only be listed against BNB or BUSD and they cannot be listed as a quote symbol.

The following parameters are required for the transaction:

Commands

./bnbcli dex list-mini -s=$mini-token-symbol --quote-asset-symbol=BNB --init-price=1000000000 --from=alice --chain-id Binance-Chain-Tigris   --node  https://dataseed5.defibit.io:443  --trust-node

BEP8 Token Trading Pair Matching

The number of BEP8 trading pairs could be much bigger than BEP2 pairs due to the cheap issue/listing fee. As they are designed to use limited network resource, Binance DEX match engine will only allocate a fixed resource on matching the BEP8 pairs. Unlike BEP2 token, BEP8 trading pairs are not matched every block, but they are guaranteed to be matched at least once in every 16 blocks.

Place Order

The minimum amount of the Mini-BEP2 token should be larger than or equal to 1, which is presented as 1e8 with the 8 digit decimal rule internally. The only exceptional case is that the user sells the total amount of the free BEP8 token in his account

Delist

Delist a trading pair of Mini-BEP2 token is the same as BEP2 delist. It needs the agreement of Binance Chain validators.

Fee Table for Testnet

API URL: https://testnet-dex.binance.org/api/v1/fees?format=amino