RIF Relay - Architecture
The RIF Relay system is designed to achieve transaction sponsorship at a low cost. The cost of the relay service provided by the “sponsors” is agreed upon among the parties off-chain. The low cost of transactions on Rootstock (RSK) contributes to keeping overall service costs low as well.
The RIF Relay system is made up of various components, some of which are essential and others which are auxiliary.
An overview of this is as follows:
On-chain, the system cannot work without its Smart Contracts, which encompass Smart Wallets plus the Relay Hub and Verifiers.
Off-chain, at least one Relay Server is needed to interact with the contracts. Without a Relay Server, envelopes cannot be created and sent to the contracts.
Details for each of these components are expanded down below, as well as an introductory glossary.
Glossary
| Term | Description |
|---|---|
| Sponsor | A third party that pays the gas consumed by a sponsored transaction (see below) by submitting it to the blockchain. |
| Sponsored Transaction | A transaction sent by the requester (see below) through the Sponsor, this type of transaction aims to separate the gas payer from the sender of the transaction. |
| Requester | It’s an EOA (see below). The requester sends a sponsored transaction to the Sponsor. They do not pay the gas with native cryptocurrency but with an accepted token by the Sponsor, if they don’t subsidize it. |
| Recipient | An abbreviation for recipient contract. It’s the destination of the requester’s transaction. |
| Envelope | Using the “envelopes” analogy, it’s the transaction, (funded with native cryptocurrency as gas) sent by the Sponsor to the blockchain, that wraps the requester’s transaction payload (sponsored transaction). |
| RIF Relay | The entire system which allows the relay of sponsored transactions. |
| DoS | A Denial of Service is an information-security threat whose goal is to become a service unavailable. |
| DeFi | An acronym for Decentralized Finance, it’s a novel form for finance based in blockchain technology. |
| EOA | An Externally Owned Account (EOA) is an account managed with a key, which is capable of signing and sending transactions, and paying the cost for it. |
| Fee | Token amount that is being charged for each relayed transaction. |
| Revenue Sharing Model | A way to relay transactions so that fees are shared among multiple partners. |
| Fees Receiver | Is the designated Worker/Collector that will receive the fees |