# Architecture

**ERC20-to-ERC20**

The entire process of bridging ERC20 tokens are shown on the diagram below

![](https://3880137760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHVry7OTN1UZzjjhTeYXg%2Fuploads%2Fgit-blob-ab4ba346a114e739fb8edae3d3a21c989c857745%2FERC20-to-ERC20.png?alt=media)

Bridge has a couple roles including:

* Administrators
* Validators
* Users

## Administrators

Administrators on the bridge manage the bridge smart contracts, add or remove validators, set minimum required signatures from validators in order to relay a user's transactions.

Administrators also can upgrade contracts in case of vulnerabilities.

## Validators

Validatdors do not manage smart contracts in the bridge setup, they are managed by Administrators. Validators in the network are responsible for:

* providing 100% uptime to relay transactions
* listening for `UserRequestForSignature` events on the ThunderCore and signing an approval to relay assets on foreign side
* listening for `CollectedSignatures` events on the ThunderCore. Once enough signatures are collected, transferring all collected signatures to the foreign side.
* listening for `UserRequestForAffirmation` or Transfer (depending on the bridge mode) events on the foreign side and sending approval to the ThunderCore to relay assets from foreign network to ThunderCore.

## Users

Users send assets to the bridge contracts and receive corresponding assets in return.

* `NATIVE-TO-ERC` mode: Send native coins to the ThunderCore Bridge contract to receive ERC20 tokens from the foreign bridge contract, and send TT20 tokens to the foreign bridge contract to unlock TT from the ThunderCore bridge contract.
* `ERC-TO-NATIVE` mode: Send ERC20 tokens to the foreign bridge contract to receive TT from the ThunderCore Bridge contract, and send TT to the ThunderCore Bridge contract to unlock ERC20 tokens from the Foreign bridge contract.
* `ERC-TO-ERC` mode: Transfer ERC20 tokens to the foreign bridge contract to mint TT20 tokens on the ThunderCore network, and transfer TT20 tokens to the ThunderCore Bridge contract to unlock ERC20 tokens on the foreign network;

For more information please refer to [Thunder Bridge](https://github.com/thundercore/thunder_bridge), and [TokenBridge](https://docs.tokenbridge.net/about-tokenbridge/features)


---

# 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.developers.thundercore.com/product-protocol/bridges/architecture.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.
