# Contracts

## Contracts & Addresses

#### re.al

<table><thead><tr><th width="283">Contract</th><th>Address</th></tr></thead><tbody><tr><td><code>API</code></td><td><code>0x42EfcE5C2DcCFD45aA441D9e57D8331382ee3725</code></td></tr><tr><td><code>DelegateFactory</code></td><td><code>0x4Bc715a61dF515944907C8173782ea83d196D0c9</code></td></tr><tr><td><code>RWAToken</code></td><td><code>0x4644066f535Ead0cde82D209dF78d94572fCbf14</code></td></tr><tr><td><code>RWAVotingEscrow</code></td><td><code>0xa7B4E29BdFf073641991b44B283FD77be9D7c0F4</code></td></tr><tr><td><code>RealReceiver</code></td><td><code>0x4CF64C6d51fFbF50A743C11fA800E40F7946Fc7f</code></td></tr><tr><td><code>RevenueDistributor</code></td><td><code>0x7a2E4F574C0c28D6641fE78197f1b460ce5E4f6C</code></td></tr><tr><td><code>RevenueStreamETH</code></td><td><code>0xf4e03D77700D42e13Cd98314C518f988Fd6e287a</code></td></tr><tr><td><code>RevenueStreamRWA</code></td><td><code>0x9D146A1C099adEE2444aFD629c04B4cbb5eE1539</code></td></tr><tr><td><code>RoyaltyHandler</code></td><td><code>0x164f1622207AaAbCd32839ED4B0d97c3387C2492</code></td></tr><tr><td><code>VotingEscrowVesting</code></td><td><code>0x2298963e41849a46A5b4aD199231edDD9ecce958</code></td></tr><tr><td><code>stRWA</code></td><td><code>0x154F5DB4950d2cd4a7Af425E11865215F90DdB07</code></td></tr><tr><td><code>stRWARebaseManager</code></td><td><code>0x33E10DD4794D0213cf65F2dde68dFd55f0D57baD</code></td></tr><tr><td><code>TokenSilo</code></td><td><code>0x1A9388A0fbA95A570583e036a3B1e6926613aE8d</code></td></tr></tbody></table>

#### Cross-Chain

<table data-header-hidden><thead><tr><th width="287"></th><th></th></tr></thead><tbody><tr><td><code>CrossChainMigrator (Polygon)</code></td><td><code>0x602B3fA8C9526dEA7FE44E99963faCF28DC67bbc</code></td></tr><tr><td><code>wstRWA (all non-re.al chains)</code></td><td><code>0x154F5DB4950d2cd4a7Af425E11865215F90DdB07</code></td></tr></tbody></table>

## CrossChainMigrator

#### Description

This contract inherits \`NonblockingLzAppUpgradeable\`. This contract handles migration of $TNGBL holders and 3,3+ NFT holders. This contract will spark a migration from Polygon to Tangible's new Real Chain. The migrators will receive the RWA or veRWA equivalent on Real Chain. This contract takes advantage of the LayerZero protocol to facilitate cross-chain messaging. When a migration occurs this contract will bottle up all the necessary information in the form of payload and send it to the local LayerZero endpoint.

#### Key Features

* On 3,3+ NFT migrations, the CrossChainMigrator contract will take the 3,3+ NFT into custody and send a message containing all of the current lock data to the RealReceiverNFT on Real Chain.
* Does support batch NFT migrations for any users who hold more than one 3,3+ NFT.
* On $TNGBL migrations, the CrossChainMigrator contract will burn the migrated $TNGBL tokens and send a message to the RealReceiverRWA on Real Chain to mint new tokens.

## RealReceiver

#### Description

This contract inherits \`NonblockingLzAppUpgradeable\` and facilitates the migration message from the source on Polygon to the migration method on the destination contract. This contract receives the cross-chain message in the form of a payload. The RealReceiver checks the payload to decide if the message is for a NFT or token migration and finishes the migration process by calling mint to the proper contract; Either VotingEscrowRWA or RWAToken.

#### Key Features

* Can receive a message from the local LayerZero endpoint.
* Will decode the received payload to decide which payload-type it was
* * NFT migration
  * Batch NFT migration
  * Or Token migration
* Will mint the proper token to the corresponding user.

## RevenueDistributor

#### Description

This is in charge of collecting all revenue. When it is called by a permissioned admin or gelato function, it will swap all revenue tokens to ETH then deposit all ETH into the RevenueStreamETH contract.

#### Key Features

* Collects all revenue in various revenue tokens
* When executed, will swap all revenue tokens to ETH before distributing it to the RevenueStreamETH contract where it can be claimed by stakeholders

## RevenueStreamETH

#### Description <a href="#description.3" id="description.3"></a>

This contract facilitates the distribution of claimable revenue to veRWA shareholders. This contract will facilitate the distribution of ETH revenue only.

#### Key Features <a href="#key-features.3" id="key-features.3"></a>

* Eligible stakeholders can claim their ETH revenue share from this contract.
* If revenue becomes expired, Tangible will send it back to the RevenueDistributor after 6 months of claimable revenue sitting.

## RWAToken

#### Description

ERC-20 contract for $RWA token. This contract facilitates any minting or transferring of $RWA tokens.

#### Key Features

* Implements a 5% tax on swaps.
* Allows an admin to blacklist a wallet from swapping tokens, or transferring tokens.
* Allows an admin to whitelist an address to exclude it from taxes.

## RoyaltyHandler <a href="#royaltyhandler" id="royaltyhandler"></a>

#### Description

Manages royalties accrued from $RWA swaps. The $RWA Token consists of a 5% swap tax. The taxed tokens will end up in this contract and distributed accordingly.

#### Key Features <a href="#key-features.5" id="key-features.5"></a>

* Royalties are distributed asynchronously to the following endeavors.
  * 40% of the RWA balance in the RoyaltyHandler will be burned
  * 40% of the RWA balance in the RoyaltyHandler will be used for revenue share and sent to the RevenueDistributor
  * 20% will be deposited into an RWA/WETH ALM contract for liquidity rebalancing
    * The LP tokens received from this deposit will be staked
* Distribute method to distribute royalties to the pre-determined places, mentioned above. This method is permissionless
* Allows an admin to update the % distribution

## RWAVotingEscrow

#### Description

An ERC-721 token contract that inherits VotesUpgradeable and assigns voting power based on the quantity of locked tokens and their vesting duration. It is designed to incentivize long-term holding and participation in governance. Locked token of choice is RWAToken.

#### Key Features

* ERC721 token representing locked tokens with vesting duration.
* Voting power calculation based on locked token amount and vesting duration.
* Functions to mint, burn, split, and merge locked token positions.
* Upgradeable contract design using UUPS pattern.

## VotingEscrowVesting

#### Description

The VotingEscrowVesting contract manages the vesting schedules for tokens locked in the VotingEscrow system. It allows users to deposit their VotingEscrow tokens, undergo a vesting period, and then either withdraw them back or claim the underlying locked tokens upon vesting completion.

#### Key Features

* Deposit VotingEscrow tokens to start their vesting schedule.
* Withdraw VotingEscrow tokens back to the depositor after the vesting period.
* Claim the underlying locked tokens upon vesting completion, burning the VotingEscrow token.
* Manage vesting schedules and track depositors' vested tokens.

## DelegateFactory

#### Description

This contract acts as a factory for creating Delegator contracts.

#### Key Features

* Uses the Upgradeable Beacon Proxy pattern.
* Deploys new delegator beacon proxies.
* Can delete delegators upon their expiration date

## Delegator

#### Description

This contract is used to delegate voting power of a single veRWA NFT to a specified account. This contract will be created by the DelegateFactory and will be assigned a delegatee. Upon creation, a veRWA NFT will be deposited and the voting power is delegated to the delegatee.

#### Key Features

* Holds a delegated NFT until revoked by the factory.


---

# 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.re.al/rwa-token/contracts.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.
