Relay Server
The role and mechanism of the relay server
The relay server is implemented as a standard RESTful API, as a serverless application on AWS.
Users produce a transaction signature using their wallet; the relay server verifies that signature and, if the transaction is legitimate, issues the transaction on the user’s behalf.
Covering Gas Fees
In a typical Web3 application, there is no need to place a relay server between the client and the smart contracts to issue transactions on users’ behalf. However, for ordinary users, it must be said that the concept of gas fees on the blockchain, and obtaining tokens such as POL (formerly MATIC) used on Polygon or Astar used on Astar Network, is quite difficult.
To solve this problem, T&T adopts a method in which transactions are issued via the relay server and T&T bears the gas fees.
Centralized Relay
T&T’s relay server uses the Centralized Relay method, so from the user’s perspective, it is not strictly self-evident before a transaction is executed what transaction will be executed. It is possible to verify it after execution, but by trusting T&T, users are entrusting their operations on the world to the relay server.
In the future, we are considering moving to a Decentralized Relay method to decentralize this centralized mechanism.
Key Management for the EOA Used by the Relay Server
The private key of the wallet account used by the relay server is stored as an asymmetric key in AWS KMS and cannot be leaked.