# ERCx Overview

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

The Ethereum community has come up with different ERC (i.e., Ethereum Request for Comments) [token standards](https://eips.ethereum.org/erc) (e.g., [ERC-20](https://eips.ethereum.org/EIPS/eip-20), [ERC-721](https://eips.ethereum.org/EIPS/eip-721), and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155)) based on the different types of applications in the ecosystem. These are technical documents that specify essential aspects of a contract (management of transfers, delegation, etc.) for developers to adhere to when creating and deploying smart contracts in the Ethereum ecosystem. Contract developers should strive to follow the guidelines of ERC standards as they provide a reference frame during development.

But how confident can we be in the behavior of these contracts? Do they follow the standards? With the permissionless nature of blockchains, anyone can write and deploy smart contracts in blockchain ecosystems. However, smart contracts can be vulnerable to attacks especially in the DeFi space, e.g., the infamous [DAO attack](https://www.coindesk.com/learn/understanding-the-dao-attack/).

ERCx addresses these questions. ERCx is a platform that provides token investors, developers and auditors with independent and reliable information on the token properties. The rest of this page details this ambition and vision.

## **Why use ERCx?**

ERCx checks the *conformance* of a contract to [ERC (Ethereum Request for Comments) standards](https://eips.ethereum.org/erc). ERC standards exist for various sorts of tokens, fungible or not. ERC standards specify essential aspects of a contract (management of transfers, delegation, etc.). Contract developers should strive to follow the guidelines of ERC standards as they provide a reference frame during development.

<figure><img src="/files/8xwPkgV1hPH8viPrVKVv" alt=""><figcaption></figcaption></figure>

## **Benefits of ERCx**

Conformance to the related ERC standard is a good *indicator of the quality* of a contract. While conformance does not constitute quality assurance, non-conformance indicates that something is wrong. But conformance does not suffice, important desirable properties should be respected as history showed that not respecting these leads to problems. ERCx aims at helping the Ethereum community by providing the following benefits to:

* *Contract Developers*

  ERCx not only checks conformance before deployment (hence providing a sanity check) but also indicates satisfaction of important properties.
* *Token Investors*

  Non-conformant contracts should be avoided at all costs. For token platforms, ERCx helps quickly assess the quality of some tokens.
* *Contract/Token Auditors*

  ERCx provides a first round of assessment about the standard, allowing the expert review to focus on other potential bugs.

## **How does ERCx work?**

To check a given contract, ERCx uses *property tests*: for the contract under test (cut), we generate a [tailored test suite](https://docs.runtimeverification.com/ercx/ercx/ercx-test-suites), which is a collection of test cases. Each test case exercises one property prescribed by the underlying ERC standard. Our test suite relies on:

1. **property-based test cases** that precisely test the expected behavior and provide user feedback in case of errors; our tests can also be tailored to users' needs, and
2. the [Foundry](https://book.getfoundry.sh/) testing framework, a reliable and easy-to-setup tool that is widely used by developers and auditors.

By executing the ERCx test suite against a cut, we obtain a complete and precise diagnosis of the cut non-conformance or a conformance check. Passing (resp. failing) tests indicate that the contract respects (resp. violates) the associated property. For failing tests, we refer to the ERC standard, thus suggesting the required fixes. Overall, ERCx takes as input some contract description (which can be the source code, the deployment address or the bytecode, of the contract), generates and executes the tests, and finally produces a conformance report.

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

{% hint style="danger" %}

#### **Caution / Disclaimer**

**ERCx** concentrates on the technical aspects of a token. It employs specific testing over a finite set of input values, which does not encompass all possible inputs. Importantly, the findings presented are not financial analyses and should never be interpreted as financial advice. The evaluations conducted by **ERCx do not** equate to an audit.
{% endhint %}


---

# 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.runtimeverification.com/ercx/ercx/ercx-overview.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.
