Skip to content

Conversation

@FranckDSA
Copy link

  • Add silo_xETH_scETH_market address to ChainValues.sol
  • Update CreateStakedSonicETHMerkleRoot.s.sol to include ERC4626 integration
  • Generate updated StakedSonicETHStrategistLeafs.json with new market leafs

- Add silo_xETH_scETH_market address to ChainValues.sol
- Update CreateStakedSonicETHMerkleRoot.s.sol to include ERC4626 integration
- Generate updated StakedSonicETHStrategistLeafs.json with new market leafs
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR integrates the Silo xETH-scETH market on the Sonic blockchain into the StakedSonicETH vault system. The changes enable the vault to interact with Silo's ERC4626-compliant lending market for xETH collateral and scETH borrowing, expanding yield generation opportunities.

The integration follows the established pattern in the boring-vault codebase for adding DeFi protocol support. First, the new market address is registered in ChainValues.sol, which serves as the centralized address registry for all supported protocols across different chains. Next, the Merkle root generation script is updated to include ERC4626 vault operations for the new Silo market. Finally, the strategist leaf configuration is regenerated to include all necessary function calls for depositing, withdrawing, and managing positions in the Silo market.

The vault system uses Merkle trees to define and verify allowed operations, ensuring that only pre-approved functions can be executed by strategists. This approach provides security while enabling flexible DeFi integrations. The new Silo integration allows the vault to earn yield by depositing ETH as collateral and potentially borrowing scETH, following Silo's isolated lending market model.

Important Files Changed

Changed Files
Filename Score Overview
test/resources/ChainValues.sol 5/5 Added silo_xETH_scETH_market address to SonicMainnet configuration
script/MerkleRootCreation/Sonic/CreateStakedSonicETHMerkleRoot.s.sol 3/5 Added ERC4626 integration for Silo market with potential array initialization issue
leafs/Sonic/StakedSonicETHStrategistLeafs.json 4/5 Generated Merkle tree configuration with 217 operations including new Silo market support

Confidence score: 3/5

  • This PR has moderate risk due to a potential bug in the script and extensive generated configuration changes
  • Score reflects the straightforward address addition but concerns about duplicated array assignment and large generated file changes
  • Pay close attention to the CreateStakedSonicETHMerkleRoot.s.sol script for the array initialization issue

3 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

cursor[bot]

This comment was marked as outdated.

@imrtlfarm imrtlfarm closed this Oct 20, 2025
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