Skip to content

Commit d88c87e

Browse files
authored
Merge pull request #483 from centrifuge/develop
Merge fixes + new content to main
2 parents 1a3ac50 + 0ca58c6 commit d88c87e

43 files changed

Lines changed: 248 additions & 293 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/build/bridge/index.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ title: Centrifuge - Ethereum Bridge
66

77
## Bridge Contract & Accounts
88
### Token Supply
9-
The bridge supply can be audited by looking at the number of tokens stored in the bridge account: 4dpEcgqFor2TJw9uWSjx2JpjkNmTic2UjJAK1j9fRtcTUoRu as well as the ERC20 token supply.
9+
The bridge supply can be audited by comparing the number of tokens stored on the Centrifuge Chain bridge account with the ERC20 token supply of wCFG on Ethereum.
10+
11+
- Centrifuge Chain (CFG): `4dpEcgqFp8UL6eA3b7hhtdj7qftHRZE7g1uadHyuw1WSNSgH`
12+
- Ethereum (wCFG): `0xc221b7e65ffc80de234bbb6667abdd46593d34f0`
1013

1114
### Relayer Threshold
12-
You can submit an RPC call a to a full node and query `chainBridge.relayerThreshold`. This will give you the number of confirmations needed on the Centrifuge Chain to trigger a transfer.
15+
You can submit an RPC call to a full node and query `chainBridge.relayerThreshold`. This will give you the number of confirmations needed on the Centrifuge Chain to trigger a transfer.
1316

1417
On Ethereum, you can query the Chainbridge public method `_relayerThreshold()(uint8)`:
1518

@@ -42,11 +45,12 @@ Follow instructions here: https://github.com/paritytech/substrate/tree/master/bi
4245
Or run the docker image: https://hub.docker.com/r/parity/subkey
4346

4447
### Install Jq [Optional]
45-
In the bash snippet below we use `jq` to parse a JSON output. You can choose to omit that and paste the address manually.
48+
In the bash snippet below, we use `jq` to parse a JSON output. You can choose to omit that and paste the address manually.
4649
Otherwise, follow instructions here to install in your distribution: https://stedolan.github.io/jq/.
4750

4851
## Set environment variables
49-
**Please reach out to us on [Slack](https://centrifuge.io/slack) or [Telegram](https://t.me/centrifuge_chat) for contract addresses.**
52+
**Please submit a ticket on [Discord](https://discord.com/invite/yEzyUq5gxF) for contract addresses.**
53+
5054
```=bash
5155
export ETH_RPC_URL="YOUR_ETH_CLIENT_URL"
5256
export ETH_PRIVATE_KEY="YOUR_PRIVATE_KEY"
@@ -75,7 +79,7 @@ export ETH_GAS_PRICE=40000000000
7579

7680
## Substrate Native to ERC20 Ethereum
7781
In the substrate UI, select the `Extrinsics` tab and call `palletBridge.transferNative` with these parameters:
78-
- Amount: `1000000000000000000` 1 CFG
82+
- Amount: `1000000000000000000` (= 1 CFG)
7983
- Recipient: `YOUR_ETH_TARGET_ACCOUNT`
8084
- Dest Id: `0`
8185

-58.3 KB
Binary file not shown.

docs/build/cent-chain/index.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,17 @@ redirect_from:
77
- /build
88
- /build/
99
---
10+
## Centrifuge Chain
1011

11-
## Introduction
12+
Centrifuge Chain is our blockchain built with Rust and [Substrate](https://docs.substrate.io/), purpose built for real-world assets. Pools (and their assets, tranches, etc), [onchain governance](https://docs.centrifuge.io/use/governance-process/) and the Centrifuge treasury, and the CFG token live on Centrifuge Chain.
1213

13-
### The Centrifuge Stack
14-
15-
![Cent Stack](./images/cent-stack.png)
16-
17-
The Centrifuge stack consists of a peer-to-peer messaging protocol to store and exchange business documents in a private, secure way. As the next layer, we built Centrifuge Chain using Substrate to hold the unalterable, single source of truth of these documents for all parties. Using Centrifuge Chain and dApps built on top, businesses can tokenize documents and use this as collateral to access financing. Tinlake is our securitization protocol for these tokenized assets built on Centrifuge Chain to optimize risk allocation and connect Centrifuge to the DeFi ecosystem.
18-
19-
### Centrifuge Chain
20-
21-
[Centrifuge Chain](https://github.com/centrifuge/centrifuge-chain) is the gateway for real-world assets to the Blockchain Multiverse. We built Centrifuge Chain on [Parity Substrate](https://substrate.dev) with an initial bridge to Ethereum. This allows us to move faster and use a consistent approach for certain features.
22-
23-
Substrate allows us to easily tap into the [Polkadot](https://polkadot.network) ecosystem and to connect with other blockchains that support the standard, which in turn increases interoperability.
24-
25-
We envision a larger ecosystem of many, connected blockchains- where Dapps on Ethereum can use data from other chains, value can move freely, and Centrifuge Chain can [enable off-chain assets to access financing](https://medium.com/centrifuge/centrifuge-chain-the-gateway-for-real-world-assets-to-the-blockchain-multiverse-41dd5597ecf1) through DeFi.
14+
Investors can invest in assets on Centrifuge from other chains via Liquidity Pools deployed on supported chains. For example, a Liquidity Pool deployed on Ethereum allows users on Ethereum to invest in a pool on Centrifuge without leaving Ethereum.
2615

2716
#### Centrifuge Chain Efficiencies
28-
2917
Centrifuge Chain is optimized specifically for the transactions required by our specific use case. This focus allows us to improve upon our current architecture in a few key ways: speed, cost, storage efficiencies, and privacy.
3018

3119
Ethereum works well for low volumes of high value transactions. High volumes of privacy-requiring use-cases require a different solution. The average business user, SMBs and large enterprises alike, would be paying many times more using Centrifuge on Ethereum compared to their existing solutions. It wouldn’t be worth it for most businesses to make a switch. But what if we could lower that cost and have high throughput capabilities?
3220

33-
The transactions on the Centrifuge Chain are optimized for the small subset of operations needed by our specific use case. This allows for faster execution of logic and finality of transactions. The optimization of transactions, together with our PoS architecture, is also what brings down the transaction costs dramatically. Centrifuge Chain also implements a state rent model that requires users to pay for continuous availability of their data over long periods of time. This encourages decentralization because less resources are required to run a node. Building our own chain also allows us to improve upon the user and developer experience for Centrifuge. Our users require privacy, and this is something we can build for directly — targeting the features they need from the start. For developers, we can provide custom APIs and tools that come with the blockchain node itself instead of smart contract APIs which are harder to integrate with.
34-
35-
While there are downsides to building a single purpose chain, the advantages for our use case outweigh the costs. Integration with other Ethereum and DeFi projects becomes a bit more involved. Our experience with Ethereum development, combined with a standardized bridge to get data to/from our Parity Substrate based chain reduces the overhead substantially, while still benefiting from the upside of our own chain.
36-
37-
## Further Resources
38-
39-
### Substrate/Polkadot Resources
21+
The transactions on the Centrifuge Chain are optimized for the small subset of operations needed by our specific use case. This allows for faster execution of logic and finality of transactions. The optimization of transactions, together with our PoS architecture, is also what brings down the transaction costs dramatically. This encourages decentralization because less resources are required to run a node. Building our own chain also allows us to improve upon the user and developer experience for Centrifuge. Our users require privacy, and this is something we can build for directly — targeting the features they need from the start. For developers, we can provide custom APIs and tools that come with the blockchain node itself instead of smart contract APIs which are harder to integrate with.
4022

41-
- [Kusama Documentation](https://guide.kusama.network/docs/kusama-getting-started)
42-
- [W3F Guide](https://github.com/w3f/polkadot-secure-validator) on Production Grade Setups for Validators on Substrate chains
43-
- [Guides by Certus One](https://kb.certus.one/) (Cosmos Validator)
44-
- [Architecture Deep Dive by Chorus](https://gdoc.pub/doc/e/2PACX-1vQXb1kd0zqYT8K4B4XYb-lrlfRIuPDXsgiTjj94gDOjw3ezEUAtjvxR8yfbKJypmioKeGRrhkLCtZog)
45-
- [Polkadot Wiki](https://wiki.polkadot.network/docs/getting-started) (also covering Substrate relevant features)
23+
While there are downsides to building a single purpose chain, the advantages for our use case outweigh the costs. Integration with other Ethereum and DeFi projects becomes a bit more involved. Our experience with Ethereum development, combined with a standardized bridge to get data to/from our Parity Substrate based chain reduces the overhead substantially, while still benefiting from the upside of our own chain.
11.2 KB
Loading

docs/build/guides/index.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
id: guides
3+
order: 2
4+
title: Guides
5+
contributors: <NunoAlexandre:nuno@k-f.co>
6+
---
7+
8+
# Investing into a Liquidity Pool
9+
10+
This guide will teach you how to find the correct liquidity pool instance to invest in, how to invest and get the respective tranche tokens in return, and how the whole system flows behind the scenes.
11+
12+
## Deployed Contracts
13+
14+
Pick the contracts deployed on the network you want to invest from.
15+
You will need them on the `Step 2.` below.
16+
17+
- **Ethereum**
18+
- `PoolManager` - `0x78E9e622A57f70F1E0Ec652A4931E4e278e58142`
19+
- `Circle USDC` - `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`
20+
21+
## Steps
22+
23+
1. ERC20 Approval
24+
25+
The user should call the ERC20 approval on the investment currency (e.g. USDC on Ethereum) to allow the Liquidity Pools contract to manage those funds for them.
26+
27+
2. Pick the correct `LiquidityPool` instance
28+
29+
With the appropriate `PoolManager` contract instance, call the following:
30+
31+
**`PoolManager.getLiquidityPool(poolId, trancheId, currency)`**
32+
33+
**NOTES**:
34+
35+
- The `currency` param should be the `USDC` token address in the respective network.
36+
- The `LiquidityPool` offers an interface based on [EIP-7540](https://eips.ethereum.org/EIPS/eip-7540), an extension of [EIP-4626](https://eips.ethereum.org/EIPS/eip-4626)
37+
38+
3. Invest into a LiquidityPool
39+
40+
Now that you have the LiquidityPool instance at hand, you can invest into it by calling:
41+
42+
**`LiquidityPool.requestDeposit(uint256 amount, address receiver)`**
43+
44+
Once submitted, the `amount` is locked on the escrow contract.
45+
46+
Then, the pool issuer needs to fulfill this request.
47+
48+
Once that's done, yield starts to accrue immediately, and the user can claim their tranche tokens.
49+
50+
4. Claim the tranche tokens
51+
52+
Once the request from step 3 is fulfilled, the user can claim their tranche tokens equivalent to `y` by calling:
53+
54+
**`LiquidityPool.mint(uint256 y, address receiver)`**
55+
56+
**NOTE**: `y` needs to be ≤ `maxDeposit`. The user can find that amount by calling **`LiquidityPool.maxDeposit`**.
57+
58+
## Overview
59+
60+
Behind the scenes, this is what takes place on steps 2 and 3:
61+
62+
![Liquidity Pools - Investment Flow](./images/lp-investment-flow.png)

docs/build/nfts/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contributors: <Dennis Wellmann:dennis@centrifuge.io>
77

88
## Introduction
99

10-
User-mintable NFTs are a critical part of the Centrifuge ecosystem. Minting an NFT from a Centrifuge [Document](https://developer.centrifuge.io/docs/overview/protocol-architecture/) allows a user to [draw loans](https://centrifuge.io/technology/tinlake/) against the NFT asset, or simply provides a way to easily transact in privacy-preserving way with a document asset. This flow can be seen in the image below:
10+
User-mintable NFTs are a critical part of the Centrifuge ecosystem. Minting an NFT from a Centrifuge [Document](https://docs.centrifuge.io/build/p2p-node/#documents-within-the-protocol) allows a user to [draw loans](https://docs.centrifuge.io/getting-started/securitization/#on-chain-securitization) against the NFT asset, or simply provides a way to easily transact in privacy-preserving way with a document asset. This flow can be seen in the image below:
1111

1212
![Centrifuge architecture](./images/mint-flow.jpeg)
1313

@@ -39,7 +39,7 @@ proofs = new bytes32[][](5);
3939
...
4040
```
4141

42-
The verification method can be found in our optimised [Merkle Verifier](https://github.com/centrifuge/privacy-enabled-erc721/blob/develop/src/merkle.sol) contract.
42+
The verification method can be found in our optimised [Merkle Verifier](https://github.com/centrifuge/privacy-enabled-erc721) contract.
4343

4444
An example of an NFT with one proof which can be minted using methods from the precise-proofs library is as follows:
4545

docs/build/p2p-node/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more information, see the [Parity Substrate Project](https://substrate.dev/)
2323

2424
### Centrifuge is Beta Software
2525

26-
Centrifuge and all its components are Beta Software. There will be substantial changes in the future and backwards compatibility is not guaranteed. Please use with caution. See [Disclaimer](/centrifuge-node/further-reading/disclaimer/). Also, please read the details about the [protocol and implementation limitations](/cent-node/further-reading/protocol-limitations/).
26+
Centrifuge and all its components are Beta Software. There will be substantial changes in the future and backwards compatibility is not guaranteed. Please use with caution. See [Disclaimer](https://docs.centrifuge.io/build/p2p-node/#disclaimer). Also, please read the details about the [protocol and implementation limitations](https://docs.centrifuge.io/build/p2p-node/#protocol-limitations).
2727

2828
## Protocol Architecture
2929

0 commit comments

Comments
 (0)