# CrossCurve SuperDVN

## Overview

**CrossCurve SuperDVN** is a verification module (**DVN**, **Decentralized Verification Network**) compatible with the **LayerZero** [**DVN** **standard**](https://medium.com/layerzero-official/layerzero-v2-explaining-dvns-02e08cce4e80). It leverages the **CrossCurve Consensus Bridge** as its internal mechanism for cross-chain message verification and transmission.

**SuperDVN** serves as a sovereign data verification layer for cross-chain applications, providing a decentralized, secure, and resilient environment for communication between blockchains.

## Architecture

**LayerZero** uses **DVNs** to achieve decentralized verification of cross-chain message transfers. However, ensuring robust security requires two or more independent **DVNs**.

For developers, **SuperDVN** appears as a single **DVN**, but internally it contains a consensus layer composed of multiple messaging protocols, combining their verification capabilities for enhanced reliability and trustlessness.

<figure><img src="/files/x6dXb6OPlMZ970dALdhc" alt=""><figcaption></figcaption></figure>

#### Message Flow:

* The **OApp** application sends a message on the source network to the **LayerZero** [**Endpoint contract**](https://docs.layerzero.network/v2/concepts/protocol/layerzero-endpoint).
* The **LayerZero protocol** processes the message in its standard way and forwards it for verification to the **CrossCurve DVN** contract.
* The **CrossCurve DVN** prepares and sends the verification data to the **CrossCurve Gatekeeper**.
* The **Gatekeeper** dispatches this data through multiple messaging protocols.
* Each protocol, following its standard cross-chain messaging procedure, independently delivers the data to the **CrossCurve Receiver** contract.
* The **Receiver** collects the incoming message instances and emits events upon receipt.
* The external service **CrossCurve Pusher** monitors these events. Once the original message and a sufficient number of verification confirmations are detected, it submits an execution transaction to the **CrossCurve Receiver** contract.
* Upon receiving the transaction from **CrossCurve Pusher**, the **Receiver** checks that the original message and all required protocol confirmations are present.
* If verification succeeds, the data is passed back to the **CrossCurve DVN**, which forwards the verification data to the **ReceiveLib contract** to complete the verification process and allow **LayerZero** to proceed with message delivery.

## Integration with LayerZero

**SuperDVN** is fully compliant with the **LayerZero** [**DVN Standard**](https://docs.layerzero.network/v2/concepts/modular-security/security-stack-dvns), which provides:

Ability to connect as a primary **DVN** for cross-chain messaging between networks using **LayerZero**.

Support for custom **DVN**, allowing **SuperDVN** to be used for specific applications.

Compatibility with the **LayerZero ecosystem** without the need to modify smart contracts.

## Supported Protocols

**SuperDVN** leverages **CrossCurve Consensus Bridge** to enhance verification security.

Currently, the **Consensus Bridge** supports the following messaging protocols:

* **CrossCurve Oracle Network**
* [**LayerZero**](https://layerzero.network/)
* [**Axelar**](https://www.axelar.network/)
* [**Router Protocol**](https://www.routerprotocol.com/)

## Connection and Integration

To integrate **SuperDVN** into an **OApp**, you need to configure the **ULN** as specified in the **LayerZero** [**documentation**](https://docs.layerzero.network/v2/developers/evm/configuration/dvn-executor-config).

Here is an example configuration for using a single **SuperDVN**:

**SuperDVN.address** — the address of the **SuperDVN contract** on the **OApp network** that sends the message.

```solidity
const ulnConfig = {
    confirmations: 1,
    requiredDVNCount: 1,
    optionalDVNCount: 0,
    optionalDVNThreshold: 0,
    requiredDVNs: [SuperDVN.address],
    optionalDVNs: []
  };


  const encodedUlnConfig = ethers.utils.defaultAbiCoder.encode(
    ["tuple(uint64 confirmations, uint8 requiredDVNCount, uint8 optionalDVNCount, uint8 optionalDVNThreshold, address[] requiredDVNs, address[] optionalDVNs)"],
    [ulnConfig]
  );
```

## Contracts

To configure the **OApp**, use the following contract addresses:&#x20;

<table><thead><tr><th width="320">Network</th><th>CrossCurve SuperDVN Address</th></tr></thead><tbody><tr><td>Ethereum Sepolia Testnet</td><td><a href="https://sepolia.etherscan.io/address/0xA8e6c5932fc3F0BBd4532e911BC1e14db78F35e9#code">0xA8e6c5932fc3F0BBd4532e911BC1e14db78F35e9</a></td></tr><tr><td>Arbitrum Sepolia Testnet</td><td><a href="https://sepolia.arbiscan.io/address/0x2245F56774fa53966643bCeC94F916cBd16AA854#code">0x2245F56774fa53966643bCeC94F916cBd16AA854</a></td></tr></tbody></table>


---

# 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.crosscurve.fi/developer-documentation/guide-for-developers/crosscurve-superdvn.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.
