# Contracts

## Contract addresses

Find a complete list of up to date contract addresses here:

{% embed url="<https://metadata.perp.exchange/lugia/optimism.json>" %}

## Contract descriptions

The main contracts users interact with are:

[Vault](/nekodex-playground/docs-for-devs/contracts/vault.md) - holds user deposits and manages user funds

[Order Gateway](/nekodex-playground/docs-for-devs/contracts/order-gateway.md) - receives and triggers orders

[Clearinghouse](/nekodex-playground/docs-for-devs/contracts/clearinghouse.md) - processes exchange functions such as open position, close position and liquidations, as well as handling accounting.

For other contracts, use the menu on the left.

## Metadata

Key metadata such as `marketID`, exchange contract addresses, market contract addresses, price feed contracts, etc. can be found here:

{% embed url="<https://metadata.perp.exchange/lugia/optimism.json>" %}

## Decimal usage

EVM Smart contracts do not recognize decimals. The general convention in Perp v3 contracts is all amounts use 18 decimal.

In cases where the native decimals of the token are used (e.g. USDT uses 6 decimals), the contract parameter will have XCD appended to it (cross to collateral decimal). E.g.&#x20;

* `amountXCD`
* `marginXCD`


---

# 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.nekodex.org/nekodex-playground/docs-for-devs/contracts.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.
