LayerZero Integration Patterns

Provide security patterns and audit checklists for LayerZero V2 integrations.

60|18|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/PurpleAILAB/Vigilo --skill layerzero-integration-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: LayerZero Integration Patterns
Source: https://github.com/PurpleAILAB/Vigilo/tree/main/packages/claude/skills/integration-patterns/layerzero
Command: npx skills add https://github.com/PurpleAILAB/Vigilo --skill layerzero-integration-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the critical security vulnerabilities that can arise when integrating with LayerZero, a popular cross-chain messaging protocol, ensuring secure and reliable communication between different blockchains.

Core Features & Use Cases

  • OApp Security Patterns: Provides guidance on securing Omnichain Applications (OApps), including essential peer and chain validation checks within the _lzReceive function.
  • OFT Security Patterns: Details how to secure Omnichain Fungible Tokens (OFTs), focusing on slippage protection and correct decimal handling.
  • Peer Configuration & Compose Security: Offers best practices for setting up trusted peers and validating compose messages to prevent injection attacks.
  • Gas & Options Security: Explains how to correctly configure gas limits and options to ensure successful message delivery.
  • Use Case: An auditor can use this skill to quickly identify common misconfigurations in a smart contract that utilizes LayerZero, such as missing peer validation, which could lead to message forgery.

Quick Start

Review the OApp security patterns to ensure peer validation is correctly implemented in the _lzReceive function.

Frequently Asked Questions about LayerZero Integration Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure LayerZero V2 OApp peer validation in _lzReceive?

Securing LayerZero V2 OApp peer validation involves implementing essential peer and chain validation checks within the `_lzReceive` function to prevent message forgery. This Skill provides specific security patterns and audit checklists for correct peer configuration.

What security checks are needed for LayerZero OFT integrations?

LayerZero OFT security patterns require checks for slippage protection and correct decimal handling to secure Omnichain Fungible Tokens. This Skill details how to audit these specific configurations to ensure reliable cross-chain token transfers.

How does compose message validation prevent LayerZero cross-chain injection attacks?

Compose message validation prevents LayerZero cross-chain injection attacks by verifying the integrity of composed messages before execution. This Skill offers best practices for validating compose messages alongside trusted peer configuration.

How do I configure executor gas limits for LayerZero V2 messaging?

Configuring executor gas limits for LayerZero V2 messaging requires setting sufficient gas options to ensure successful message delivery. This Skill explains how to correctly configure gas limits to avoid message delivery failures caused by insufficient executor gas.

What are common vulnerabilities when auditing LayerZero smart contracts?

Common vulnerabilities when auditing LayerZero smart contracts include missing peer checks, incorrect peer encoding, lack of compose validation, and insufficient executor gas. This Skill provides an audit checklist to quickly identify these critical misconfigurations.

Can I use this Skill to audit cross-chain OApp contracts for missing peer checks?

Yes, you can use this Skill to audit cross-chain OApp contracts for missing peer checks. It provides targeted security patterns to identify misconfigurations in peer validation, which could otherwise lead to message forgery.