> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-ko/sdk7/blockchain/second-layer.md).

# 2계층

씬에서 Polygon의 사이드체인을 사용하여 훨씬 더 빠르고 저렴한 블록체인 트랜잭션을 가능하게 합니다.

## 레이어 2 솔루션 소개

블록체인에 영향을 미치는 모든 트랜잭션은 완료되기까지 시간이 걸리고 가스 비용이 듭니다. 이 두 가지는 블록체인 게임의 대중화를 가로막는 요인입니다. 플레이어는 보통 자신의 행동이 반영될 때까지 오래 기다릴 인내심이 없고, 게임을 하면서 여러 트랜잭션에 비용을 지불할 의사도 없기 때문입니다.

흔히 사용하는 해결 방법은 게임플레이의 대부분을 오프체인에서 진행하고, 게임 아이템 획득이나 최고 점수 등록과 같은 주요 이벤트에만 블록체인 트랜잭션을 수행하는 것입니다.

하지만 블록체인에 내재된 다른 확장성 문제뿐 아니라 이러한 한계를 극복하는 또 다른 방법은 *레이어 2* 블록체인, 즉 *사이드체인*.

을 이용하는 것입니다. 레이어 2는 탈중앙화 앱과 메인 체인 사이에서 중개자 역할을 하는 또 다른 블록체인입니다. 이 레이어는 더 가볍기 때문에 응답 속도가 빠르고 가스 비용도 훨씬 저렴합니다.

트랜잭션을 메인 체인에 직접 기록하는 대신 사이드체인에서 처리한 다음, 사이드체인이 이러한 변경 사항을 메인 체인과 동기화합니다.

사이드체인은 노드 수가 적은 소규모 네트워크이므로 응답 속도가 빠릅니다. 레이어 2에서 수행되는 트랜잭션은 처음에는 보안성이 낮지만, 나중에 묶음 단위로 메인 체인에 기록되며 메인 체인의 모든 보안 검사를 적용할 수 있습니다.

또한 사이드체인은 메인 체인과 동기화할 때 여러 트랜잭션을 하나로 묶으므로 개별 트랜잭션 비용을 크게 낮출 수 있습니다. 따라서 메인 체인에서 한 번의 트랜잭션에 지불해야 하는 가스를 수천 건의 트랜잭션에 나누어 부담할 수 있습니다.

또한 메인 체인과 동기화할 때 중복되는 여러 트랜잭션을 완전히 생략해 트랜잭션 비용을 더 줄일 수 있습니다. 예를 들어 Alice가 Bob에게 1 ETH를 보내고 Bob이 Carol에게 1 ETH를 보내는 경우, Alice가 Carol에게 직접 송금한 것으로 기록해 두 트랜잭션을 하나로 간소화할 수 있습니다.

Decentraland는 [Polygon](https://polygon.technology/)과 파트너십을 맺고 있습니다. Polygon은 Ethereum에서 자체 사이드체인을 제공합니다. 씬은 이 사이드체인을 사용해 빠르고 매우 저렴한 트랜잭션을 지원할 수 있습니다.

## Polygon 테스트넷 사용해 보기

Polygon의 Matic 테스트넷을 사용하려면 먼저 다음이 필요합니다.

* Sepolia 네트워크의 Ether. 다음과 같은 여러 외부 수도꼭지에서 무료로 받을 수 있습니다. [이 수도꼭지](https://www.alchemy.com/faucets/ethereum-sepolia).

그런 다음 Matic 테스트넷을 포함하도록 Metamask 계정을 구성해야 합니다.

설정 방법은 다음과 같습니다.

1. Metamask에서 현재 네트워크 이름을 클릭하고 드롭다운 하단의 *사용자 지정 RPC* 를 선택해 네트워크를 전환합니다.
2. 'Polygon Amoy Testnet'을 다음 항목의 값으로 입력합니다. *네트워크 이름*, [**https://rpc-amoy.polygon.technology**](https://rpc-amoy.polygon.technology) 을 다음 항목의 값으로 입력합니다. *새 RPC URL* 그리고 [**https://amoy.polygonscan.com**](https://amoy.polygonscan.com) 을 다음 항목의 값으로 입력합니다. *블록 탐색기 URL*항목에 입력합니다.  *기호* 에는 **POL**
3. 을 입력합니다. '저장'을 클릭하면 Metamask에 새 네트워크가 추가됩니다.

{% hint style="warning" %}
**📔 참고**: Polygon 설정 방법에 관한 자세한 내용은 Polygon의 [문서 페이지](https://docs.polygon.technology/)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-ko/sdk7/blockchain/second-layer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
