Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN pnpm install --fetch-retries 5
# - RAILWAY_DEPLOYMENT_ID

# Declare the chain IDs we support as an environment variable for looping
ENV CHAIN_IDS="1 130 8453 747474 42161 999"
ENV CHAIN_IDS="1 130 8453 747474 42161 999 143"

# Declare the non-dynamic vars so they are available at runtime
ENV LIQUIDATION_PRIVATE_KEY=${LIQUIDATION_PRIVATE_KEY}
Expand Down
1 change: 1 addition & 0 deletions apps/config/src/chains/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./hyperevm";
export * from "./monad";
29 changes: 29 additions & 0 deletions apps/config/src/chains/monad.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineChain } from "viem";

export const monad = defineChain({
id: 143,
name: "Monad Mainnet",
network: "monad",
nativeCurrency: {
symbol: "MON",
name: "Monad",
decimals: 18,
},
rpcUrls: {
default: {
http: ["https://143.rpc.hypersync.xyz"],
},
},
blockExplorers: {
default: {
name: "Monadscan",
url: "https://monadscan.com/",
},
},
contracts: {
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 0,
},
},
});
27 changes: 26 additions & 1 deletion apps/config/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { base, mainnet, unichain, katana, arbitrum } from "viem/chains";

import { hyperevm } from "./chains";
import { hyperevm, monad } from "./chains";
import type { Config } from "./types";

export const COOLDOWN_ENABLED = false; // true if you want to enable the cooldown mechanism
Expand Down Expand Up @@ -204,4 +204,29 @@ export const chainConfigs: Record<number, Config> = {
useTenderly: true,
},
},
[monad.id]: {
chain: monad,
morpho: { address: "0xD5D960E8C380B724a48AC59E2DfF1b2CB4a1eAee", startBlock: 31907457 },
adaptiveCurveIrm: {
address: "0x09475a3D6eA8c314c592b1a3799bDE044E2F400F",
startBlock: 31907457,
},
metaMorphoFactories: {
addresses: ["0x33f20973275B2F574488b18929cd7DCBf1AbF275"],
startBlock: 32320327,
},
preLiquidationFactory: {
address: "0xB5b3e541abD19799E0c65905a5a42BD37d6c94c0",
startBlock: 32321504,
},
wNative: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
options: {
vaultWhitelist: "morpho-api",
additionalMarketsWhitelist: [],
checkProfit: false,
useFlashbots: false,
blockInterval: 10,
useTenderly: true,
},
},
};
3 changes: 2 additions & 1 deletion apps/config/src/liquidityVenues/uniswapV3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Address } from "viem";
import { base, unichain, katana, worldchain } from "viem/chains";

import { hyperevm } from "../chains";
import { hyperevm, monad } from "../chains";

export const MIN_SQRT_RATIO = 4295128739n;
export const MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342n;
Expand All @@ -14,6 +14,7 @@ export const specificFactoryAddresses: Record<number, Address> = {
[katana.id]: "0x203e8740894c8955cB8950759876d7E7E45E04c1",
[worldchain.id]: "0x7a5028BDa40e7B173C278C5342087826455ea25a",
[hyperevm.id]: "0xB1c0fa0B789320044A6F623cFe5eBda9562602E3",
[monad.id]: "0x204faca1764b154221e35c0d20abb3c525710498",
};

export const FEE_TIERS = [500, 3000, 10000];
10 changes: 10 additions & 0 deletions apps/config/src/liquidityVenues/uniswapV4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
zora,
} from "viem/chains";

import { monad } from "../chains";

type Contracts = "PoolManager" | "Quoter" | "StateView" | "UniversalRouter" | "Permit2" | "Native";

export const DEPLOYMENTS: Record<
Expand Down Expand Up @@ -128,4 +130,12 @@ export const DEPLOYMENTS: Record<
Permit2: { address: "0x000000000022D473030F116dDEE9F6B43aC78BA3" },
Native: { address: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c" },
},
[monad.id]: {
PoolManager: { address: "0x188d586ddcf52439676ca21a244753fa19f9ea8e", fromBlock: 29255895n },
Quoter: { address: "0xa222dd357a9076d1091ed6aa2e16c9742dd26891" },
StateView: { address: "0x77395f3b2e73ae90843717371294fa97cc419d64" },
UniversalRouter: { address: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3" },
Permit2: { address: "0x000000000022D473030F116dDEE9F6B43aC78BA3" },
Native: { address: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A" },
},
};
3 changes: 2 additions & 1 deletion apps/config/src/pricers/uniswapV3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Address } from "viem";
import { base, mainnet, arbitrum, unichain, polygon, worldchain, katana } from "viem/chains";

import { hyperevm } from "../chains";
import { hyperevm, monad } from "../chains";

export const USD_REFERENCE: Record<number, Address> = {
[mainnet.id]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
Expand All @@ -12,4 +12,5 @@ export const USD_REFERENCE: Record<number, Address> = {
[polygon.id]: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
[worldchain.id]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
[hyperevm.id]: "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
[monad.id]: "0x204faca1764b154221e35c0d20abb3c525710498",
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@morpho-org/blue-sdk": "^3.0.9",
"ponder": "^0.13.6",
"tsx": "^4.19.3",
"viem": "^2.37.0"
"viem": "^2.41.2"
},
"devDependencies": {
"@eslint/js": "^9.20.0",
Expand Down
Loading
Loading