Skip to content

Commit

Permalink
changes in nitro section, validator section
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsalgupta13 committed Jun 3, 2024
1 parent e774ff3 commit 355f018
Show file tree
Hide file tree
Showing 79 changed files with 532 additions and 1,930 deletions.
59 changes: 30 additions & 29 deletions docs/develop/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import {

# Introduction

The guides on this page will explain the process of developing on Router's CrossTalk and Voyager framework. The CrossTalk framework
The guides on this page will explain the process of developing via Router's CrossTalk and Nitro. The CrossTalk framework
leverages Router's infrastructure to allow contracts on one chain to send intructions to contracts deployed on some other chain. On the other hand,
Voyager is the native cross-chain asset-transfer bridge built using Router. It acts as the gateway to the liquidity managed by Router Protocol and allows
Nitro is the native cross-chain asset-transfer bridge built using Router. It acts as the gateway to the liquidity managed by Router Protocol and allows
projects to execute cross-chain transactions which involve both fund transfer and instruction transfer.

If you're new here or you're not sure if CrossTalk is compatible with your requirements, check out [this guide](../overview/choosing-the-right-framework) to figure out
Expand Down Expand Up @@ -113,50 +113,51 @@ the best cross-chain framework for your dApp.

<Section>
<Card
title="EVM Guide"
title="EVM"
description="Understanding the crosstalk functions for EVM contracts"
to="/develop/message-transfer-via-crosstalk/evm-guides/iDapp-functions"
icon={<EthereumIcon />}
/>
<Card
title="NEAR Guide"
title="NEAR"
description="Understanding the crosstalk functions for Near chain"
to="/develop/message-transfer-via-crosstalk/near-guides/iDapp-functions"
icon={<NearIcon />}
/>
<Card
title="Router Chain Guide"
title="Router Chain"
description="Understanding the crosstalk functions for Router chain"
to="/develop/message-transfer-via-crosstalk/router-chain-guides/iDapp-functions"
icon={<RouterIcon />}
/>
</Section>
</Section>

## Asset Transfer
## Asset Transfer via Nitro

<Section title="Developers" id="web-sdks" hasSubSections >

<Section>
<Card
title="Overview"
description="What is Voyager and why is it required?"
to="/develop/asset-transfer"
description="What is Nitro and how is it different from Voyager?"
to="/develop/asset-transfer-via-nitro"
icon={<IDEIcon />}
/>
<Card
<Card
title="Router Nitro"
description="Understanding the architecture of Nitro"
to="/develop/asset-transfer-via-nitro/high-level-workflow"
icon={<ModulesIcon />}
/>
{/*
<Card
title="Voyager"
description="Dissecting different functions and parameters associated with Voyager (1st Gen Asset Transfer Bridge)"
to="/develop/asset-transfer/voyager/architecture"
to="/develop/asset-transfer-via-nitro/voyager/architecture"
icon={<AssetIcon />}
/>
<Card
title="Nitro"
description="Understanding the architecture of Nitro (2nd Gen Asset Transfer Bridge)"
to="/develop/asset-transfer/nitro/high-level-workflow"
icon={<ModulesIcon />}
/>
{/* <Card
<Card
title="Different Use-cases"
description="Learning how to build different types of applications by using features enabled by Voyager"
to="/develop/voyager/voyager/different-use-cases"
Expand All @@ -177,19 +178,19 @@ the best cross-chain framework for your dApp.
<Card
title="Nitro Widget"
description="Widget to integrate cross-chain swaps on your website"
to="/develop/asset-transfer/nitro/tools/nitro-widget"
to="/develop/asset-transfer-via-nitro/tools/nitro-widget"
icon={<Guide />}
/>
<Card
title="Nitro PathFinder API"
description="An API to integrate Voyager's cross-chain swap functionality"
to="/develop/asset-transfer/nitro/tools/nitro-pathfinder-api/performing-cross-chain-transaction"
to="/develop/asset-transfer-via-nitro/tools/nitro-pathfinder-api/performing-cross-chain-transaction"
icon={<Guide />}
/>
<Card
title="Migrating from Voyager to Nitro"
description="Guide to help users migrate from Voyager to Nitro"
to="/develop/asset-transfer/nitro/migrating-from-voyager-to-nitro"
to="/develop/asset-transfer-via-nitro/migrating-from-voyager-to-nitro"
icon={<Guide />}
/>
</Section>
Expand All @@ -198,16 +199,16 @@ the best cross-chain framework for your dApp.
<Section title="Guides" id="guides" hasSubSections >

<Section>
<Card
title="Deploying a Cross-chain Staking Contract using Voyager"
description="Learn how to deploy your first cross-chain staking dApp using Voyager"
to="/develop/asset-transfer/voyager/guides/crosschain-staking"
icon={<Guide />}
/>
<Card
title="Deploying a Cross-chain Staking Contract using Nitro"
description="Learn how to deploy your first cross-chain staking dApp using Nitro"
to="/develop/asset-transfer/nitro/guides/crosschain-staking"
to="/develop/asset-transfer-via-nitro/guides/crosschain-staking"
icon={<Guide />}
/>
<Card
title="Building a Cross-chain Token using Router"
description="Learn how to deploy a cross-chain token using Router"
to="/develop/asset-transfer-via-nitro/managing-cross-chain-tokens/building-a-cross-chain-token-using-router"
icon={<Guide />}
/>
</Section>
Expand All @@ -219,15 +220,15 @@ the best cross-chain framework for your dApp.
<Section>
<Card
title="API endpoints"
description="Voyager Pathfinder API endpoints"
description="Nitro Pathfinder API endpoints"
to="/api/?v=PATHFINDER"
icon={<Tscodegen />}
svgFile="/icons/api.svg"
/>
<Card
title="Getting Started"
description="How to interact with Pathfinder API"
to="/develop/asset-transfer/nitro/tools/voyager-pathfinder-api/performing-cross-chain-transaction"
to="/develop/asset-transfer-via-nitro/tools/nitro-pathfinder-api/performing-cross-chain-transaction"
icon={<Tscodegen />}
svgFile="/icons/api.svg"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
sidebar_position: 2
sidebar_position: 1
description: Intro to Router's Asset Transfer Bridges
---

Expand All @@ -11,10 +11,10 @@ Without a robust mechanism that promotes dynamic liquidity migration across vari
## About Router's Asset Transfer Bridges
Both generation of Router's cross-chain swapping engines facilitate cross-chain asset transfers as well as sequenced cross-chain asset and instruction transfers.

### Voyager (1st Generation Asset Transfer Bridge)
Voyager uses lock/unlock and burn/mint mechanism to transfer funds from one chain to another. Before funds are unlocked/minted to a user's wallet on the destination chain, a set of nodes attest the validity of the user's source chain deposit. For example, if a user wants to transfer ROUTE from Avalanche to Arbitrum, Voyager would burn user's ROUTE on Arbitrum and mint an equivalent amount of ROUTE on Arbitrum.
### Voyager (1st Generation Bridge)
Voyager (now decommissioned) used lock/unlock and burn/mint mechanism to transfer funds from one chain to another. Before funds are unlocked/minted to a user's wallet on the destination chain, a set of nodes attested the validity of the user's source chain deposit. For example, if a user wanted to transfer ROUTE from Avalanche to Arbitrum, Voyager would burn user's ROUTE on Arbitrum and mint an equivalent amount of ROUTE on Arbitrum.

### Nitro (2nd Generation Asset Transfer Bridge)
### Nitro (2nd Generation Bridge)
Nitro uses a trustless approach to handle cross-chain asset transfers. In this approach, an entity called the forwarder provides the user with the desired asset on the destination chain. Once the forwarder's settlement on the destination chain is verified, it can claim the funds deposited by the user on the source chain. This approach is highly optimized in terms of latency and cost involved (for smart contract operations).

As mentioned above, in addition to asset transfers, both these bridges also allow users to perform operations after the transfer of tokens is executed on the destination chain without any external triggers. This opens up a multitude of possibilities for the emerging chain-agnostic future.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"label": "Asset Transfer",
"label": "Asset Transfer via Nitro",
"position": 4,
"link": {
"type": "generated-index",
"description": "This section of the documentation will provide an in-depth view of Router's asset transfer bridges."
"description": "This section of the documentation will provide an in-depth view of Router Nitro."
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: AssetBridge Contract Addresses
sidebar_position: 7
---

## Mainet


| **Chain** | **Chain Id** | **AssetBridge Contract Address**
| ------------------- | ---------------------------------------------- | --------------------------- |
| Ethereum | 1 | `0xf9f4c3dc7ba8f56737a92d74fd67230c38af51f2` |
| Optimism | 10 | `0x21c1e74caadf990e237920d5515955a024031109` |
| Arthera | 10242 | `0x27902308573d4f21b4a98fa7121d04fa7e7bb20e` |
| Polygon zkEVM | 1101 | `0x958cae900315e85f6d00228c48e237822f9c22f8` |
| Polygon | 137 | `0xa62ec33abd6d7ebdf8ec98ce874820517ae71e4d` |
| Manta | 169 | `0xf3ad01cf8e4d3ef95f5d480ec534dd98caa0555f` |
| Boba ETH | 288 | `0x8c4acd74ff4385f3b7911432fa6787aa14406f8b` |
| Rootstock | 30 | `0x7bd616192fb2b364f9d29b2026165281a5f2ff2f` |
| zkSync | 324 | `0xca9e3756b9e20f9edb204523210af736839b07e9` |
| Mode | 34443 | `0xff13a7a12fd485bc9687ff88d8ae1a6b655ab469` |
| Arbitrum | 42161 | `0x0fa205c0446cd9eedcc7538c9e24bc55ad08207f` |
| Avalanche | 43114 | `0x8c4acd74ff4385f3b7911432fa6787aa14406f8b` |
| Mantle | 5000 | `0x97eec1c29f745dc7c267f90292aa663d997a601d` |
| Scroll | 534352 | `0x96cf38d1bf822f7ccd31f8a5dca1bdce968d7730` |
| BNB Chain | 56 | `0x21c1e74caadf990e237920d5515955a024031109` |
| Linea | 59144 | `0x01b4ce0d48ce91eb6bcaf5db33870c65d641b894` |
| Saakuru | 7225878 | `0x260687ebc6c55dadd578264260f9f6e968f7b2a5` |
| Tron | 728126428 | `0x02059ddcd0ed02e4eee4a050fddc200df4e8a37b` |
| Blast | 81457 | `0x67f6cf80f64b29d4a5c3b004b27d8057809e2820` |
| Base | 8453 | `0x21c1e74caadf990e237920d5515955a024031109` |
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ title: Different Functions
---

The Nitro contract has three user facing functions which we will discuss in detail in this section:
- [Transfer of USDC via Circle's Burn and Mint Flow](./different-functions/transfer-usdc-via-circle)
- [Transfer of Tokens via the Reverse Verification Mechanism](./different-functions/transfer-tokens-via-reverse-verification)
- [Transfer of Tokens with an Arbitrary Instruction](./different-functions/transfer-token-with-arbitrary-instruction)
- [Transfer of USDC via Circle's Burn and Mint Flow](./different-flows/transfer-usdc-via-circle)
- [Transfer of Tokens via the Reverse Verification Mechanism](./different-flows/transfer-tokens-via-reverse-verification)
- [Transfer of Tokens with an Arbitrary Instruction](./different-flows/transfer-token-with-arbitrary-instruction)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Different Flows",
"position": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The flow is just the same as that of the token transfer explained before. The on

| partnerId | Unique ID for each partner who integrates this functionality and has a fee sharing model with Router. This helps them to track and analyze their cross-chain transactions easily. |
| --------------- | -------------------------------------------------------------------------------------- |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens.md). |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens). |
| recipient | Wallet address that will receive the tokens on the destination chain. |
| srcToken | Address of the token that has to be transferred from the source chain. |
| amount | Decimal-adjusted amount of the token that has to be transferred from the source chain. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Voyager enables cross-chain transfers of multiple tokens via this function. When

| partnerId | Unique ID for each partner who integrates this functionality and has a fee sharing model with Router. This helps them to track and analyze their cross-chain transactions easily. |
| --------------- | -------------------------------------------------------------------------------------- |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens.md). |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens). |
| recipient | Wallet address that will receive the tokens on the destination chain. |
| srcToken | Address of the token that has to be transferred from the source chain. |
| amount | Decimal-adjusted amount of the token that has to be transferred from the source chain. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Transfer of USDC via Circle's Burn and Mint Flow
sidebar_position: 1
---
import RelayerAPIData from '../../../../../src/utils/RelayerFees'
import RelayerAPIData from '../../../../src/utils/RelayerFees'


```javascript
Expand All @@ -22,6 +22,6 @@ When a user wants to transfer USDC between the aforementioned chains, the `iDepo

| partnerId | Unique ID for each partner who integrates this functionality and has a fee sharing model with Router. This helps them to track and analyze their cross-chain transactions easily. |
| --------------- | -------------------------------------------------------------------------------------- |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens.md). |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens). |
| recipient | Wallet address that will receive the tokens on the destination chain. |
| amount | Decimal-adjusted amount of the USDC tokens that have to be transferred. |
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Fee Management
sidebar_position: 7
sidebar_position: 8
---

The total Nitro fee is composed of three parts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Guides",
"position": 8
"position": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ It is the `iStake` function that:
Let us understand the parameters of `iStake` function one by one:
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens.md). |
| destChainIdBytes | Network IDs of the chains in bytes32 format. These can be found [here](../supported-chains-tokens). |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount | Decimal-adjusted amount of the token that has to be transferred from the source chain. |
| destAmount | Amount of tokens (in source chain decimals) expected to be received by the recipient on the destination chain. This can be calculated using the Nitro's PathFinder API. A small script has been added in the scripts folder of the [github repository](https://github.com/router-protocol/sequencer-staking/tree/main/scripts) to calculate the destination amount. Refer to the [**Fee Management**](../fee-management.md) section for more details. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: High-level Workflow
sidebar_position: 1
sidebar_position: 2
---

## Reverse Verification Flow
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Managing Cross-chain Tokens",
"position": 4
}
Loading

0 comments on commit 355f018

Please sign in to comment.