메시징 프로토콜
LayerZero, CCIP
메시징 프로토콜은(는) CoddyKit의 무료 Web3 & DApp Development Fundamentals 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Web3 & DApp Development Fundamentals 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Web3 & DApp Development Fundamentals 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Beyond Token Bridges
Moving tokens is just the start. Cross-chain messaging protocols let contracts on one chain send arbitrary data and trigger functions on another.
This generalizes bridging into full cross-chain application logic.
What Is a Messaging Protocol?
A messaging protocol is infrastructure that delivers a payload from a source-chain contract to a destination-chain contract, with some security guarantee about authenticity.
Developers build on top of it instead of operating their own validators.
Generic Message Passing
With generic message passing (GMP), you can send any encoded data — not just token amounts.
A single message can instruct a destination contract to mint, vote, update state, or call any function.
sendMessage(
destChainId,
destContract,
abi.encode("setReward", 500)
);LayerZero
LayerZero is a messaging protocol that uses two independent parties: an Oracle (delivers block headers) and a Relayer (delivers proofs).
A message is valid only if both agree, so security relies on these two being independent and not colluding.
LayerZero Endpoints
Apps integrate via on-chain endpoints. A contract calls send on its source endpoint and implements lzReceive to handle incoming messages.
function lzReceive(
uint16 srcChain,
bytes srcAddress,
uint64 nonce,
bytes payload
) external {
// handle the cross-chain message
}Chainlink CCIP
CCIP (Cross-Chain Interoperability Protocol) from Chainlink uses its decentralized oracle network to relay messages and tokens.
It adds a separate Risk Management Network that independently monitors for anomalies and can pause transfers.
CCIP Messages
CCIP messages can carry data, tokens, or both. Developers send an EVM2AnyMessage and pay fees in LINK or the native gas token.
Client.EVM2AnyMessage message =
Client.EVM2AnyMessage({
receiver: abi.encode(dest),
data: payload,
tokenAmounts: tokens,
feeToken: linkAddress
});Security Through Independence
Both LayerZero and CCIP aim to remove single points of failure by separating roles (oracle vs relayer, or DON vs risk network).
The security argument is that compromising the system requires colluding across independent components.
Idempotency and Replay Protection
Receiving contracts must guard against duplicate delivery. Messages carry a nonce so handlers can ensure each is processed exactly once.
This is the same replay-protection principle bridges need.
require(!seen[srcChain][nonce], "dup");
seen[srcChain][nonce] = true;Use Cases
Generic messaging enables powerful patterns:
- Cross-chain governance — vote on one chain, execute on another
- Omnichain tokens — one token usable everywhere
- Cross-chain DeFi — borrow on A, use on B
Putting It Together
Messaging protocols like LayerZero and CCIP deliver arbitrary cross-chain messages, enabling omnichain applications. They reduce trust by separating independent roles and require replay protection in receiving contracts.
This completes your cross-chain journey.
Quick Check
Test your messaging protocol knowledge.
Recap: Messaging Protocols
You learned that:
- Messaging protocols deliver arbitrary cross-chain data, not just tokens
- LayerZero uses independent oracle + relayer; apps implement
lzReceive - Chainlink CCIP uses a DON plus a risk-management network
- Receivers need nonce-based replay protection
- They enable omnichain governance, tokens, and DeFi
Course complete!
자주 묻는 질문
“메시징 프로토콜” 강의는 무료인가요?
네 — “메시징 프로토콜” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Web3 & DApp Development Fundamentals 강의 전체를 잠금 해제할 수 있습니다. Web3 & DApp Development Fundamentals 강의에는 총 4개의 강의가 포함되어 있습니다.
“메시징 프로토콜”에서 뭘 배우나요?
LayerZero, CCIP 브라우저에서 직접 실행하는 실습 코드로 Web3 & DApp Development Fundamentals을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Web3 & DApp Development Fundamentals을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Web3 & DApp Development Fundamentals은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“메시징 프로토콜” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Web3 & DApp Development Fundamentals 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Web3 & DApp Development Fundamentals 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.