L2BEAT is tracking TVL of L2 projects, you can take a look at Value Locked Page. You can also see more detailed breakdown when you click on one of the projects, e.g. Arbitrum
As you can see there are three types of value - the type
:
CBV
- Canonically Bridged Value - locked in the L1 escrow contracts on EthereumEBV
- Externally Bridged Value - bridged from other chain via non-canonical bridgeNMV
- Natively Minted Value - minted natively on this chain
Each token can also have one of three methods of calculating its contribution to TVL - the formula
:
locked
- tracks the balance of the token in an escrow contracttotalSupply
- tracks the total supply of the tokencirculatingSupply
- tracks the circulating supply of the token
All this is achieved via proper configuration files in our repository.
-
Go to
config\src\tokens\tokens.jsonc
-
Add your token to the proper chain
Canonically bridged tokens (CBV) should always be added to Ethereum, since they use Ethereum as a main ledger and are bridged to the L2 through the canonical bridge.
- The required fields are
symbol
&address
. - Optional fields are:
type
,formula
,category
,bridgedUsing
&coingeckoId
. - By default, the
type
isCBV
, theformula
islocked
, and thecategory
isother
.
Externally bridged tokens (EBV) and natively minted tokens (NMV) should be added to the token list of a specific L2.
- If the chain is missing in the file, you have to add it, see the next section for details
- The required fields are
symbol
,address
,type
,formula
. The optional fields arecategory
,bridgedUsing
&coingeckoId
. - If the token is externally bridged, you have to add a
bridgedUsing
object, containing at least thebridge
= the bridge name. If we have it on our website, you can also add aslug
. - If the chain is not available when you run
yarn coingecko:platforms
, you need to also specify thecoingeckoId
.
- The required fields are
-
Save the file
-
Set environmental variables
<CHAIN>_RPC_URL
for the chains of the newly added tokens -
Run
yarn tokens
withinpackages/config
Never edit generated.json unless you know what you are doing.
-
Commit changes & open the PR
Go to the .ts file of the chain those are added to in config\src\layer2s
,
- Check if there is
chainConfig
defined withinexport const projectName: Layer2 = {}
- If not, it should be added with the following information:
name
of the chain - should be the same as defined in thetokens.jsonc
chainId
explorerUrl
explorerApi{}
, containingurl
andtype
multicallContracts[]
- could be empty if not deployedminTimestampForTvl
- the timestamp of the first/second block on the chaincoingeckoPlatform
- the name of the platform on Coingecko. Checkyarn coingecko:platforms
.