Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfc(0041): rfc of Naming Convention for Nervos Cross-Chain Assets. #333

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ The maintainers of RFCs and the community will review the PR, and you should upd
| [26](rfcs/0026-anyone-can-pay) | [Anyone-Can-Pay Lock](rfcs/0026-anyone-can-pay/0026-anyone-can-pay.md) | Xuejie Xiao | Standards Track | Proposal
| [27](rfcs/0027-block-structure) | [CKB Block Structure](rfcs/0027-block-structure/0027-block-structure.md) | Ian Yang | Informational | Draft
| [37](rfcs/0037-ckb2021) | [CKB Consensus Change (Edition CKB2021)](rfcs/0037-ckb2021/0037-ckb2021.md) | Ian Yang | Informational | Draft
| [38](rfcs/0038-naming-convention-for-nervos-cross-chain-assets) | [Naming Convention for Nervos Cross-Chain Assets](rfcs/0038-naming-convention-for-nervos-cross-chain-assets/0038-naming-convention-for-nervos-cross-chain-assets.md) | Hanlei Liang | Informational | Draft

## License

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
Number: "0038"
Category: Informational
Status: Draft
Author: Hanlei Liang
Organization: Nervos Foundation
Created: 2022-04-22
---

# Naming Convention for Nervos Cross-Chain Assets

## Abstract

This document specifies the naming convention for corresponding shadow assets that cross from other public chains to Nervos through Force Bridge.

> **\*Shadow Assets**
>
> An asset crosses from one chain to another. This asset on the target chain is a **shadow asset** of the original asset.

## Motivation

Force Bridge allows for seamless transactions between Nervos and other public chains. However, some assets are duplicated across these public chains. In order to avoid asset name conflicts, it is important to adopt some naming conventions for the shadow assets on Nervos.

## Naming Convention

A shadow asset must contain the following three types of data: the original asset name, the source chain and the cross-chain bridge.

In this regard, the convention is as follows:

- Use the `<symbol>|<source>|<bridge>(optional)` format to uniformly represent cross-chain assets on Nervos L1/L2, including complete information, readable and easy to parse.
- `symbol` (the original asset name) : the asset name in its original public chain.
- `source` (the source chain): the name of the public chain where the assets are originally located.
- `bridge` (the cross-chain bridge): the bridge used by assets when they cross chains.
- Use `|` instead of `-` as the connector because `-` is already used by the LP symbol.
- If the cross-chain bridge is Force Bridge, `bridge` must be omitted.

[Example](https://explorer.nervos.org/sudt/0x797bfd0b7b883bc9dba43678e285999507c6d0b971a2740c76623f70636f4080)s:

- `USDC|eth` represents the USDC that crosses from Ethereum to Nervos via Force Bridge.
- `USDC|bsc` represents the USDC that crosses from Binance Smart Chain (BSC) to Nervos via Force Bridge.
- `USDC|eth|multichain` represents the USDC that crosses from Ethereum to Nervos via Multichain (Multichain is just an example).

## Specifications for Displays

Applications can use `symbol` directly or parse `symbol` for custom displays. It is up to each application to determine how to display shadow assets.

For the return value of the `name()` method of the Layer1 explorer ([Example](https://explorer.nervos.org/sudt/0x797bfd0b7b883bc9dba43678e285999507c6d0b971a2740c76623f70636f4080)) and the Layer2 ERC20 Proxy contract, the display format can be `Wrapped <symbol> (<bridge> from <source>)`. This display is verbose, but it is user-friendly.

Examples:

- `USDC|eth` : `Wrapped USDC (ForceBridge from Ethereum)`
- `USDC|bsc|multichain` : `Wrapped USDC (Multichain from BSC)`

## [Asset List](https://github.com/nervosnetwork/force-bridge/blob/main/configs/all-bridged-tokens.json)

### Ethereum

`<source>` : eth

[Asset List](https://github.com/nervosnetwork/force-bridge/blob/main/configs/all-bridged-tokens.json)

### Binance Smart Chain (BSC)

`<source>` : bsc

[Asset List](https://github.com/nervosnetwork/force-bridge/blob/main/configs/all-bridged-tokens.json)

### Nervos