Canonical Guide to Analyzing Axelar Using Flipside Data
Axelar Network's Interchain Token Service (ITS)
The Interchain Token Service (ITS) is a key component of the Axelar Network, a decentralized interoperability protocol that enables seamless communication and asset transfer between different blockchains.
Features of ITS:
- Generic: Supports bridging any token or asset without requiring specific integrations.
- Fast: Bridges assets within minutes, significantly faster than traditional bridging solutions.
- Secure: Uses a distributed network of validators to secure bridges and messages.
- Reliable: Transactions are guaranteed to complete or be reversed, providing high reliability.
- Interoperable: Connects different blockchains and enables interoperability across diverse ecosystems.
Using Axelar Network's Inter-Chain Token Service (ITS), you can deploy a token on a blockchain quickly and inexpensively with just a few clicks. Once deployed, you can easily register that token on multiple other chains. Users can also transfer these tokens between different chains using ITS, which is significantly simpler than traditional bridges. Additionally, many tokens deployed outside of this service can now be registered on other chains using ITS and subsequently transferred between chains using this service. Therefore, in this section, we aim to extract data related to token deployments and interchain transfers. To determine the number of transactions for these two categories within the desired daily time frame and specific time interval, we should use the axelar.axelscan.fact_gmp
table with the following query:
However, it is also crucial for analysts to obtain the number of interchain transfers categorized by the source and destination chains, as well as the number of users utilizing ITS. Additionally, following query calculates the number of ITS tokens transferred between different chains within both a daily time frame and an arbitrary time frame.
To find data related to the interchain transfers of a specific token, we can use the following query. If the token is deployed using ITS, it will have a contract address, which can be directly placed in the data:executed:receipt:logs[1]:address
field. However, If a token has been deployed in the past and is now registered on other chains only using ITS, it will have multiple contract addresses, all of which need to be included.
In the following query, we have focused on transfers of the KLIMA token. For example, since the KLIMA token was deployed on the Polygon chain in the past and is now registered on the Base chain using ITS, it has two addresses, both of which are specified in the data:executed:receipt:logs[1]:address
section. This query also uses the crosschain.price.ez_hourly_token_prices
table to calculate the transfer volume in USD.
By pasting the address of your desired ITS token into query, you can retrieve all data related to its interchain transfers supported by Axelar.
⚠It should be noted that the KLIMA token contract was used here only as an example. You can replace it with the address of any other token.
select
date_trunc('day', created_at) as date,
count(distinct id) as txs_count,
case
when amount is null then 'Token Deployment'
else 'Interchain Transfers'
end as its_type
from axelar.axelscan.fact_gmp
where
call ilike '%0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C%'
-- ITS Contract
and created_at :: date>= current_date - {{Time_Interval}}
group by date, its_type
order by date
select
date_trunc('day',created_at) as date,
count(distinct id) as txs_count,
count(distinct call:transaction:from) as users_count,
count(distinct data:executed:receipt:logs[1]:address) as tokens_count,
call:chain as source_chain,
call:returnValues:destinationChain as destination_chain
from axelar.axelscan.fact_gmp
where call ilike '%0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C%'
-- ITS Contract
and created_at::date>=current_date-{{Time_Interval}}
group by date, source_chain, destination_chain
order by date
with ITS as
(select
date_trunc('hour',created_at) as date,
amount,
call:chain as source_chain,
call:returnValues:destinationChain as destination_chain,
call:transaction:from as user,
split_part(id,'_',0) as tx_id
from axelar.axelscan.fact_gmp
where call ilike '%0xb5fb4be02232b1bba4dc8f81dc24c26980de9e3c%' -- ITS Contract
and (data:executed:receipt:logs[1]:address=lower('0x4e78011Ce80ee02d2c3e649Fb657E45898257815')
or data:executed:receipt:logs[1]:address=lower('0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2'))),
PRICE as
(select
hour as date,
avg(price) as avg_price
from crosschain.price.ez_hourly_token_prices
where token_address=lower('0x4e78011Ce80ee02d2c3e649Fb657E45898257815')
group by date
order by date)
select ITS.date as date,
amount,
amount*avg_price as amount_usd,
source_chain,
destination_chain,
user,
tx_id
FROM ITS LEFT JOIN PRICE
ON ITS.date=PRICE.date
where ITS.date>= current_date - {{Time_Interval}}
order by date