Algorand - pNetwork Bridge Launch
pNetwork is the first decentralized bridge to launch on algorand- it supports wrapped USDC, BTC, and USDT
pNetwork
The pNetwork is the underlying architecture for pTokens, a cross-chain system enabling assets to move frictionlessly from one blockchain to another, and pNetwork Portals, powering cross-chain interoperability between smart contracts. Currently, pNetwork enables transparent interaction among major blockchain protocols, including Bitcoin, Ethereum, Binance Smart Chain, and Dogecoin. pNetwork is the progressively decentralized governance layer operating the pTokens bridges and pNetwork Portals. It is home to the pNetwork DAO and the ecosystem’s governance token PNT. ---> Source
Description of work
pNetwork is the first decentralized bridge to launch on algorand. it supports wrapped USDC, BTC, and USDT. In these Bounties we want to check the following
- Look at inflows and outflows by volume and number of transactions for each pUSDT , pBTC, and pUSDC by day
- Show the top 10 wallets that have bridge in each assets
Note
- We use the
[algorand]
schema,[application_call_transaction]
and[asset_transfer_transaction]
tables - pUSDT asset id is
748208047
and pUSDC asset id is748211185
for swap - USDT asset id is
312769
and USDC asset id is31566704
for withdraw - pBTC asset id is
744665252
for issue - pUSDT and pUSDC app id is
770102986
- pBTC and pUSDC app id is
770103640
1 ---> Inflows and Outflows by volume and number of transactions for each pUSDT , pBTC, and pUSDC
-
To do this we first find all
tx_id
for each pUSDT, pUSDC and pBTC transactions in[application_call_transaction]
table. So we have:- For pUSDT and pUSDC in
[application_call_transaction]
table we use the:when base64_decode_string(tx_message:txn:apaa[0]::string) = 'swap' then 'bridig in'
when base64_decode_string(tx_message:txn:apaa[0]::string) = 'withdraw' then 'bridge out'
app_id = 770102986
- For pUSDT and pUSDC in
-
For pBTC in
[application_call_transaction]
table we use the:base64_decode_string(tx_message:txn:apaa[0]::string) = 'issue' then 'bridig in'
app_id = 770103640
-
After finding all the
tx_ids
we join the result to the[asset_transfer_transaction table]
. -
For USDT and USDC, when the swap is done, the pUSDT and pUSDC tokens are transferred, then we use the following command:
asset_transferred in ('748208047','748211185')
-
For USDT and USDC when withdrawing is done, USDT and USDC tokens are transferred, we use the following command:
asset_transferred in ('31566704', '312769')
-
For BTC when the issue is done the pBTC token is transferred, then we use the following command:
asset_transferred in ('744665252')
-
Finally, we calculate the
sum(amount)
andcount(tx_id)
for each day and based on each asset and type (in or out) that is issue, withdrawn or swap
According to the results obtained, it is clear that
- The highest number of transactions is related to Jun 8
- The largest transaction volumes are related to Jun 20, Jun 21 and Jun 15
- Jun 8 has the highest number of transactions per issue for pBTC
- The maximum number of transactions and transaction volume is related to swap for pUSDC followed by swap for pUSDT
According to the results obtained, it is clear that
- The maximum number of transactions and is related to swap for pUSDC followed by issue for pBTC and swap for pUSDT
According to the results obtained, it is clear that
- We see inflows most days
- The maximum volume and number of transactions for outflows are related to Jun 20 and Jun 21
- All outflows transactions are for USDC and USDT
- The largest number and volume of transactions for outflows is related to pUSDC
According to the results obtained, it is clear that
- The maximum number of transactions and the volume of transactions for each of the assets is related to the address
LEHOHH76T2EDG4AY7HIZVDX7V6V7JSVMCT7VGE3HTK23BEDIILEWQP6SAU