Skip to content

Commit 0d33eae

Browse files
committed
init
1 parent e7ac90a commit 0d33eae

21 files changed

+387
-0
lines changed

.prettierrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"semi": false,
5+
"bracketSameLine": false,
6+
"printWidth": 120,
7+
"tabWidth": 1,
8+
"useTabs": true,
9+
"arrowParens": "avoid",
10+
"endOfLine": "auto",
11+
"overrides": [
12+
{
13+
"files": "*.json",
14+
"options": {
15+
"printWidth": 120
16+
}
17+
}
18+
]
19+
}
20+

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a [Vocs](https://vocs.dev) project bootstrapped with the Vocs CLI.

bun.lockb

306 KB
Binary file not shown.

docs/footer.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function Footer() {
2+
return (
3+
<div>
4+
<div>Released under the MIT License.</div>
5+
<div>Concero GMBH, Zug, Switzerland.</div>
6+
</div>
7+
)
8+
}

docs/pages/cross-chain-infrastructure/api.mdx

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Concero CCIP
2+
## Overview
3+
4+
The user-facing cross-chain infrastructure of Concero can be split into three parts:
5+
6+
#### Single-chain Execution Layer
7+
Responsible for executing single-chain transactions on both the source and destination chains. Performs swaps on Decentralised Exchanges and obtains bridgeable tokens in cases of cross-chain transactions.
8+
9+
#### Cross-chain Execution Layer
10+
Fast-tracks the cross-chain asset migration by utilising liquidity in the Cross-Chain Pool Infrastructure. Releases the transaction on the destination chain, while its settlement is in progress.
11+
12+
#### Settlement layer
13+
Performs value transfer across two chains. Settles the transaction within 30 minutes by repaying the optimistic loan taken by the execution layer.
14+
15+
### Schematic overview
16+
17+
![Logo](/ccip.png)
18+
19+
# Single-chain token swaps
20+
21+
## Off-chain pathfinding
22+
23+
Off-chain Pathfinding algorithm computes the most optimal transaction route, passes it to frontend, which generates call data for the user's wallet to execute in the `swap()` or `swapAndBridge()` functions of `Orchestrator.sol`
24+
25+
## Orchestrator contract
26+
27+
Orchestrator manages the entire transaction on its chain. It determines whether a token needs to be swapped via `DexSwap`, bridged via `ConceroBridge` or both. It accepts user tokens in `swap()`, `bridge()` or `swapAndBridge()`.
28+
29+
## DexSwap contract
30+
31+
Only takes calls from the `Orchestrator` contract which contain an array of swaps that are required to be performed on the current chain. Executes each swap one-by-one on multiple dexes, in order to obtain a destination token.
32+
33+
# Bridging & Settlement
34+
35+
## Chainlink Functions
36+
37+
Serve the purpose of fast-tracking transactions while CCIP is performing the 24-minute bridging.
38+
39+
### SRC Functions
40+
41+
Calls `addUnconfirmedTX()` function on the DST chain to indicate that a transaction has entered CCIP on the source chain. Uses a private key in DON-Hosted secrets in order to call the function via an allow-listed messenger wallet. The DST contract, which receives such call immediately begins the confirmation process by running an additional set of Chainlink Functions on the destination chain.
42+
43+
### DST Functions
44+
45+
The purpose of Destination chain ChainlinkFunctions is to confirm whether the transaction has indeed been submitted to the source chain and has successfully entered CCIP. Using Alchemy, Infura and other RPC providers inside the JS code, it performs an RPC call to read a specific event, which confirms that the transaction is being sent through CCIP.
46+
47+
Additionally, DST functions are responsible for awaiting a certain amount of block confirmations before submitting a successful callback to the DST contract. The minimum of block confirmations depends on the risk factor of each transaction that enters the bridging infrastructure. This itself is a combination of weighted factors such as the amount of transactions, transaction history of the wallet, and any other anomalies that the transaction might have.
48+
49+
## Chainlink CCIP
50+
51+
Chainlink CCIP is chosen as a reliable and secure settlement layer due to its complex multi-layered architecture. As soon as funds enter CCIP on the SRC chain, a corresponding event is emitted and Chainlink Functions begin the acceleration process. When the funds have been taken from the liquidity pool in a form of a 24-minute loan, CCIP rebalances that pool by completing the transaction.
52+
53+
## Liquidity pools
54+
55+
Liquidity pools are a crucial part of Concero's fast-track solution, as they hold the liquidity necessary to be taken as a loan while CCIP is in process of bridging the assets. As soon as the transaction is confirmed by Chainlink Functions on the DST chain, the Orchestrator contract obtains a loan from the Liquidity pool and proceeds to execute all necessary actions, such as destination chain swaps. This is in order to send the destination asset to the user's wallet.
56+
57+
## Orchestrator contract
58+
59+
The Orchestrator contract serves as an operations manager for the entire on-chain system. It's isolating the environment from malicious actors, by exclusively operating each contract in a predetermined order, such that there is no possibility for the end user or any external entity to directly interact with internal contracts of our infrastructure. The Orchestrator provides a single external point of entry for the end user to facilitate cross-chain transactions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Cross-chain Infrastructure Deployments
2+
3+
The Concero Cross-Chain Infrastructure is deployed on the following networks:
4+
5+
- Arbitrum: [0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323](https://arbiscan.io/address/0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323)
6+
- Polygon: [0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323](https://polygonscan.com/address/0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323)
7+
- Avalanche: [0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323](https://cchain.explorer.avax.network/address/0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323)
8+
- Base: [0x164c20A4E11cBE0d8B5e23F5EE35675890BE280d](https://etherscan.io/address/0x164c20A4E11cBE0d8B5e23F5EE35675890BE280d)

docs/pages/cross-chain-infrastructure/messaging.mdx

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Cross-Chain Infrastructure Overview
2+
3+
The user-facing cross-chain infrastructure of Concero can be split into three parts:
4+
5+
#### Single-chain Execution Layer
6+
Responsible for executing single-chain transactions on both the source and destination chains. Performs swaps on Decentralised Exchanges and obtains bridgeable tokens in cases of cross-chain transactions.
7+
8+
#### Cross-chain Execution Layer
9+
Fast-tracks the cross-chain asset migration by utilising liquidity in the Cross-Chain Pool Infrastructure. Releases the transaction on the destination chain, while its settlement is in progress.
10+
11+
#### Settlement layer
12+
Performs value transfer across two chains. Settles the transaction within 30 minutes by repaying the optimistic loan taken by the execution layer.
13+
14+
### Schematic overview
15+
![Cross-Chain Infrastructure Overview diagram](/cross-chain-infrastructure-overview.jpg)

docs/pages/cross-chain-infrastructure/routing.mdx

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Off-chain Routing
2+
3+
Off-chain Routing algorithm computes the most optimal transaction routes. It can be called via the JS SDK, which is the recommended way of interacting with Concero API. The Routing data is then used by the SDK to compute call data for the user's wallet to execute.
4+
5+
## Orchestrator contract
6+
7+
The Orchestrator contract serves as an entrypoint for users or protocols to interact with Concero cross-chain infrastructure.
8+
It is responsible for managing the entire transaction on a single chain, allowing a user to perform multiple actions with a single function call.
9+
10+
The actions include:
11+
1. Swaps on decentralised exchanges (single or multiple)
12+
2. Obtaining bridgeable tokens before bridging
13+
3. Interactions with other protocols (coming soon)
14+
15+
The Orchestrator exposes the following interface for users and protocols to interact with the infrastructure:
16+
17+
#### Swap
18+
Suitable for single-hop and multi-hop swaps on a single chain.
19+
20+
[//]: # (todo: add supported DEXes)
21+
```solidity
22+
function swap(
23+
IDexSwap.SwapData[] calldata _swapData,
24+
address _receiver
25+
) external;
26+
```
27+
28+
#### Bridge
29+
Suitable for cross-chain bridging, where no swaps need to be performed on either of the chains.
30+
```solidity
31+
function bridge(
32+
IStorage.BridgeData memory bridgeData,
33+
IDexSwap.SwapData[] memory dstSwapData
34+
) external;
35+
```
36+
#### Swap and Bridge
37+
Suitable for cross-chain transactions, where both swaps and bridging are required.
38+
```solidity
39+
function swapAndBridge(
40+
IStorage.BridgeData memory bridgeData,
41+
IDexSwap.SwapData[] calldata srcSwapData,
42+
IDexSwap.SwapData[] memory dstSwapData
43+
) external;
44+
```
45+
46+
47+
## DexSwap contract
48+
49+
Only takes calls from the `Orchestrator` contract which contain an array of swaps that are required to be performed on the current chain. Executes each swap one-by-one on multiple dexes, in order to obtain a destination token.
50+
51+
## Bridging & Settlement
52+
53+
## Chainlink Functions
54+
55+
Serve the purpose of fast-tracking transactions while CCIP is performing the 24-minute bridging.
56+
57+
### SRC Functions
58+
59+
Calls `addUnconfirmedTX()` function on the DST chain to indicate that a transaction has entered CCIP on the source chain. Uses a private key in DON-Hosted secrets in order to call the function via an allow-listed messenger wallet. The DST contract, which receives such call immediately begins the confirmation process by running an additional set of Chainlink Functions on the destination chain.
60+
61+
### DST Functions
62+
63+
The purpose of Destination chain ChainlinkFunctions is to confirm whether the transaction has indeed been submitted to the source chain and has successfully entered CCIP. Using Alchemy, Infura and other RPC providers inside the JS code, it performs an RPC call to read a specific event, which confirms that the transaction is being sent through CCIP.
64+
65+
Additionally, DST functions are responsible for awaiting a certain amount of block confirmations before submitting a successful callback to the DST contract. The minimum of block confirmations depends on the risk factor of each transaction that enters the bridging infrastructure. This itself is a combination of weighted factors such as the amount of transactions, transaction history of the wallet, and any other anomalies that the transaction might have.
66+
67+
## Chainlink CCIP
68+
69+
Chainlink CCIP is chosen as a reliable and secure settlement layer due to its complex multi-layered architecture. As soon as funds enter CCIP on the SRC chain, a corresponding event is emitted and Chainlink Functions begin the acceleration process. When the funds have been taken from the liquidity pool in a form of a 24-minute loan, CCIP rebalances that pool by completing the transaction.
70+
71+
## Liquidity pools
72+
73+
Liquidity pools are a crucial part of Concero's fast-track solution, as they hold the liquidity necessary to be taken as a loan while CCIP is in process of bridging the assets. As soon as the transaction is confirmed by Chainlink Functions on the DST chain, the Orchestrator contract obtains a loan from the Liquidity pool and proceeds to execute all necessary actions, such as destination chain swaps. This is in order to send the destination asset to the user's wallet.
74+
75+
## Orchestrator contract
76+
77+
The Orchestrator contract serves as an operations manager for the entire on-chain system. It's isolating the environment from malicious actors, by exclusively operating each contract in a predetermined order, such that there is no possibility for the end user or any external entity to directly interact with internal contracts of our infrastructure. The Orchestrator provides a single external point of entry for the end user to facilitate cross-chain transactions.

docs/pages/getting-started.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Get started
2+
3+
Hello world!

docs/pages/index.mdx

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: landing
3+
---
4+
5+
import { HomePage } from 'vocs/components'
6+
7+
<HomePage.Root>
8+
<HomePage.Logo />
9+
<HomePage.Tagline>Documentation of Concero Cross-Chain infrastructure & SDK.</HomePage.Tagline>
10+
11+
[//]: # (<HomePage.InstallPackage name="vocs" type="init" />)
12+
[//]: # ( <HomePage.Description>Documentation of Concero Cross-Chain infrastructure & SDK.</HomePage.Description>)
13+
<HomePage.Buttons>
14+
<HomePage.Button href="/getting-started" variant="accent">Get started</HomePage.Button>
15+
<HomePage.Button href="https://github.com/concero">GitHub</HomePage.Button>
16+
</HomePage.Buttons>
17+
</HomePage.Root>

docs/pages/what-is-concero.mdx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# What is Concero?
2+
3+
Concero is a fully decentralised abstracted cross-blockchain platform able to facilitate secure value and message transfers in under a minute.
4+
5+
Existing cross-chain solutions have to trade security for speed and vice-versa while Concero has been built to be secure and quick at the same time, while being fully decentralised.
6+
7+
Before designing Concero infrastructure, we have spent a lot of time building, iterating and collecting user feedback about different cross-chain aggregation MVPs. This has been done in order to understand the requirements and solve problems that the end users are facing. After thousands of survey results and usage data points we have boiled down user requirements for cross-chain transactions to three main attributes: Speed, Security and Ease of Use. After trying to look for infrastructure that is able to adhere to these attributes, we found that it does not exist, which laid the foundation behind Concero as the infrastructure.
8+
9+
We have also set ourselves a strict set of parameters when building this protocol. It had to be fully decentralised, economically feasible for all participants, and fully transparent. As the entire blockchain industry was built on the core principles of transparency, decentralisation and permissionless access, we believe that it is imperative for protocols to adhere to these principles and Concero does just that.

docs/public/ccip.png

253 KB
Loading
Loading

0 commit comments

Comments
 (0)