Skip to content

Conversation

@imrtlfarm
Copy link

@imrtlfarm imrtlfarm commented Sep 16, 2025

  • PlasmaUSD on plasma
  • LiquidETH on plasma
  • LiquidETH on mainnet

@imrtlfarm imrtlfarm marked this pull request as ready for review September 18, 2025 00:54
cursor[bot]

This comment was marked as outdated.

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 implements multi-chain expansion by adding support for PlasmaUSD and LiquidETH deployments on the Plasma chain, while also updating LiquidETH configuration on mainnet. The changes follow the boring-vault's established architecture pattern where each vault deployment gets its own decoder/sanitizer contract and Merkle root configuration.

The core changes include:

New Plasma Chain Support: Two new decoder/sanitizer contracts are added (PlasmaUSDPlasmaDecoderAndSanitizer and LiquidETHPlasmaDecoderAndSanitizer) that combine multiple protocol integrations including Aave V3, LayerZero OFT for cross-chain transfers, native token wrapping, and Fluid protocol operations. These follow the modular inheritance pattern used throughout the codebase.

Merkle Root Generation: New scripts are created to generate Merkle trees for both PlasmaUSD and LiquidETH on Plasma (CreatePlasmaUSDMerkleRoot.s.sol and CreateLiquidETHMerkleRoot.s.sol). These scripts define authorized operations for each vault, with PlasmaUSD having a simpler 16-leaf tree focused on basic Aave lending and bridging, while LiquidETH has a more comprehensive 128-leaf tree supporting additional DeFi protocols.

Configuration Updates: The ChainValues.sol file is updated with new token addresses and protocol configurations for both Mainnet and Plasma, adding support for USDe/sUSDe tokens and their OFT adapters, plus Aave V3 protocol addresses on Plasma. The mainnet LiquidETH configuration is enhanced with sUSDe support and Plasma bridging capabilities.

Infrastructure Changes: The deployment script is refocused on Plasma chain deployments, and foundry.toml is updated to temporarily disable verification for Bob and HyperEVM networks.

The generated JSON configuration files contain the actual Merkle trees with leaf operations, metadata, and tree structures that enable secure, permission-based vault operations across chains. This expansion allows the boring-vault ecosystem to operate on Plasma while maintaining the same security model and operational capabilities.

Important Files Changed

Changed Files
Filename Score Overview
foundry.toml 4/5 Comments out Bob and HyperEVM Etherscan API configurations, disabling verification for these networks
script/MerkleRootCreation/Plasma/CreateLiquidETHMerkleRoot.s.sol 1/5 New Merkle root script with critical naming mismatch and incorrect asset configuration for LiquidETH
leafs/Plasma/PlasmaUSDMerkleRoot.json 4/5 Well-formed Merkle tree configuration for PlasmaUSD with 10 operations and 6 placeholder entries
leafs/Plasma/LiquidETHMerkleRoot.json 4/5 Comprehensive 66-operation Merkle tree for LiquidETH with proper DeFi protocol integrations
test/resources/ChainValues.sol 5/5 Adds new token addresses and Aave V3 protocol configurations for Mainnet and Plasma chains
script/DeployDecoderAndSanitizer.s.sol 4/5 Refocused from multi-decoder deployment to single LiquidETH Plasma deployment
script/MerkleRootCreation/Mainnet/CreateMultiChainLiquidEthMerkleRoot.s.sol 4/5 Enhanced with sUSDe support, updated decoder address, and extensive Plasma bridging capabilities
src/base/DecodersAndSanitizers/PlasmaUSDPlasmaDecoderAndSanitizer.sol 5/5 New decoder combining base operations, OFT transfers, native wrapping, and Aave V3 lending
src/base/DecodersAndSanitizers/LiquidETHPlasmaDecoderAndSanitizer.sol 4/5 Comprehensive decoder with 7 protocol integrations including Fluid, Uniswap V3, and Aave V3
script/MerkleRootCreation/Plasma/CreatePlasmaUSDMerkleRoot.s.sol 4/5 Simple but well-structured Merkle root script for PlasmaUSD with basic DeFi functionality

Confidence score: 2/5

  • This PR has significant implementation issues that require immediate attention before merging
  • Score lowered due to critical naming mismatch and incorrect asset configuration in the LiquidETH Plasma script
  • Pay close attention to script/MerkleRootCreation/Plasma/CreateLiquidETHMerkleRoot.s.sol which has the wrong contract name and USD assets instead of ETH assets

Sequence Diagram

sequenceDiagram
    participant User
    participant DeployScript as "Deploy Script"
    participant Factory as "Create2 Factory"
    participant Decoder as "Decoder & Sanitizer"
    participant MerkleHelper as "Merkle Tree Helper"
    participant Vault as "Boring Vault"
    participant Manager as "Manager Contract"
    participant LayerZero as "LayerZero Endpoint"

    User->>DeployScript: "Execute deployment script"
    DeployScript->>Factory: "Deploy LiquidETH Plasma Decoder"
    Factory-->>DeployScript: "Decoder deployed at address"
    
    DeployScript->>MerkleHelper: "Generate Merkle tree for LiquidETH"
    MerkleHelper->>MerkleHelper: "Process 128 leaf operations"
    Note over MerkleHelper: Includes Aave V3, LayerZero,<br/>UniswapV3, Native wrapping
    MerkleHelper-->>DeployScript: "Return Merkle root & tree"
    
    DeployScript->>MerkleHelper: "Generate Merkle tree for PlasmaUSD"
    MerkleHelper->>MerkleHelper: "Process 16 leaf operations"
    Note over MerkleHelper: Includes Aave V3, LayerZero,<br/>Native wrapping
    MerkleHelper-->>DeployScript: "Return Merkle root & tree"
    
    DeployScript->>Vault: "Update ManageRoot for LiquidETH"
    Vault->>Manager: "Verify new root authorization"
    Manager-->>Vault: "Root update authorized"
    
    DeployScript->>Vault: "Update ManageRoot for PlasmaUSD"
    Vault->>Manager: "Verify new root authorization"
    Manager-->>Vault: "Root update authorized"
    
    Note over User, LayerZero: Vaults now support cross-chain<br/>operations via LayerZero
    
    User->>Vault: "Execute cross-chain operation"
    Vault->>LayerZero: "Bridge assets to mainnet"
    LayerZero-->>Vault: "Bridging confirmed"
Loading

10 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

/**
* source .env && forge script script/MerkleRootCreation/Plasma/CreateLiquidETHMerkleRoot.s.sol --rpc-url $PLASMA_RPC_URL --gas-limit 1000000000000000000
*/
contract CreatePlasmaUSDMerkleRoot is Script, MerkleTreeHelper {
Copy link

Choose a reason for hiding this comment

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

logic: Contract name 'CreatePlasmaUSDMerkleRoot' doesn't match filename - should be 'CreateLiquidETHMerkleRoot' for LiquidETH strategy

Suggested change
contract CreatePlasmaUSDMerkleRoot is Script, MerkleTreeHelper {
contract CreateLiquidETHMerkleRoot is Script, MerkleTreeHelper {

Base automatically changed from deploy/liquidETH-plasma to dev/aug-2025 September 22, 2025 17:42
@Zokunei Zokunei merged commit bb67b1d into dev/aug-2025 Oct 3, 2025
1 check passed
@Zokunei Zokunei deleted the update/roots-on-plasma branch October 3, 2025 16:27
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.

4 participants