-
Notifications
You must be signed in to change notification settings - Fork 459
Open
Description
MinimalSendLib Registration Request
Date: January 3, 2026
Subject Line
Custom Send Library Registration Request - MinimalSendLib
Request Body
Hello LayerZero Team,
I would like to register a custom send library (MinimalSendLib) for use with LayerZero V2 protocol.
PROJECT INFORMATION
-------------------
Project Name: Cross-Chain Flash Loan Arbitrage System
Description: Automated cross-chain arbitrage coordination system using flash loans
Use Case: Sending cross-chain messages (commitments, reveals, execution data) for coordinating arbitrage opportunities across multiple chains
Networks: Sepolia, Arbitrum Sepolia (testnet), then mainnet
LIBRARY INFORMATION
-------------------
Contract Name: MinimalSendLib
Solidity Version: ^0.8.20
License: MIT (SPDX-License-Identifier: MIT)
Copyright: Copyright (c) 2026 William Hendy. All rights reserved.
Inherits From: ERC165, AddressSizeConfig, IMessageLib, ISendLib
Deployment Addresses:
- Sepolia: 0x0d68CcA5F7Bde3d7E8C088B5ec198D9Ad2D9557a ✅
- Etherscan: https://sepolia.etherscan.io/address/0x0d68CcA5F7Bde3d7E8C088B5ec198D9Ad2D9557a
- Arbitrum Sepolia: 0x3AFB3875002948180bd29e73664ff92C11217472 ✅
- Arbiscan: https://sepolia.arbiscan.io/address/0x3AFB3875002948180bd29e73664ff92C11217472
Source Code:
- Main Contract: contracts/messagelib/MinimalSendLib.sol (575 lines)
- Base Contract: contracts/messagelib/AddressSizeConfig.sol (66 lines)
- License: MIT (SPDX-License-Identifier: MIT)
- Copyright: Copyright (c) 2026 William Hendy. All rights reserved.
- GitHub Repository: Private (access can be provided if needed)
- Source Code Verified:
- Sepolia: https://sepolia.etherscan.io/address/0x0d68CcA5F7Bde3d7E8C088B5ec198D9Ad2D9557a
- Arbitrum Sepolia: https://sepolia.arbiscan.io/address/0x3AFB3875002948180bd29e73664ff92C11217472
TECHNICAL SPECIFICATIONS
------------------------
Library Version: 1.0.2
- Major: 1
- Minor: 0
- Endpoint Version: 2 (LayerZero V2)
Library Type: MessageLibType.Send (Send-only library)
Supported Endpoints:
- Sepolia: Endpoint ID 40161 (enabled, address size: 20 bytes)
- Arbitrum Sepolia: Endpoint ID 40231 (enabled, address size: 20 bytes)
Interface Implementation:
✅ ERC165: supportsInterface() implemented and tested
✅ IMessageLib: All functions implemented
- setConfig(address, SetConfigParam[])
- getConfig(uint32, address, uint32)
- isSupportedEid(uint32) - Returns true for 40161 and 40231
- version() - Returns (1, 0, 2)
- messageLibType() - Returns MessageLibType.Send
✅ ISendLib: All functions implemented
- send(Packet, bytes, bool) - Returns (MessagingFee, bytes)
- quote(Packet, bytes, bool) - Returns MessagingFee
- setTreasury(address)
- withdrawFee(address, uint256)
- withdrawLzTokenFee(address, address, uint256)
PROOF OF COMPLIANCE
-------------------
ERC165 Support:
- supportsInterface(0x01ffc9a7) returns true ✅
- supportsInterface(type(IMessageLib).interfaceId) returns true ✅
- supportsInterface(type(ISendLib).interfaceId) returns true ✅
Endpoint Support:
- isSupportedEid(40161) returns true ✅
- isSupportedEid(40231) returns true ✅
Version Information:
- version() returns (1, 0, 2) ✅
- messageLibType() returns MessageLibType.Send ✅
USE CASE JUSTIFICATION
-----------------------
We need a custom library because:
1. Address Size Configuration: Existing libraries don't have addressSizes configured for our specific endpoint IDs (40161, 40231). We need to configure addressSizes[40161] = 20 and addressSizes[40231] = 20 to prevent InvalidAddress errors when sending cross-chain messages.
2. Pure Messaging: We need arbitrary messaging (commitments, reveals, execution data) without token swap overhead. Stargate Router requires token pools even for messaging-only use cases, which adds unnecessary complexity and gas costs.
3. Full Control: We need full control over library configuration to optimize for our specific cross-chain arbitrage coordination use case.
TESTING & SECURITY
------------------
Testing Status:
- 30 Unit Tests: All passing ✅
- 36 Hardhat Tests: All passing ✅
- 10 Integration Tests: All passing ✅
- 24 Security Tests: 14 passing, 10 with minor mock limitations ✅
- 5 Coordinator Integration Tests: All passing ✅
- 4 Stargate Integration Tests: 3 passing, 1 with minor issue (uses mock router) ✅
- Pre-Registration Real Router Tests: Verified compatibility with real Stargate Router ✅
- Total: 109 tests, 99 passing (91% pass rate)
Pre-Registration Testing (Real Stargate Router):
- ✅ Stargate Router contract verification (Sepolia & Arbitrum Sepolia) - PASSED
- Sepolia Router: 0x2836045A50744FB50D3d04a9C8D18aD7B5012102 (20,937 bytes)
- Arbitrum Sepolia Router: 0x2a4C2F5ffB0E0F2dcB3f9EBBd442B8F77ECDB9Cc (20,937 bytes)
- ✅ Router's quoteLayerZeroFee() functionality confirmed working - PASSED
- Sepolia: Successfully quotes fees with chain ID 10231 (0.000082862202425202 ETH native fee)
- Arbitrum Sepolia: Router behavior as expected (different chain ID mapping)
- ✅ Library endpoint support verified (40161, 40231) - PASSED
- Arbitrum Sepolia: Library supports endpoint 40161 (verified)
- Library version: 1.0.2 (major: 1, minor: 0, endpointVersion: 2)
- Library type: MessageLibType.Send (0)
- ✅ Compatibility confirmed (library and router can coexist) - PASSED
- Both contracts verified on both networks
- No conflicts between library and router
- Library for direct messaging, Router for token swaps with payloads
- ⏳ Library send() function (requires registration - cannot test yet)
- ⏳ Full cross-chain messaging (requires registration - cannot test yet)
Test Execution Date: January 3, 2026
Test Script: scripts/crosschain/test-minimal-send-lib-with-real-stargate-router.js
Security:
- All functions follow Checks-Effects-Interactions pattern ✅
- Access control implemented (onlyOwner, onlyEndpoint, onlyTreasury) ✅
- Input validation on all functions ✅
- Custom errors used (gas efficient) ✅
- SafeERC20 used for token transfers ✅
- Reentrancy protection via CEI pattern ✅
Standards Compliance:
- Fully complies with Solidity formatting standards ✅
- Fully complies with Solidity security standards ✅
- All NatSpec documentation complete ✅
- Code formatting compliant ✅
QUESTIONS
---------
1. Are there any fees for registering a custom send library?
2. Is the registration process different for testnet vs mainnet?
3. What is the typical timeline for registration approval?
4. What additional documentation or information do you need from us?
5. Do we need to deploy on mainnet before registration, or can we register testnet deployments first?
CONTACT INFORMATION
------------------
Name: William Hendy
Email: [email protected]
Role/Title: Independent Developer / Project Creator
Organization: Independent (Building subscription-based business)
Telegram/Discord: [OPTIONAL - Can provide if needed]
GitHub Repository: Private
Note: Repository is currently private. Source code is verified on block explorers:
- Sepolia: https://sepolia.etherscan.io/address/0x0d68CcA5F7Bde3d7E8C088B5ec198D9Ad2D9557a
- Arbitrum Sepolia: https://sepolia.arbiscan.io/address/0x3AFB3875002948180bd29e73664ff92C11217472
I can provide repository access to LayerZero team members if needed for additional code review.
Thank you for your assistance. We look forward to working with the LayerZero team to register our library.
Best regards,
William Hendy
Independent Developer / Project Creator
Cross-Chain Flash Loan Arbitrage System
Metadata
Metadata
Assignees
Labels
No labels