Skip to content

Commit

Permalink
Merge pull request #5 from 0xSpaceShard/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Ioan Alexandru Oara authored Feb 20, 2024
2 parents 7dd6a71 + 9b408af commit ed8864d
Show file tree
Hide file tree
Showing 86 changed files with 4,028 additions and 698 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-docusaurus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
npm install
npm run build
- name: Setup CNAME
run: echo "${{ vars.CNAME }}" > build/CNAME

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
12 changes: 0 additions & 12 deletions blog/2019-05-28-first-blog-post.md

This file was deleted.

44 changes: 0 additions & 44 deletions blog/2019-05-29-long-blog-post.md

This file was deleted.

20 changes: 0 additions & 20 deletions blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
25 changes: 0 additions & 25 deletions blog/2021-08-26-welcome/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions blog/authors.yml

This file was deleted.

12 changes: 12 additions & 0 deletions docs/concepts/epoch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
id: epoch
title: Epoch
sidebar_position: 3
---

# Epoch

On Nimbora, keeping track of each processed batch is crucial. Since Starknet and Ethereum are asyncronous in their essence, we need a mechanism to syncronize the contracts state between both chains. To achieve that, each processed and closed batch send from L2 to L1 contains an epoch. This way we ensure that:

- Batches are processed in the correct order.
- No batch can be processed more than once.
31 changes: 31 additions & 0 deletions docs/concepts/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: overview
title: Overview
sidebar_position: 1
---

# Nimbora Overview

Nimbora is a platform that offers you the opportunity to interact with your favorite Layer 1 (L1) protocols at a fraction of the cost of Layer 2 (L2) solutions.

## L2 vs L1: Benefits of using Nimbora

The main benefit of using Nimbora is the decreases in gas fees, up to 7x compared with Ethereum mainnet. This significant reduction in gas fees is achieved through the utilization of innovative Layer 2 solutions. These solutions perform most transactions off-chain, only settling the final state on the Ethereum mainnet. This drastically reduces the number of transactions that need to be processed on the congested Ethereum network, thereby reducing overall gas fees. This makes transactions on Nimbora more affordable and accessible for all users, fostering a more inclusive DeFi ecosystem.

## What wallets can I connect with?

At the moment, Nimbora supports compatibility with [Argent X wallet](https://www.argent.xyz/argent-x/) and [Braavos wallet](https://braavos.app/). Argent X is a smart wallet designed to provide a simple and secure way to manage and invest digital assets. On the other hand, Braavos wallet is a decentralized wallet known for its user-friendly interface and high-level security features. The integration of these wallets with Nimbora allows users to conveniently interact with preferred Layer 1 protocols at a significantly reduced cost. Nimbora is committed to enhancing user experience and thus, plans to integrate more wallets in the near future.

## Transaction processing and batching

When the Nimbora [L2 Pooling Manager](/docs/contracts/architecture/L2_arch.md#pooling-manager) contract receives a requests, it opens a new batch and accumulates those requests until the batch is full. Once the batch is full, the contract will empack all the requests and send them to the [L1 Pooling Manager](/docs/contracts/architecture/L1_arch.md#pooling-manager) contract. This message will take some time to be verified on L1 depending on the network congestion, but it should not take more than 12h. Once the block is validated on L1, the message is ready to be consumed by the L1 Pooling Contract.

When consuming the message, the L1 Pooling Manager will get the assets to be handled from the Starkgate Bridge and deposit them within the strategies. Finally, the L1 Pooling Manager will generate a report to inform the L2 Pooling Manager that the deposits were made correctly.

## Where can I get help?

To report any issue, please click at "FEEDBACK" button directly on https://app.nimbora.io/ (see image below).

![feedback](/content/feedback.png)

If you have technical questions about this integration or Starknet in general, you can join [Nimbora Discord server](https://discord.gg/feJJnkmYzc).
22 changes: 22 additions & 0 deletions docs/concepts/reports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: reports
title: Reports
sidebar_position: 2
---

# Reports

The reports exist within both L1 and L2 Pooling Manager contracts and they are the means of communication between those two contracts.

## L1 Reports

From the L1 Pooling Manager perspective, reports represent messages received by the L1 Pooling Manager contract and it contains relevant data regarding the strategy status.
More specifically, contains the L1 strategy address, L1 net asset value (deposited asset's value), the amount to be deposited or withdrawn to/from the strategy and finally the status of the L1 strategy process.

With this information, the L1 Pooling Manager is able to communicate with the Starkgate bridge in order to fetch and bridge assets to and from L2. and it is also able to target the strategy it needs to interact with.

## L2 Reports

From the L2 Pooling Manager perspective, reports represent incoming messages from L1. This data is used to process and update L2 startegies (Token Manager and Token contracts) according to the new L1 strategy status. Once the data integrity is verified, it fetches bridge assets in order to, later, tansfers it to users and updates the strategy data.

This report is crucial for syncronizing L1 strategies data with the L2 contract state and it ensures only valid data is processed, all while contract's state remains consistent with L1.
67 changes: 67 additions & 0 deletions docs/concepts/strategies/01-statregy-lusd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
id: lusd
title: Borrow LUSD
sidebar_position: 2
---

# **Unlocking Quick LUSD Minting: A Step-by-Step Guide for Liquity Users**

![Group 145.png](/content/strategy_lusd/Group_145.png)

### LUSD Strategy

This strategy allows users to borrow LUSD, a stablecoin pegged to the U.S. dollar, using their collateral. The process begins by depositing collateral into the Nimbora platform. Once the collateral is deposited and locked, users can borrow against it according to the platform's loan-to-value ratio. This strategy is beneficial for users who want to leverage their assets without selling them. However, users must monitor their collateral value to avoid liquidation. If the value of the collateral falls below certain thresholds, the system may automatically liquidate the assets to repay the loan.

To get started, make sure you have a Starknet-compatible wallet, such as Argent X or Braavos. If you plan to bridge your assets to use as collateral, ensure you have an Ethereum-compatible wallet e.g. Metamask.

### How to interact

**Step 1: Visit Nimbora's Front End**
Visit Nimbora's front end at [https://www.nimbora.io/](https://www.nimbora.io/) to connect Starknet to Ethereum, reducing gas costs for your interactions with Ethereum.

![Cookies.png](/content/strategy_lusd/Cookies.png)

Feel free to explore the platform, but now let's head straight to the ‘Integrations’ page, and scroll down the integration list to find Liquity.

![Screenshot 2023-11-02 at 11.02.24.png](/content/strategy_lusd/Screenshot_2023-11-02_at_11.02.24.png)

Click on “ABOUT THIS COLLAB” and you will be directed to [https://www.nimbora.io/liquity](https://www.nimbora.io/liquity)

**Step 2: Explore Liquity Integration**
Before proceeding, we recommend reading the extensive FAQ section to understand what you're getting into.

![Screenshot 2023-11-02 at 11.05.56.png](/content/strategy_lusd/Screenshot_2023-11-02_at_11.05.56.png)

Once you're well-informed, it's time to connect your wallet.

**Step 3: Connect Your Wallet**
If your wallet isn't already connected, click "Connect Wallet" and select your preferred option. We've chosen Argent for this demonstration (see detailed steps in the video below)

**Step 4: Bridge Assets to Starknet**
Before borrowing, you may want to bridge some assets from Starknet to Ethereum. We recommend using [Starkgate](https://starkgate.starknet.io/) for this purpose. Connect both your Ethereum and Starknet wallets and bridge your assets conveniently. The exact steps are shown in the video below.

**Step 5: Start Borrowing**
Now, let's dive into the borrowing process. Please note that the collateral ratio and the assets you can borrow are predetermined. Currently, the ratios are 453 and 300, but they may change with the fluctuating ETH price. If you find yourself asking more questions, please return to FAQs section.

**Step 6: Select Your Asset and Borrow**
Pick your desired asset, such as ETH, and choose your borrowing amount. Keep in mind that the LUSD amount you receive is tied to the amount of ETH you input, following the predetermined collateral ratio. The gas fees are relatively lower on Starknet, making the borrowing process more cost-effective.

**Step 7: Confirm and Wait**
After selecting your asset and borrowing amount, click "Borrow." Your Starknet wallet will appear, and once the calculations are complete, click "Confirm." The transaction is now pending, and your LUSD is on its way. However, it's essential to understand that it might take some time due to the batching and Starknet finality process, which usually takes between 8 to 12 hours.

**Step 8: Be Patient and Stay Informed**
While your transaction is pending, we recommend reading the FAQ section and seeking answers to your questions. If you have technical questions about this integration or Starknet in general, you can join [Nimbora Alpha Testers](https://t.me/+606MBKpVsdthYTU0) Telegram group. If you have questions about borrowing or Liquity in general please join the [Liquity Discord](https://discord.com/invite/2up5U32).

To report any issue, please click on "FEEDBACK" button directly on [https://app.nimbora.io/](https://app.nimbora.io/) (see image below)

![https://assets-global.website-files.com/650947fe4f71ddba91014897/653f7d4def71d885d387e46c_1.png](https://assets-global.website-files.com/650947fe4f71ddba91014897/653f7d4def71d885d387e46c_1.png)


Have fun navigating DeFi with Nimbora and enjoy the efficiency of the Starknet integration!

Stay patient while your transaction processes, and in no time, your LUSD will be in your wallet.

HERE’S A DETAILED STEP-BY-STEP VIDEO TUTORIAL👇👇👇

[![VIDEO TUTORIAL](https://img.youtube.com/vi/DluxuqM4XHo&t/0.jpg)](https://www.youtube.com/watch?v=DluxuqM4XHo&t=1s&ab_channel=LiquityProtocol)
7 changes: 7 additions & 0 deletions docs/concepts/strategies/02-strategy-sdai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: sdai
title: Deposit sDAI
sidebar_position: 3
---

# How does depositing DAI works
7 changes: 7 additions & 0 deletions docs/concepts/strategies/03- strategy-lStaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: liquidStaking
title: Liquid Staking
sidebar_position: 4
---

# How does liquid straking works
5 changes: 5 additions & 0 deletions docs/concepts/strategies/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Strategies",
"position": 4,
"collapsed": false
}
19 changes: 19 additions & 0 deletions docs/contracts/architecture/L1_arch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: l1_arch
title: L1 Architecture
sidebar_position: 2
---

## L1 Contracts

### Pooling Manager

The pooling manager plays an intermediate role with L1 strategies and L2 communication. The contract receives L2 user's requests, to deposit or withdraw their assets from the strategies. Also, it generates [reports](/docs/concepts/reports.md) based on the user's actions on the different strategies and sends this information back to the [L2 Pooling Manager](/docs/contracts/architecture/L2_arch.md#pooling-manager).

### Strategy

The Strategy contract handles commands from the L1 Pooling Manager and connects it to the targeted strategies. There will be one Strategy Contract addapter for each strategy Nimbora supports. This design enables full scalability regardless of the amount of strategies the platform handles or future integrations.

Nimbora Yield DEX off-chain services allow for the indexing and processing L1 and L2 reports. For more details, please check this link.

![l1_arch](/content/L1_arch.png)
27 changes: 27 additions & 0 deletions docs/contracts/architecture/L2_arch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
id: l2_arch
title: L2 Architecture
sidebar_position: 3
---

## L2 Contracts

### Pooling Manager

The pooling manager plays an intermediate role with L2 Token Manager and L1 communication. The idea is to significantly reduce gas costs on L1 transactions by packing user's requests and mutualizing bridge transfer. It is also responsible for registering all available strategies and processes incoming strategy [reports](/docs/concepts/reports.md) from L1.

This design enables isolation between startegies thus, if one strategy report fails, it will not affect other strategies.

### Pooling Factory

The Pooling Factory is a contract able to deploy new Strategies on L2. When it does, it generates two contracts for each strategy. One Token Manager contract and on Token contract. Also, it makes sure that this two newly deployed contracts are linked to the correct strategy on L1, enabling users to interact with it.

### Token Manager

The token manager contains all the logic for strategy accountability. This is achieved through the strategy [reports](/docs/concepts/reports.md). Setting the share price at each epoch and working as an entry point for deposit and withdraw the Token Manager is the principal contract users will interact with in order to use Nimbora.

### Token

The Token contract represents users's share of the L1 strategy pool, increasing in value at each epoch. Since the Token contract is based on the ERC20 standard, it can be used in DeFi through the Starknet ecosystem.

![l2_arch](/content/L2_arch.png)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "Contracts",
"label": "Architecture",
"position": 1,
"collapsed": false
}
23 changes: 23 additions & 0 deletions docs/contracts/architecture/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
id: overview
title: Overview
sidebar_position: 1
---

# Architecture Overview


## Problem

Users want to interact with DEFI protocols to earn yield and increase their portfolio. Ethereum Mainnet is the most secure and one of the web3 chains that contain the biggest number of DEFI protocols and bigger liquidity in the ecosystem. A famous chain means lots of users, which means higher gas fees. Interacting with a DEFI protocol becomes expensive as the gas unit required to do a simple stake, swap, or withdraw can cost $$ or $$$ depending on the gas price.

## Solution

Nimbora Sync Yield allows users to access L1 yields from L2 without delay, additional gas fees, and liquidity requirements. This is made possible by emitting a share token representing a layer one yield token. Share price is updated at each report, which informs L2 of the yield generated by the L1 strategy.

## Contact architecture

![arch](/content/arch.png)



5 changes: 5 additions & 0 deletions docs/contracts/deployed/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Deployed Contracts",
"position": 4,
"collapsed": false
}
Loading

0 comments on commit ed8864d

Please sign in to comment.