Skip to content

Commit 4f732fb

Browse files
authored
Merge pull request #16 from helix-bridge/xiaoch05-add-lend
add relayer using lend market feature & add link of audit report
2 parents cd12360 + 75d0fb2 commit 4f732fb

File tree

9 files changed

+70
-17
lines changed

9 files changed

+70
-17
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"position": 3,
3-
"label": "🔹 Contract Addresses"
3+
"label": "Contract Addresses"
44
}

docs/contract-addresses/testnet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ sidebar_position: 2
2323
- chainId: 300
2424
- LnDefaultBridge(v2): [0xBe23e871318E49C747CB909AC65aCCFAEAac3a37](https://sepolia.explorer.zksync.io/address/0xBe23e871318E49C747CB909AC65aCCFAEAac3a37)
2525
- LnBridge(v3): [0xDc55fF59F82AA50D8A4A61dB8CcaDffD26Fb7dD2](https://sepolia.explorer.zksync.io/address/0xDc55fF59F82AA50D8A4A61dB8CcaDffD26Fb7dD2)
26+
27+
## Base Sepolia
28+
29+
- chainId: 84532
30+
- LnBridge(v3): [0x29D148A9e87C763292a33A55B9dBcAf44A194102](https://sepolia.basescan.org/address/0x29D148A9e87C763292a33A55B9dBcAf44A194102)

docs/introduction/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"position": 1,
3-
"label": "🔹 Introduction"
3+
"label": "Introduction"
44
}

docs/protocol/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"position": 2,
3-
"label": "🔹 Protocol"
3+
"label": "Protocol"
44
}

docs/relayer/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"position": 5,
3-
"label": "🔹 Relayer"
3+
"label": "Relayer"
44
}

docs/relayer/client.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Here's a brief overview of the steps to deploy a Relayer:
1515

1616
If you're not using Helix's public service, you'll need to deploy your own Indexer service. This may involve setting up and configuring an Indexer to index and provide on-chain data.
1717

18+
If you are not connected to the Helix public service, the Helix app will not be able to display your relayer information and will be unable to complete recommendations when users send transactions.
19+
1820
- **Building from Source**
1921

2022
Download the Relayer's source code and compile it according to the instructions in the project's documentation. Typically, this involves installing build tools, dependencies, and running build commands.

docs/relayer/register.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,52 @@ You can also use safewallet to run relayer, just configure the following 3 param
137137
- **safeWalletRole:**
138138
the Role of the account, can be `signer` or `executor`, the `executor` will send execution transaction when there are enough signatures.
139139

140+
### Advanced Features
141+
You can leverage the decentralized lending feature to achieve two purposes:
142+
- Earn interest on account assets from the lending market during relayer idle times, reducing the cost of funds as a relayer.
143+
- Provide relay services for an asset bridge without needing to hold that specific asset.
144+
145+
Currently, Helix relayer supports the AAVE lending pool. This feature is only supported for SafeWallet accounts. To use this feature, you need to create a SafeWallet with the same address across different networks and then transfer the tokens to this wallet.
146+
147+
For example, if you want to use the lending feature on Arbitrum, you will need to add configuration information similar to the example below.
148+
```js
149+
"rpcnodes": [
150+
{
151+
"name": "arbitrum",
152+
"rpc": "https://arb1.arbitrum.io/rpc",
153+
"lendMarket": [
154+
{
155+
"protocol": "aave",
156+
"healthFactorLimit": 3.0,
157+
"collaterals": [
158+
{
159+
"symbol": "weth",
160+
"autosupplyAmount": 0.2
161+
},
162+
{
163+
"symbol": "usdt",
164+
"autosupplyAmount": 2000
165+
}
166+
],
167+
"tokens": [
168+
{
169+
"symbol": "weth",
170+
"minRepay": 0.0001,
171+
"minReserved": 0
172+
}
173+
]
174+
}
175+
]
176+
},
177+
]
178+
```
179+
- **lenMarket**: Represents the list of lending markets.
180+
- `healthFactorLimit` represents the lending risk factor, with a recommended value of 3. The larger the value, the safer it is, but the corresponding lending amount is lower.
181+
- `collaterals` represents the collateral, and `autosupplyAmount` indicates the automatic collateral limit when the account has a balance and the collateral amount has not reached this value.
182+
- `tokens` represent the lending tokens, and the client will also automatically repay the loan when the account has a balance of these assets.
183+
- `Priority Usage` When a relay order is generated, the usage order of relay account assets is **Account Balance** > **Collateral Redemption** > **Lending Assets**. The redemption of collateral or the use of lending assets will only be enabled if they are in the configuration list.
184+
- `Native Token Handling` The handling of any native token assets, including supply, withdraw, or lending, is represented by its wrapped token in configure file. However, the use of assets in the account remains as native tokens.
185+
140186
### Install & Run
141187

142188
After completing the configuration, you can execute the following commands one by one to compile and start the client:

docs/user-guide/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"position": 4,
3-
"label": "🔹 User Guide"
3+
"label": "User Guide"
44
}

sidebars.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
1212
*/
1313
const sidebars: SidebarsConfig = {
1414
// By default, Docusaurus generates a sidebar from the docs folder structure
15-
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
16-
17-
// But you can create a sidebar manually
18-
/*
1915
tutorialSidebar: [
20-
'intro',
21-
'hello',
22-
{
23-
type: 'category',
24-
label: 'Tutorial',
25-
items: ['tutorial-basics/create-a-document'],
26-
},
16+
{ type: "autogenerated", dirName: "." },
17+
{
18+
type: 'category',
19+
label: 'Audit',
20+
items: [
21+
{
22+
type: 'link',
23+
label: 'Audit Report',
24+
href: 'https://github.com/helix-bridge/contracts/blob/master/helix-contract/audit/2024-07-04%20Audit%20Report%20-%20Helix%20Bridge%20v1.0.pdf',
25+
}
26+
],
27+
},
2728
],
28-
*/
2929
};
3030

3131
export default sidebars;

0 commit comments

Comments
 (0)