# 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](https://docs.nekodex.org/nekodex-playground/docs-for-devs/contracts/vault "mention") - holds user deposits and manages user funds

[order-gateway](https://docs.nekodex.org/nekodex-playground/docs-for-devs/contracts/order-gateway "mention") - receives and triggers orders

[clearinghouse](https://docs.nekodex.org/nekodex-playground/docs-for-devs/contracts/clearinghouse "mention") - 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`
