# Audits & Security

## First, why two repositories?

Dolomite splits its smart contract source code between two repositories for a few reasons:

* The Core repository was originally made by the dYdX team and uses old development practices and an older version of Solidity. We wanted to change as little as possible of the architecture of this repository because it worked exceptionally well and demonstrated its security
* The Core repository is an encapsulation of the core protocol's immutability. Generally, this repository won't change
* Testing in the Core repository revolves around unit tests, whereas the Modules repository enables more comprehensive testing with end-to-end integration testing by forking any live network

## Dolomite Margin - Core

The `Dolomite Margin Core` [smart contracts](https://github.com/dolomite-exchange/dolomite-margin) were audited independently at various points in their lifecycle by [Open Zeppelin](https://www.openzeppelin.com/), Bramah Systems, [SECBIT Labs](https://secbit.io/) and most-recently by [Cyfrin](https://www.cyfrin.io/).

The Cyfrin audit report covers the most recent suite of updates to the smart contracts. The SECBIT audit was conducted prior to launch of Dolomite on Arbitrum One. The Zeppelin Solutions and Bramah Systems audit reports cover the original version of the smart contracts that was created by dYdX (when the protocol was called Solo Margin).

* [**Cyfrin Audit Report**](https://github.com/dolomite-exchange/dolomite-margin/blob/master/docs/Dolomite%20Margin%20-%20Cyfrin%20-%202023-08-23.pdf)
* [**SECBIT Labs Audit Report**](https://github.com/dolomite-exchange/dolomite-margin/blob/master/docs/Dolomite%20Margin%20-%20SECBIT%20-%202021-08-02.pdf)
* [Open Zeppelin **Audit Report**](https://blog.openzeppelin.com/solo-margin-protocol-audit-30ac2aaf6b10)
* [**Bramah Systems Audit Report**](https://github.com/dolomite-exchange/dolomite-margin/blob/master/docs/dYdX%20Audit%20Report%20Bramah%20Systems.pdf)

## Dolomite Margin - Modules

The `DolomiteMargin Modules` [smart contracts](https://github.com/dolomite-exchange/dolomite-margin-modules) are were audited by [Zokyo](https://www.zokyo.io/) and [Guardian Audits](https://guardianaudits.com/).  Please be aware that this repository undergoes active development and the scope (and smart contracts) covered by each audit is different.&#x20;

* [Zokyo Audit Report](https://github.com/dolomite-exchange/dolomite-margin-modules/blob/master/docs/Dolomite%20Protocol%20Modules%20-%20GLP%20%26%20Isolation%20Mode%20Report%20-%20Zokyo%20-%202023-04-19.pdf)
* [Guardian Audits Report](https://github.com/GuardianAudits/Audits/blob/main/Dolomite/2024-01-11_Dolomite.pdf)
* [Cyfrin Audit Report](https://github.com/Cyfrin/cyfrin-audit-reports/blob/main/reports/2025-04-24-cyfrin-dolomite-POLVaults-v2.0.pdf)

This repository will contain most active development, since it's where the protocol performs its integrations and creates new features that sit atop the Core's immutable infrastructure.

## Code Coverage <a href="#code-coverage" id="code-coverage"></a>

All production smart contracts are extremely well-tested and have 100% line, statement, and branch coverage.

* [Coverage Report](https://coveralls.io/github/dolomite-exchange/dolomite-margin?branch=master) for `Dolomite Margin - Core`
* [Coverage Report](https://coveralls.io/github/dolomite-exchange/dolomite-margin-modules?branch=master) for `Dolomite Margin - Modules`


---

# 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.dolomite.io/audits-and-security.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.
