# Stacks

Granite is built on Stacks, a Bitcoin L2 that enables smart contract functionality while inheriting Bitcoin’s security. Applications in Stacks are written in Clarity, a smart contracting language specifically designed for high-stakes DeFi applications. Clarity prioritizes predictability and security through limited expressivity, which reduces the attack surface and prevents common smart contract vulnerabilities like re-entrancy attacks. It also includes post conditions and human-readable code on the blockchain, providing an additoinal layer of user protections.

Learn more about:

* [Stacks](https://stacks.co/)
* [Clarity](https://clarity-lang.org/)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.granite.world/introduction/stacks-sbtc-usdcx-aeusdc/stacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
