July 29, 2020
The SKALE Mainnet – Details on the Phase 1 Launch and the Set of Smart Contracts that Run on the Ethereum Mainnet
This article gives an overview of the SKALE smart contracts that run on the public Ethereum mainnet and manage the network. The set consists of over 25 contracts which controls network functions such as chain creation, network monitoring, validator registration, node selection and rotation, staking, bounty payment, slashing, and more. This article is a guide to these Ethereum mainnet contracts and will be updated with new addresses as the new parts of the protocol get deployed.
The SKALE Network is based on the Ethereum Virtual Machine (EVM). It is not only compatible and interoperable with Ethereum, but it’s operational management and security model is rooted directly into the Ethereum mainnet via this extensive set of smart contracts.
The SKALE Mainnet went live on June 30, 2020 in restricted mode. (The announcement can be found here.) This launch is the first of three (3) network launch phases. The purpose of the Phase 1 Mainnet is to support the initial strengthening of the security of the network. The network will be further hardened and decentralized throughout Phase 2.
Participation in Phase 1 is restricted to validators who have gone through an onboarding process and participated in the incentivised Testnet. (New validators will be admitted in Phase 3.) Also note that token operations – such as token issuance, transfers, or bounty payout – as well as SKALE chain operations are not active in Phase 1.
Smart Contracts Available in Phase 1 of the SKALE Mainnet
Phase 1 of the SKALE Mainnet has a large set of smart contracts active and operational and running on the Ethereum mainnet. This phase of the SKALE Mainnet is primarily to provide ways for developers, validators, and others to inspect the contracts and see how the network works. SKALE Chains is not active as yet and so the chain related activities are not operational.
When chain creation and other operations are activated, developers will be able to create SKALE Chains using an Ethereum Mainnet-based contract. Once created, developers and others will be able to access these chains directly via RPC calls to the skaled process, (This process is the SKALE Daemon running on the network nodes.) Token operations are also not active in Phase 1 of the Mainnet.
Phase 1 of the SKALE Mainnet has the following Ethereum mainnet contracts areas available and running:
- SKALE Manager
- Validator Services
- Node Operations (Restricted Set)
- Network Monitoring
In these contracts, you can see transactions and events, including validator and node registrations along with the creation of one or more node monitoring groups.
GitHub Link: https://github.com/skalenetwork/skale-manager
How the SKALE Manager Works
The SKALE Network is supported by a large pool of validator nodes, all running concurrently and independently, validating transactions within the SKALE chains they are overseeing. These nodes all make use of a unique set of SKALE smart contracts that run on the Ethereum mainnet. These smart contracts are where the SKALE token lives, where inflation happens, and where rewards get disbursed to the node validators. These smart contracts are also where the analysis of the network takes place and where corrective actions are taken if there is bad behavior by one or more nodes.
The SKALE Manager is the component that houses all the SKALE smart contracts that run on the Ethereum mainnet. It houses a large number of contacts that each perform unique operations on behalf of network participants whether it be dapps, validators, chain sponsors, token holders, delegators, and other parties operating within the network.
It’s important to emphasize that whereas custody may be taking place in a SKALE sidechain, the security for the SKALE Network is rooted in the Ethereum mainnet. The stake from the validators, the payments from developers, and the token inflation – all of it lives in the Ethereum mainnet and all of it is controlled by the smart contracts within the SKALE Manager that work in unison with each SKALE Node.
This approach is different from other Layer 2 models that attempt to use mainnet interactions to run verification and/or fraud proofs. SKALE uses the Ethereum mainnet for staking and for other mechanistic operations in a way that is better attuned for the creation of a robust and trustworthy network. (Note that SKALE will also support BLS Rollups for use cases that require full reliance on Mainnet custody.)
SKALE smart contracts run on the Ethereum Network and manage operations of the network, providing the security guarantees of a Layer 1 while allowing the use of resources in a more efficient and versatile way.
Contracts in the SKALE Manager that Run on the Ethereum Mainnet
SKALE Manager and Contract Manager
The skale_manager contract is the main contract for this set of contracts and handles several core operations of the network including node creation, bounty creation, and certain networking monitoring functions. The contract_manager contract provides the upgrade path for the network contracts. It contains current mapping from contract IDs (in the form of human-readable strings) to addresses.
- "skale_manager": "0x8b32F750966273cb6D804C02360F3E2743E2B511"
- "contract_manager": "0xC04A10Fd5e6513242558f47331568aBD6185a310"
Validator Services and Delegation Operations
The validator services contract handles all validator operations including registration, node management, validator-specific delegation parameters, and more. Validators register an address, and use this address to accept delegations and register nodes.
The delegator controller contract performs all delegation functions including delegation requests, undelegation, slashing, and more. Delegators and validators may both perform delegations. Validators who perform delegations to themselves are effectively self-delegating or self-bonding. This group of contracts also manages distribution of SKALE chain fees and bounty rewards received by validators.
- "validator_service": "0x840C8122433A5AA7ad60C1Bcdc36AB9DcCF761a5"
- "delegation_controller": "0x06dD71dAb27C1A3e0B172d53735f00Bf1a66Eb79"
- "delegation_period_manager": "0x54a663E39621D2E644F6B9b6966CDf66db973ab3"
- "distributor": "0x2a42Ccca55FdE8a9CA2D7f3C66fcddE99B4baB90"
- "punisher": "0xbcA0eCdD44203DE76AF389d5F9931015529b7F1E",
- "token_state": "0x4eE5F270572285776814e32952446e9B7Ee15C86"
- "token_launch_locker": "0x86F37Bb8245b71B959da5bDe3fec57Cb2a09545D"
- "token_launch_manager": "0x96aA945360B76e18ea5a1cFf3Ebd9b5B8ffa518E"
These contracts manage node registration, node groupings and rotations, and other node operations.
- "nodes": "0xD489665414D051336CE2F2C6e4184De0409e40ba",
- "node_rotation": "0xEC4EA4802Cb323645B87441AEB5622c800d72CCd",
- "skale_verifier": "0x32F50e2a898F14687f2a714D8b2D405317eB4641"
The following contracts handle cryptographic operations for digital key generation and storage along with BLS threshold signature operations.
- "skale_d_k_g": "0xfcc84F7b6d88d671C6a1841549c0b2E70110884f"
- "key_storage": "0x921a97c815E4E7508D1aD639b56A21E942a3a152"
- "decryption": "0x9257B149889A76c7A86BFfA5820f06FaBca3a9a1"
- "e_c_d_h": "0x1A77D7617f919e20F8E0fA98A292DEAF1072b77E"
Decentralized Node Monitoring
The monitors contract contains data structures and functions for handling the network monitoring . Each node in the network is continuously monitoring a random set of 24 nodes, gathering data and pulling log files from the other nodes. The node core will score each of the other nodes, looking at uptime, latency, performance and other metrics and then basing the score on whether certain thresholds are met or not. This is called the SKALE SLA function.
Nodes submit their metrics to a contract on the mainnet which blends, processes, and aggregates them to get a clear picture of network and node health. If a node is deemed to have performed well, it gets to participate in the award from the bounty pool. If a node performs poorly or acts maliciously, it gets flagged and is pulled from the network. In the case of the latter event i.e. suspicions of cheating, indications of having been hacked, or engagement in other malicious acts, a review process will be initiated which could end up with node stake getting slashed.
- "monitors": "0xa801F37136A1588075069D9988D4dc2D5167f7b7",
Constants, Tables, and Helpers
The constants_holder contract contains constants and common variables for Skale Manager system. Variables include nodes in a SKALE Chain (16), number of nodes in a monitoring set (24), node reward period, allowable latency, and more. The slashting_table contract manages slashing conditions and penalties.
- "constants_holder": "0x3d30A62AceEB6720312c3318D28620194e749e38"
- "slashing_table": "0x1a7bB775611b58375a3177Dcf3D8E4f7F6d2ed4B"
- "time_helpers": "0x05946b1b80ce4DE235350d8955c5c751860D5399"
- "bounty": "0x9E50E47cC08535Ee61AE47aCFEA20abb1925Bd4C"
Skale Token (Phase 2)
Derived from 777 security and re-entrancy issues - eliminated security issues - added 3 functions - locked/slashed/delegated (777+). Burned out known security issues and added in delegation capabilities.
Enhanced 777 Token contract.
- "skale_token": "0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7"
SKALE Chains (Phase 2)
- "schains": "0x0fCa003F483313869ee54e86B281348980B4cbf6"
- "schains_internal": "0x836Df73065Cb143bdDF3106e46783d43C12C6012"
- "pricing": "0x39c289a3EF68127C272dE21F3db67B0CDeCDFEE1"
What’s unique [Chadwick]
Phase 1 Mainnet (Live June 30, 2020)
The Phase 1 Mainnet has a rich set of network capabilities but is restricted in some areas of functionality. Notable elements that are not operational include validator staking, token operations, and creation or provisioning of SKALE chains.
Phase 2 Mainnet (Early Q3 Target)
The Phase 2 Mainnet will have all Phase 1 functionality along with validator staking and bounty payouts. Some token operations will be enabled including delegation, network fees payments, and bounty payments. Token transfers and exchange listings, however, will be inactive for a three-month period following the Phase 2 launch. Validators will earn fees and bounties, delegators can receive bounties but there will be a lock on token transfers until the three-month window ends. SKALE chain operations will also be enabled as part of this phase.
Phase 3 Mainnet (Three Months After Phase 2 Launch)
Three months after the Phase 2 Launch, network-based token restrictions will come off the network and unlocked tokens can be transferred. (Proof-of-use token holder locks will remain in place until their specific 90-day durations expire.)
- ConsenSys will announce the date their platform will be ready which is a requirement for initiating Phase 2.
- Registration and details on the SKALE Token launch can be found here: https://activate.codefi.network/
Smart Contract Address List
Note that certain smart contracts may be updated during this multi-phase launch of the SKALE Mainnet. As such, please do not be surprised if one or more contract addresses change from time to time.