Skip to content

feat: ethereum mainnet dLEND collateral rollout (oracles + Safe reserve setup)#42

Merged
Git-on-my-level merged 21 commits intomainfrom
feature/eth-mainnet-dlend-collateral-rollout
Mar 11, 2026
Merged

feat: ethereum mainnet dLEND collateral rollout (oracles + Safe reserve setup)#42
Git-on-my-level merged 21 commits intomainfrom
feature/eth-mainnet-dlend-collateral-rollout

Conversation

@Git-on-my-level
Copy link
Contributor

Summary

This PR prepares the Ethereum mainnet collateral rollout for dLEND, including updated risk parameters, oracle wiring, and Safe-based deployment flows.

It also merges the frxETH fundamental oracle work from PR #34 into this rollout branch, per rollout requirements.

Changes

  • Updated reserve strategy/risk configs in config/dlend/reserves-params.ts for:
    • WETH, wstETH, rETH, sfrxETH, frxETH
    • sUSDe, sUSDS, syrupUSDC, syrupUSDT, sfrxUSD
    • LBTC, WBTC, cbBTC, PAXG
  • Updated Ethereum mainnet network config in config/networks/ethereum_mainnet.ts:
    • Added new token addresses
    • Added USD oracle mappings for plain/composite/ERC4626 feeds
    • Updated dLend.reservesConfig to include rollout assets and updated existing assets
    • Kept Safe config enabled for mainnet governance workflow
  • Added Safe rollout scripts:
    • deploy/99_cleanup/03_setup_ethereum_mainnet_collateral_oracles_safe.ts
    • deploy/99_cleanup/04_setup_ethereum_mainnet_collateral_reserves_safe.ts
  • Added rollout runbook:
    • docs/ethereum-mainnet-dlend-collateral-rollout.md
  • Resolved test/local config conflicts from PR Implement fundamental oracle for frxETH/ETH #34 integration:
    • config/networks/ethereum_testnet.ts
    • config/networks/localhost.ts

Placeholder Feeds Requiring Replacement

The following are intentionally invalid placeholders and must be replaced with final feed addresses before execution:

  • REPLACE_ME_INVALID_CHAINLINK_USDE_USD_FEED
  • REPLACE_ME_INVALID_CHAINLINK_RETH_ETH_FEED
  • REPLACE_ME_INVALID_CHAINLINK_FRXETH_ETH_FEED
  • REPLACE_ME_INVALID_CHAINLINK_LBTC_BTC_FEED
  • REPLACE_ME_INVALID_CHAINLINK_WBTC_BTC_FEED
  • REPLACE_ME_INVALID_CHAINLINK_CBBTC_USD_FEED
  • REPLACE_ME_INVALID_CHAINLINK_PAXG_USD_FEED

Validation

  • corepack yarn hardhat compile
  • corepack yarn eslint config/dlend/reserves-params.ts config/networks/ethereum_mainnet.ts deploy/99_cleanup/03_setup_ethereum_mainnet_collateral_oracles_safe.ts deploy/99_cleanup/04_setup_ethereum_mainnet_collateral_reserves_safe.ts ✅ (warnings only)
  • corepack yarn tsc -p tsconfig.json --noEmit ⚠️ fails due to pre-existing unrelated repository/typechain issues.

Notes

  • Safe scripts queue batch transactions; they do not directly execute privileged mainnet changes.
  • Oracle and reserve rollout order is documented in docs/ethereum-mainnet-dlend-collateral-rollout.md.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36ef5e4b5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +19 to +21
if (!frxConfig || !frxConfig.asset || !frxConfig.etherRouter || !frxConfig.redemptionQueue) {
console.log(" ⏭️ No frxETH fundamental oracle config found – skipping");
return true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip deploying frxETH wrapper with zero-address deps

frxEthFundamentalOracle is populated with addressOrZero(...) in the non-mainnet configs, so 0x000...000 values still pass this truthiness check; when MockFraxEtherRouter/MockFraxRedemptionQueueV2 are absent, this deploys a wrapper wired to zero addresses and later routes frxETH to an oracle that always reports stale pricing. This breaks frxETH price availability in local/testnet tag-based deployments instead of cleanly skipping the feature.

Useful? React with 👍 / 👎.

return true;
};

func.tags = ["deploy-mocks", "frax-oracle-mocks"];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include frxETH oracle mocks in local-setup fixtures

This mock deployment is tagged only as deploy-mocks/frax-oracle-mocks, but many repo fixtures execute deployments.fixture(["local-setup", ...]); in those runs, the FRAX router/queue mocks are skipped, leaving the new frxETH oracle path without required dependencies. Because frxETH is now added to local/testnet reserve/oracle config, this causes inconsistent or nonfunctional frxETH pricing in standard local setup flows.

Useful? React with 👍 / 👎.

@Git-on-my-level Git-on-my-level merged commit d1579ba into main Mar 11, 2026
4 checks passed
@Git-on-my-level Git-on-my-level deleted the feature/eth-mainnet-dlend-collateral-rollout branch March 11, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants