id | title | slug | sidebar_position |
---|---|---|---|
blockchain |
Blockchain |
/fundamentals/blockchain |
7 |
Blockchain lies at the foundation of Super Protocol. It is a decentralized, trustless, transparent, and verifiable environment. Blockchain stores metadata with information about users, providers, offers, and orders. Moreover, it provides an infrastructure for smart contracts to orchestrate the work of all components, govern the system behavior, and process transactions.
Currently, Super Protocol uses the Polygon Amoy testnet. In the future, Super Protocol will support multiple blockchains simultaneously thorough a messaging mechanism.
The following smart contracts exist in Super Protocol:
- Basic smart contract with the system configuration
- Staking smart contract
- Provider registry smart contract
- TEE Offers smart contract
- Value Offers smart contract
- Orders smart contract
- ERC-20 smart contract.
Basic smart contract contains the system configuration and information on other smart contracts. This contract is necessary to set and update the system information and settings.
The smart contract contains the following records:
- Addresses of Super Protocol smart contracts:
- The latest version of the basic smart contract
- Provider smart contract
- TEE offer smart contract
- Value offer smart contract
- Order smart contract
- Token smart contract
- Offer parameters:
- Minimum balance of the provider's security deposit
- Value offer security deposit
- Penalty for not fulfilling a value offer
- Compute offer security deposit
- Penalty for not fulfilling a compute offer
- Reward per epoch (24 hours) for all compute resources
- Order parameters:
- Minimum order deposit
- Delay in days before a provider can withdraw the reward for a fulfilled offer.
Staking smart contract enables holding tokens for later profit. This functionality is currently unavailable.
The smart contract contains the following records:
- Name of the staker
- Sum of tokens staked
- Date when the tokens will be released and transferred to the main deposit.
Provider registry smart contract enables registration and management of providers in the system.
The smart contract contains the following records:
- Authority account address
- Action account address
- Token receiver account address
- Name
- Description
- Metadata.
TEE offer smart contract enables the creation and management of compute offers. Each compute offers represents a single confidential computing device.
The smart contract contains the following records:
- Authority account address of the offer provider
- Offer ID
- Offer name
- Offer description
- Type of the Trusted Execution Environment: CPU only or CPU+GPU
- Compute offer configuraion:
- Arrays of provided slots and options
- Conditions of use
- Price
- TEE confirmation block and TEE loader block
- Public key and algorithm to encrypt offer arguments.
Value offers smart contract enables the creation and management of value offers—solution, data, and storage offers. Providers can set the price, the minimum order deposit, and the restriction rules to govern what offers can and cannot do.
The smart contract contains the following records:
- Authority account address of the offer provider
- Offer ID
- Offer name and description
- Other metadata:
- Offer type: solution, data, or storage
- Offer group:
INPUT
,OUTPUT
, orPROCESSING
- Flag that indicates if orders that use this offer are cancelable
- Input and output data format
- Possible restrictions:
- Offer dependencies and restrictions
- List of customers allowed to use this offer
- Array of requrement slots
- Public key and algorithm to encrypt offer arguments.
Order smart contract enables creation of orders. The customer who creates an order must take into account all restrictions and requirements of all the selected offers. Additionally, they must pay a security deposit.
The smart contract determines the minimum deposit for the order based on the sum of minimum deposits of all suborders and the order minimum deposit set by the protocol, whatever is bigger.
The smart contract contains the following records:
- Customer account address
- Compute offer ID
- Order ID
- Lists of public and encrypted arguments
- Order status
- Price and deposits, may change during processing:
- Current order price
- Current amount of spent deposit
- Current amount of deposit spent on options
- Order result:
- Public key and algorithm to encrypt the order result
- Encrypted result.