Audit of transactions via GTON relay token
In order to increase the level of security and transparency of cross-chain transactions that use GTON as a relay token, we propose to use oracle-based external verification and registration of relay contract calls.
Sidenote. This approach is implemented with the help of SuSy, which is being extended to serve as a full-fledged bridge and oracle network. SuSy is transitioning to a fully blockchain-agnostic system that supports communication of blockchains with the outside world via oracles and cross-chain communication between each other. The evolution of SuSy will allow for the creation of more reliable, fast gateways and multichain applications, as well as provide a solution to scalability challenges in the multichain arena. For more updates, follow the SuSy account on Twitter.
Generally speaking, the transfer of tokens from one network to another occurs according to the following scheme:
- Locking tokens in the source network
- Verifying of the lock status using the SuSy network of oracles
- Transfer of tokens in the recipient’s network
Tokens are locked when the Lock method of the Relay smart contract is called. Transfer in the destination network occurs when the RouteValue and AttachValue of the Relay smart contract in the source network are called.
To improve the security and reliability of transfers through the SuSy Network and the Relay Contract, we intend to use Chainlink oracles. Each Oracle runs on a separate server and consists of the following elements:
- Chainlink Node
- External initiatior
- Auditor smart contract: https://github.com/Graviton-One/susy-chainlink-auditor/blob/main/susy-external-initiator/contracts/auditor.sol
In this system, a Chainlink node responds to the events of the External initiator and writes the received data into the Auditor smart contract.
External initiator reacts to AttachValue and RouteValue events in the destination network, and with the depth of search of N blocks (determined for each network individually) it finds the initiating Lock transaction and generates the following Swap data structure:
This data structure encompasses all necessary information about a transfer of tokens between blockchains.
The Auditor smart contract collects information about all executed cross-chain transfers.
Thus, through integrating a network of Chainlink oracles, it becomes possible to provide decentralized audit and registration of transactions through the SuSy Network using a Relay token.
To find out more, please see the specification: https://github.com/Graviton-One/susy-chainlink-auditor