add monolith-market saving vaults & cdp markets#2660
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR introduces a new adapter for the Monolith Market protocol. It defines contract ABIs for Lender, Lens, and Vault; queries Factory events to discover pools; multicalls to gather rates, balances, and pricing; and builds CDP lending and savings vault market objects with computed TVL and APY metrics. ChangesMonolith Market Adaptor Implementation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2ddbdce to
861ecd7
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
src/adaptors/monolith-market/index.js (1)
133-148: ⚡ Quick winAvoid hardcoding
'Ethereum'and chainId1in pool fields/URLs.
getChainPoolsalready receiveschainand resolveschainIdfromFACTORIES[chain](line 49 — thoughchainIdis currently unused). Hardcoding will silently produce wrong values the moment a second chain is added toFACTORIES. Use the resolvedchain/chainIdhere and in the savings vault block (lines 160 & 166).🛠️ Proposed fix
return { pool: `monolith-market-lending-${m}`, - chain: 'Ethereum', + chain: utils.formatChain(chain), project: PROJECT, symbol: collateralSymbol, mintedCoin, tvlUsd: totalSupplyUsd - totalBorrowUsd, underlyingTokens: [collateral], - url: 'https://app.monolith.market/1/coin/' + marketIndex, + url: `https://app.monolith.market/${chainId}/coin/${marketIndex}`,Apply the same change to the savings vault object on lines 160 and 166.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` around lines 133 - 148, The pool objects returned in getChainPools are hardcoding 'Ethereum' and the chainId 1 in the URL; update the returned object to use the resolved chain variable (use the function parameter/variable named chain) for the chain property and use the resolved chainId (from FACTORIES[chain] or the local chainId variable already computed) in the URL (replace '/1/' with `/${chainId}/`); also make the same replacements in the savings vault object referenced around the savings vault block (the same returned object structure near lines 160/166) so both pool and savings vault use dynamic chain and chainId values instead of hardcoded ones.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/adaptors/monolith-market/index.js`:
- Line 139: The tvlUsd calculation currently uses "tvlUsd: totalSupplyUsd -
totalBorrowUsd", which undercounts collateral for CDP-style markets and can
become negative; change tvlUsd to reflect collateral only (assign "tvlUsd" =
totalSupplyUsd) for CDP markets and keep totalSupplyUsd and totalBorrowUsd as
separate fields so downstream consumers can compute net positions if needed;
update the assignment where "tvlUsd", "totalSupplyUsd", and "totalBorrowUsd" are
constructed (the tvlUsd property in the same object) and, if needed, add a clear
comment indicating this is collateral-only for CDP adapters.
- Line 94: The multicall is using lensAbi.find('getCollateralPrice') but that
method is not in lensAbi and returns undefined; update the sdk.api.abi.multiCall
invocation to use the correct ABI that contains getCollateralPrice (the lender
ABI) — i.e., replace the lensAbi lookup with lenderAbi.find(a => a.name ===
'getCollateralPrice') or import/ensure lenderAbi is used where
sdk.api.abi.multiCall({ ..., abi: ... , calls: lenders }) is called so the calls
targeting lenders use the correct ABI.
- Around line 158-170: The returned savings vault object contains a duplicated
key tvlUsd (assigned twice); remove the redundant tvlUsd assignment so
totalSupplyUsd is only set once, and simplify the loop by iterating over the
vaults array directly instead of using lenders to derive marketIndex — update
the loop to for (let marketIndex = 0; marketIndex < vaults.length;
marketIndex++) (or equivalent), keeping the rest of the fields (pool, chain,
project, symbol/vaultSymbol, totalSupplyUsd, apyBase/stakingApr,
underlyingTokens/[underlying], url, borrowable) unchanged and referenced by
their existing names (vaults, lenders, marketIndex, vaultSymbol, underlying,
totalSupplyUsd, stakingApr).
- Around line 17-24: The function getPrices references superagent but the module
isn’t imported, causing a ReferenceError; fix by adding the appropriate import
for superagent at the top of the file (or replace the superagent call inside
getPrices with the project-preferred HTTP client such as axios/fetch) and ensure
the call signature and response access (body.coins) match the chosen client;
update getPrices to use the imported client so superagent is no longer
undefined.
- Around line 64-66: Remove the debug console.log calls that will spam
production logs: delete the console.log lines printing 'lenders', 'coins',
'vaults' and the later console.log('vaultSymbols', ...) in
src/adaptors/monolith-market/index.js so no temporary debug output remains;
search for those exact strings (console.log('lenders', lenders),
console.log('coins', coins), console.log('vaults', vaults),
console.log('vaultSymbols', ...)) and remove them or replace with an appropriate
logger at debug level if needed.
- Around line 119-148: Replace the undefined identifiers and normalize token
addresses when looking up prices: use coinSymbols[marketIndex] instead of
mintedSymbols, compute coinPriceUsd from
pricesByAddress[coins[marketIndex].toLowerCase()] and use oracle fallback from
collaterals[marketIndex].toLowerCase() for collateralPriceUsd; ensure you
.toLowerCase() when indexing pricesByAddress in the CDP loop (and mirror the
same lowercase lookup in the savings vault loop), and verify whether borrowApr
from rates[marketIndex][0] is already an APR or a per-second rate so you can
keep or adjust the apyBaseBorrow conversion (currently Number(borrowApr)/1e16)
accordingly.
---
Nitpick comments:
In `@src/adaptors/monolith-market/index.js`:
- Around line 133-148: The pool objects returned in getChainPools are hardcoding
'Ethereum' and the chainId 1 in the URL; update the returned object to use the
resolved chain variable (use the function parameter/variable named chain) for
the chain property and use the resolved chainId (from FACTORIES[chain] or the
local chainId variable already computed) in the URL (replace '/1/' with
`/${chainId}/`); also make the same replacements in the savings vault object
referenced around the savings vault block (the same returned object structure
near lines 160/166) so both pool and savings vault use dynamic chain and chainId
values instead of hardcoded ones.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9c37c458-6f09-4257-bdd3-04e9ad916fc0
📒 Files selected for processing (3)
src/adaptors/monolith-market/index.jssrc/adaptors/monolith-market/lenderAbi.tssrc/adaptors/monolith-market/lensAbi.ts
861ecd7 to
7548e51
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (4)
src/adaptors/monolith-market/index.js (4)
145-145:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
tvlUsd: totalSupplyUsd - totalBorrowUsdcan go negative.When
totalBorrowUsd > totalSupplyUsd(possible with price volatility or oracle lag), TVL turns negative andkeepFinitesilently drops the pool. For CDP markets the conventional TVL is the locked collateral value; subtracting the debt is atypical and risky. See Maker/Liquity adapters in this repo for reference.🛠️ Proposed fix
- tvlUsd: totalSupplyUsd - totalBorrowUsd, + tvlUsd: totalSupplyUsd,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` at line 145, The tvlUsd calculation currently uses tvlUsd: totalSupplyUsd - totalBorrowUsd which can produce negative values and cause keepFinite to drop the pool; update the logic in the tvlUsd assignment (where tvlUsd, totalSupplyUsd and totalBorrowUsd are computed) to avoid negatives — for CDP-style markets set tvlUsd to the locked/total collateral value (e.g., use the existing lockedCollateralUsd/totalCollateralUsd field if present) and otherwise clamp the value to a non-negative number (e.g., replace the subtraction with a max(..., 0) semantics) before passing it on to keepFinite. Ensure you only change the tvlUsd expression and leave other metrics untouched.
128-133:⚠️ Potential issue | 🔴 Critical | ⚡ Quick win
coinPriceUsduses wrong address; both lookups miss due to address case mismatch.Two bugs remain from the previous review:
- Line 128 —
coinPriceUsdlooks uppricesByAddress[collateral](the collateral address) when it should look up the minted coin's address (coins[marketIndex]). This causestotalBorrowUsdto always be 0.- Lines 128 & 133 —
pricesByAddresskeys are lowercase (the API call lowercases the input URL), butcollateralandcoins[marketIndex]are checksummed EVM addresses from event log args, so all lookups silently returnundefined.🛠️ Proposed fix
- const coinPriceUsd = pricesByAddress[collateral] || 0; + const coinAddress = coins[marketIndex].toLowerCase(); + const coinPriceUsd = pricesByAddress[coinAddress] || 0; const { price: oraclePrice } = collateralsPriceData[marketIndex]; const oraclePriceUsd = (Number(oraclePrice) / (10 ** (36 - collateralDecimal))) || 0; // use defillama if available otherwise fallback to oracle price - const collateralPriceUsd = pricesByAddress[collateral] || oraclePriceUsd; + const collateralPriceUsd = pricesByAddress[collateral.toLowerCase()] || oraclePriceUsd;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` around lines 128 - 133, coinPriceUsd is using the wrong key and both price lookups suffer from checksum vs lowercase mismatch: change the coin lookup to use coins[marketIndex] (not collateral) and normalize addresses to lowercase when indexing pricesByAddress (e.g., pricesByAddress[coins[marketIndex].toLowerCase()] and pricesByAddress[collateral.toLowerCase()]) so both coinPriceUsd and collateralPriceUsd correctly read DeFiLlama data (keep oraclePriceUsd fallback logic via collateralsPriceData[marketIndex] unchanged).
171-179:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winDuplicate
tvlUsdkey still present in savings vault object.
tvlUsdis assigned on line 171 and again on line 178; the second silently overwrites the first. Biome flags this asnoDuplicateObjectKeys. Additionally,apy(line 172) is a non-standard DefiLlama field —apyBaseon line 173 is the correct canonical field; the extraapykey can be dropped.🛠️ Proposed fix
return { pool: `monolith-market-savings-${vaults[marketIndex]}`, chain: 'Ethereum', project: PROJECT, symbol: vaultSymbol, tvlUsd: totalSupplyUsd, - apy: apy, apyBase: apy, apyReward: 0, underlyingTokens: [underlying], url: 'https://app.monolith.market/1/coin/' + marketIndex, totalSupplyUsd, - tvlUsd: totalSupplyUsd, borrowable: false, };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` around lines 171 - 179, Remove the duplicate tvlUsd key and the non-standard apy field from the savings vault object: keep a single tvlUsd assignment (e.g., tvlUsd: totalSupplyUsd) and retain apyBase and apyReward as the canonical DefiLlama fields; delete the second tvlUsd line and the apy line so the object contains tvlUsd, apyBase, apyReward, underlyingTokens, url, totalSupplyUsd, and borrowable only once each.
161-161:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winSavings vault
coinPriceUsdlookup uses checksummed address — same mismatch as CDP loop.
underlying = coins[marketIndex]is a checksummed address from the event log.pricesByAddresskeys are lowercase, so this lookup will always returnundefined, makingtotalSupplyUsdalways 0 for all savings vaults.🛠️ Proposed fix
- const coinPriceUsd = pricesByAddress[underlying] || 0; + const coinPriceUsd = pricesByAddress[underlying.toLowerCase()] || 0;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` at line 161, The lookup for coinPriceUsd uses a checksummed address (underlying from coins[marketIndex]) but pricesByAddress keys are lowercase, so change the lookup to use a normalized lowercase key (e.g., use underlying.toLowerCase()) when accessing pricesByAddress in the savings vault logic (the expression that sets coinPriceUsd and subsequently totalSupplyUsd); ensure the normalized lookup still falls back to 0 if missing.
🧹 Nitpick comments (1)
src/adaptors/monolith-market/index.js (1)
10-10: ⚡ Quick winRemove unused
pathimport.
pathis required but never referenced anywhere in the file.🧹 Proposed fix
-const path = require('path');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` at line 10, Remove the unused import by deleting the top-level require for the symbol `path` (the const path = require('path') statement) since `path` is never referenced; ensure no other code depends on `path` in this module and run lint/tests to confirm there are no remaining references.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/adaptors/monolith-market/index.js`:
- Around line 150-151: The apyBase field is incorrectly set to the borrow rate;
for CDP collateral positions suppliers earn nothing, so change the object where
apyBase and apyBaseBorrow are assigned (look for apyBase: borrowApy,
apyBaseBorrow: borrowApy) to set apyBase to 0 and keep apyBaseBorrow as
borrowApy so depositors show 0% and borrowers show the borrow rate.
---
Duplicate comments:
In `@src/adaptors/monolith-market/index.js`:
- Line 145: The tvlUsd calculation currently uses tvlUsd: totalSupplyUsd -
totalBorrowUsd which can produce negative values and cause keepFinite to drop
the pool; update the logic in the tvlUsd assignment (where tvlUsd,
totalSupplyUsd and totalBorrowUsd are computed) to avoid negatives — for
CDP-style markets set tvlUsd to the locked/total collateral value (e.g., use the
existing lockedCollateralUsd/totalCollateralUsd field if present) and otherwise
clamp the value to a non-negative number (e.g., replace the subtraction with a
max(..., 0) semantics) before passing it on to keepFinite. Ensure you only
change the tvlUsd expression and leave other metrics untouched.
- Around line 128-133: coinPriceUsd is using the wrong key and both price
lookups suffer from checksum vs lowercase mismatch: change the coin lookup to
use coins[marketIndex] (not collateral) and normalize addresses to lowercase
when indexing pricesByAddress (e.g.,
pricesByAddress[coins[marketIndex].toLowerCase()] and
pricesByAddress[collateral.toLowerCase()]) so both coinPriceUsd and
collateralPriceUsd correctly read DeFiLlama data (keep oraclePriceUsd fallback
logic via collateralsPriceData[marketIndex] unchanged).
- Around line 171-179: Remove the duplicate tvlUsd key and the non-standard apy
field from the savings vault object: keep a single tvlUsd assignment (e.g.,
tvlUsd: totalSupplyUsd) and retain apyBase and apyReward as the canonical
DefiLlama fields; delete the second tvlUsd line and the apy line so the object
contains tvlUsd, apyBase, apyReward, underlyingTokens, url, totalSupplyUsd, and
borrowable only once each.
- Line 161: The lookup for coinPriceUsd uses a checksummed address (underlying
from coins[marketIndex]) but pricesByAddress keys are lowercase, so change the
lookup to use a normalized lowercase key (e.g., use underlying.toLowerCase())
when accessing pricesByAddress in the savings vault logic (the expression that
sets coinPriceUsd and subsequently totalSupplyUsd); ensure the normalized lookup
still falls back to 0 if missing.
---
Nitpick comments:
In `@src/adaptors/monolith-market/index.js`:
- Line 10: Remove the unused import by deleting the top-level require for the
symbol `path` (the const path = require('path') statement) since `path` is never
referenced; ensure no other code depends on `path` in this module and run
lint/tests to confirm there are no remaining references.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0284cd8c-6a8b-4c9b-b8af-f3588b60e228
📒 Files selected for processing (5)
src/adaptors/monolith-market/factoryAbi.tssrc/adaptors/monolith-market/index.jssrc/adaptors/monolith-market/lenderAbi.tssrc/adaptors/monolith-market/lensAbi.tssrc/adaptors/monolith-market/vaultAbi.ts
✅ Files skipped from review due to trivial changes (4)
- src/adaptors/monolith-market/lensAbi.ts
- src/adaptors/monolith-market/factoryAbi.ts
- src/adaptors/monolith-market/vaultAbi.ts
- src/adaptors/monolith-market/lenderAbi.ts
7548e51 to
eca3a7b
Compare
eca3a7b to
78fa94b
Compare
cc4e139 to
9a05310
Compare
9a05310 to
72bb888
Compare
|
The monolith-market adapter exports pools: Test Suites: 1 passed, 1 total |
Hey, |
|
The monolith-market adapter exports pools: Test Suites: 1 passed, 1 total |
|
|
||
| const { factory, chainId, lens, blocksPerYear, fromBlock } = FACTORIES[chain]; | ||
|
|
||
| const logsRawData = await sdk.api.util.getLogs({ |
There was a problem hiding this comment.
we should use sdk.getEventLogs its the more common pattern across the codebase, something like this:
const logs = await sdk.getEventLogs({
target: factory,
fromBlock,
toBlock,
chain,
eventAbi: 'event Deployed(address indexed lender, address indexed coin,
address indexed vault)',
});
const lenders = logs.map((l) => l.args.lender);
const coins = logs.map((l) => l.args.coin);
const vaults = logs.map((l) => l.args.vault);
There was a problem hiding this comment.
we should use
sdk.getEventLogsits the more common pattern across the codebase, something like this:const logs = await sdk.getEventLogs({ target: factory, fromBlock, toBlock, chain, eventAbi: 'event Deployed(address indexed lender, address indexed coin, address indexed vault)', }); const lenders = logs.map((l) => l.args.lender); const coins = logs.map((l) => l.args.coin); const vaults = logs.map((l) => l.args.vault);
Done, function undefined locally somehow but works with the pipeline here.
|
Error while running monolith-market adapter: Test Suites: 1 failed, 1 total |
|
The monolith-market adapter exports pools: Test Suites: 1 passed, 1 total |
|
hi @webmass, a few things remaining until we can merge:
|
|
The monolith-market adapter exports pools: Test Suites: 1 passed, 1 total |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/adaptors/monolith-market/index.js (1)
104-105: ⚡ Quick winConsider guarding against null
rateswhen multicalls fail withpermitFailure.With
permitFailure: true, failed calls return null output. Ifrates[marketIndex]is null (e.g., lens call failed for a specific lender), accessingrates[marketIndex][0]throwsTypeError. This would crash the entire adaptor rather than skipping the problematic pool.♻️ Suggested defensive check
- const borrowApr = Math.min(Number(rates[marketIndex][0]) / 1e16, 999_999_999); - const borrowApy = borrowApr < 999_999_999 ? Math.min(999_999_999, utils.aprToApy(borrowApr, blocksPerYear)) : 999_999_999; + const rateData = rates[marketIndex]; + if (!rateData) return null; // Skip pool if rates call failed + const borrowApr = Math.min(Number(rateData[0]) / 1e16, 999_999_999); + const borrowApy = borrowApr < 999_999_999 ? Math.min(999_999_999, utils.aprToApy(borrowApr, blocksPerYear)) : 999_999_999;The returned
nullwould be filtered out by the.filter((p) => utils.keepFinite(p))at line 150.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` around lines 104 - 105, Guard against null rows in rates before indexing: when computing borrowApr/borrowApy use a null-check on rates[marketIndex] (referencing rates and marketIndex) and if it's null/undefined produce a non-finite numeric result (e.g., NaN) so the later .filter(p => utils.keepFinite(p)) will drop the pool; ensure the borrowApr/borrowApy calculation (the borrowApr assignment and the borrowApy assignment using utils.aprToApy and blocksPerYear) only runs when the rate row exists to avoid a TypeError.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/adaptors/monolith-market/index.js`:
- Around line 104-105: Guard against null rows in rates before indexing: when
computing borrowApr/borrowApy use a null-check on rates[marketIndex]
(referencing rates and marketIndex) and if it's null/undefined produce a
non-finite numeric result (e.g., NaN) so the later .filter(p =>
utils.keepFinite(p)) will drop the pool; ensure the borrowApr/borrowApy
calculation (the borrowApr assignment and the borrowApy assignment using
utils.aprToApy and blocksPerYear) only runs when the rate row exists to avoid a
TypeError.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c521080a-c2cc-4ba4-b4a0-84e747eba0bb
📒 Files selected for processing (1)
src/adaptors/monolith-market/index.js
35e7fac to
9bef442
Compare
|
The monolith-market adapter exports pools: Test Suites: 1 passed, 1 total |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/adaptors/monolith-market/index.js (1)
9-10:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winUpdate the Ethereum Lens singleton address.
Monolith’s official contract-addresses page lists the Ethereum Lens singleton as
0x8aAb59675e123cEEFE5E05B0BC1bE8fe6101E60d, not the address configured here. Since everygetRatesmulticall below uses this constant, the adapter will read rates from the wrong contract and return bad or empty APY data. (docs.monolith.market)🛠️ Proposed fix
const FACTORIES = { - ethereum: { chainId: 1, blocksPerYear: 2609750, factory: '0x6D961c9DCF1AD73566822BA4B087892e3839B849', lens: '0x0f3a7cd1828698D2B6daEf081d5c319c0734fA1c', fromBlock: 24949282 }, + ethereum: { chainId: 1, blocksPerYear: 2609750, factory: '0x6D961c9DCF1AD73566822BA4B087892e3839B849', lens: '0x8aAb59675e123cEEFE5E05B0BC1bE8fe6101E60d', fromBlock: 24949282 }, }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/adaptors/monolith-market/index.js` around lines 9 - 10, The FACTORIES constant for the ethereum entry is using the wrong Lens singleton address, causing getRates multicalls to query the wrong contract; update FACTORIES.ethereum.lens to the official address 0x8aAb59675e123cEEFE5E05B0BC1bE8fe6101E60d so all places that reference FACTORIES.ethereum.lens (including the getRates multicall logic) target the correct Lens singleton and return valid APY data.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/adaptors/monolith-market/index.js`:
- Around line 9-10: The FACTORIES constant for the ethereum entry is using the
wrong Lens singleton address, causing getRates multicalls to query the wrong
contract; update FACTORIES.ethereum.lens to the official address
0x8aAb59675e123cEEFE5E05B0BC1bE8fe6101E60d so all places that reference
FACTORIES.ethereum.lens (including the getRates multicall logic) target the
correct Lens singleton and return valid APY data.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bd3c5ae1-89ff-4c6f-98e4-ee4791d53db6
📒 Files selected for processing (1)
src/adaptors/monolith-market/index.js
Hey |
Summary by CodeRabbit