> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/contract-documentation/version-history/contracts-documentation-0.8.2.md).

# Contracts Documentation 0.8.2

Welcome to the Symmio smart contracts documentation.

## Overview

### Introduction <a href="#introduction" id="introduction"></a>

Symmetrical Contracts are a new financial trading primitive for trading derivatives permissionlessly and in a trustless manner on the blockchain, inspired by TradFi "Bilateral Agreements". Symmio uses **intent-centric** architecture combined with bilateral OTC to create truly permissionless digitized derivatives for the blockchain economy.

Intent-centric means, there is a `PartyA` that requests a trade and a `PartyB` that responds, a PartyA & B match results in both sides putting up collateral (hence bilateral) to execute the trade. The core contracts focus on the sending, receiving, locking and accepting of quotes, as well as the management of the provided collateral by both parties, additionally it also regulates how 3rd Party Liquidators can use Oracles to flag parties as liquidatable in case they fail to provide sufficient capital.

The core contracts do not provide a matching engine-- the matching of PartyA and PartyBs can be done via decentralized frontend applications or decentralized driver architecture, as external services. Matching can easily be facilitated by providing an array of whitelisted PartyBs in the quote.

This document is a technical guide for SYMM core contracts v.0.8.2, explaining the system's architecture, functionalities, and how to interact with it. It covers the intent-centric design, collateral management, and roles of oracles and liquidators, offering a comprehensive understanding of Symmio's permissionless derivatives on the blockchain.

### Setup Instructions <a href="#setup-instructions" id="setup-instructions"></a>

To setup the testing environment:

* Clone the [Github Repo](https://github.com/SYMM-IO/protocol-core).
* Copy the `.env.example` file, name it `.env`, and then provide the required variables in that .env file.
* Then you can run static tests by using `npx hardhat test`
* Also, there is a hardhat task for deploying the contracts. You can run it with `npx hardhat deploy:diamond`[<br>](https://symmdocs.gitbook.io/symm-smart-contracts-documentation-0.8.2/main-flow)


---

# 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.symm.io/contract-documentation/version-history/contracts-documentation-0.8.2.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.
