You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-35Lines changed: 3 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
1
# Morpho Blue Reallocation Bot
2
2
3
-
A simple, fast, and easily deployable reallocation bot for the **Morpho Blue** protocol. This bot is entirely based on **RPC calls** and is designed to
4
-
meet borrow demand within MetaMorpho vaults by equalizing utilization rates across markets.
3
+
A simple, fast, and easily deployable reallocation bot for the **Morpho Blue** protocol. This bot is entirely based on **RPC calls and the Morpho API** and is designed to automate Morpho vaultsV1 reallocations according customable strategies.
5
4
6
5
## Features
7
6
8
7
- Automatically rebalances assets within MetaMorpho vaults to maintain capital efficiency
9
8
- Equalizes utilization rates across markets
10
9
- Multi-chain compatible (Ethereum, Base, and more)
11
-
- Minimal setup and dependencies (RPC-only, no extra infra required)
12
10
- Configurable minimum threshold for utilization changes (2.5% by default)
13
11
14
12
### ⚠️ Disclaimer
@@ -21,7 +19,6 @@ Use at your own risk.
21
19
22
20
- Node.js >= 20
23
21
-[pnpm](https://pnpm.io/) (this repo uses `pnpm` as package manager)
24
-
-[Docker](https://www.docker.com/) (optional, only needed if you want to run the database locally)
25
22
- A valid RPC URL (via Alchemy, Infura, etc)
26
23
- The private key of an EOA with enough funds to pay for gas
27
24
@@ -35,26 +32,7 @@ pnpm install
35
32
36
33
## Chain Configuration
37
34
38
-
The bot can be configured to run on any EVM-compatible chain where the Morpho stack has been deployed. The chain configuration is done in the `apps/config/config.ts` file.
39
-
40
-
### Morpho Stack parameters (addresses and start blocks)
41
-
42
-
**If you don't plan on supporting a new chain, you can ignore this section.**
43
-
44
-
Morpho Blue:
45
-
46
-
-`morpho.address`: The address of the Morpho contract.
47
-
-`morpho.startBlock`: The block number of the Morpho contract deployment.
48
-
49
-
Adaptive Curve IRM:
50
-
51
-
-`adaptiveCurveIrm.address`: The address of the Adaptive Curve IRM contract.
52
-
-`adaptiveCurveIrm.startBlock`: The block number of the Adaptive Curve IRM contract deployment.
53
-
54
-
Meta Morpho Factories:
55
-
56
-
-`metaMorphoFactories.addresses`: The addresses of the MetaMorpho factories.
57
-
-`metaMorphoFactories.startBlock`: The block number of the oldest MetaMorpho factory deployment.
35
+
The bot can be configured to run on any EVM-compatible chain where the Morpho stack has been deployed and supported by the Morpho API. The chain configuration is done in the `apps/config/config.ts` file. Just fill the array with the chains where you want the bot to run.
58
36
59
37
### Secrets
60
38
@@ -122,14 +100,4 @@ Once the bot is installed and configured, you can run it by executing the follow
122
100
pnpm reallocate
123
101
```
124
102
125
-
This command will start the bot, which will start reallocating once the configured chains are fully indexed.
126
-
127
-
⚠⏱️ The indexing process can take some time depending on the number of blocks to index.
128
-
129
-
## Config Changes
130
-
131
-
Unfortunately, Ponder doesn't allow the same schema to be used with different configs.
132
-
In this project, the config changes only if you add, remove, or modify a chain.
133
-
134
-
So, if you try to run the bot with a set of chains that's different from the one used in your initial run, indexing will fail.
135
-
You should use another schema (this handled in `apps/client/src/script.ts`).
0 commit comments