Actors
In the Oyster Serverless protocol, the following entities interact with each other as part of the smart contract workflow:
Users:
Users of the protocol are entities—either individuals or other smart contracts—that seek to execute computations in a serverless manner, whether for single instances or recurring subscriptions.
Executors:
Executors monitor requests submitted to the Jobs Contract on the Common Chain, carry out the computations, and submit the results back to the Jobs Contract.
Gateways:
Requests can originate from any chain supported by Oyster Serverless (referred to as the Request Chain). However, all bookkeeping to ensure Executors are compensated only if they complete their tasks on time, or are penalized otherwise, occurs on a Common Chain. Without a Common Chain, Executors would need to register individually on each Request Chain, requiring them to stake tokens separately for each chain, which would fragment their stake.
Gateways oversee the requests submitted to the Relay and Subscription Relay Contracts on the Request Chain, as well as the responses sent to the Jobs Contract on the Common Chain. Acting as a messaging bridge, they facilitate data transfer between the two chains. For subscription requests, Gateways also handle periodic triggers to initiate serverless requests on the Common Chain at the end of each user-specified interval. The Gateway software runs within a secure enclave, ensuring that only verified requests and responses are transmitted between chains.