SKALE Chains

A SKALE Chain is a Web3 Ethereum compatible elastic blockchain designed to make Web3 cloud computing easier for dApp developers. SKALE Chains provide EVM compute power, decentralized database storage, and other functionality to help not only power your dApps but allow them to scale in a cost-efficient manner.

What makes a SKALE Chain

SKALE Chains are powered by 16 out of more than 150 nodes run by over 45 SKALE Network validators. Each SKALE Chain is secured by Proof-of-Stake from the validator and delegator communities.

Every node in the SKALE Network dynamically supplies containerized Web3 compute resources that work in concert with other nodes. A SKALE Chain involves 16 randomly chosen nodes that each run a containerized network client with EVM (skaled). All 16 of these skaled containers broadcast network messages, share transactions and blocks, and other cryptographic data with each other. Think of these containers as powerful instances of an Ethereum network, receiving Web3 transactional messages from clients and end-users, organizing them into blocks using an ultra-fast mathematically proven consensus called Asynchronous Binary Byzantine Agreement.

How to work with a SKALE Chain

Each SKALE Chain powers dApps and their communities, providing dedicated Web3 compute resources to support dApp EVM execution and transactions from end-users.

Using SKALE is easy! Don’t worry about SGX enclaves, BLS threshold signatures, and Asynchronous Binary Byzantine Consensus - all this technology works under the hood to provide dApp developers with scalable and easy to run dApp-specific blockchains.

You use your SKALE Chain as you work with Ethereum. SKALE Chain owners have a set of 16 available endpoints to receive Web3 transactions and data. Plug an endpoint into your Web3 client or Truffle config, and you are using SKALE.

To work with other blockchains like Ethereum Testnets or Mainnet, you can use a bridge called Interchain Messaging Agent (IMA). IMA allows the transfer of ETH, ERC20, ERC721, ERC1155, and other arbitrary messages between Ethereum and your SKALE Chain.

How to stake/create a SKALE Chain

To stake a SKALE Chain, you stake SKALE tokens (SKL) into the Network over a length of time. Every month, a portion of your stake is distributed to the entire Network in return for receiving security and scalable resources powering your SKALE Chain. At the end of your stake, anyone can stake additional SKL tokens to extend the SKALE Chain’s life .

Creating a SKALE Chain requires SKL tokens and some ETH to fund the necessary transactions on Ethereum to create the SKALE Chain. When you create a SKALE Chain, you will fund some ETH to a special wallet. This wallet is used to reimburse transactions conducted by validator-nodes that form your SKALE Chain. Just as anyone can stake additional SKL to extend the SKALE Chain life, anyone with the wallet address can replenish ETH to fund additional SKALE Chain-related transactions. More on these transactions and special wallets here.

SKALE Chain Features

  • Decentralized and permissionless network where dApps run on chains supported by a randomly selected group of validator nodes, and nodes are swapped from time to time. The entire Network runs from the Ethereum Network to provide a permissionless way to access Web3 cloud resources.

  • Native cross-chain integration using Ethereum and SKALE IMA – allows users to move tokens, state, and messages between Ethereum and SKALE Chains, and between SKALE Chains. This bridge is secured by stake, secure enclaves, and BLS Threshold cryptography.

  • Web3 RPC API so existing dApps can migrate to SKALE Chains with minimal change and developers can use Ethereum tooling such as Truffle, Metamask, Remix, etc.

  • Customized for your dApp: configure Web3 cloud resources specific to your dApp and end-users' needs. This includes various SKALE Chain sizes to support different levels of compute and storage resources and custom options for DDoS protection, node rotation, and more.

  • Decentralized SKALE Chain Administration that can be operated by a single entity, community, or a DAO. This provides a range of decentralization options for funding, operating, and maintaining SKALE Chains.

SKALE Chain Differences from Ethereum

SKALE Chains operate like Ethereum, and there are a few other features and differences that make SKALE Chains even more powerful and suitable to run your dApp.

Gas-free transactions

Transactions on SKALE Chain run in a gas-free way. This means there is gas on SKALE Chains just like on Ethereum, but it’s powered by what’s called SKALE FUEL (sFUEL), which has no monetary value. In this way,executing transactions and state changes don’t incur costs, but require consuming gas in sFUEL, which is value-less. SKALE Chain gas provides a way to meter or limit transactions on the SKALE Chain to prevent malicious execution.

Empty Block Intervals

Your SKALE Chain will continue to mine blocks in the absence of transactions. Empty blocks are used to signal to the SKALE Network that your SKALE Chain is healthy and operational. The default empty block interval is 5 seconds. When transactions fill blocks, blocks are mined as fast as possible, up to sub-second blocks depending on validator-node performance.

Block Gas Limit

SKALE Chains have a block gas limit of 160 million.

Contract Code Size Limit

SKALE chains have a default code size limit of 32 kB, and are configurable at chain deployment to code size limits of 16, 32, 64, 128, 256, 512, 1024 kB and unlimited. (Ethereum has a contract code size limit of 24576 bytes.)

JSON-RPC Methods

SKALE Chains have a modified JSON-RPC interface compared to Geth Ethereum clients. In general, this shouldn’t raise any incompatibilities unless your dApp requires particular methods.

SKALE Chain Rotation

SKALE Chains run across 16 randomly chosen nodes. Your SKALE Chain can be configured to randomly swap out nodes for other nodes in the network. This helps reduce any potential collusion over time. To the SKALE Chain owner and end-users, this is a process that runs behind the scenes…​ The incoming node will gather all previous blocks, transactions, etc from the SKALE Chain in a catchup procedure, and the updated node set will form a new BLS public key through DKG, and all subsequent blocks will be signed with the new BLS public key.

Note that Chain rotation won’t be available until later in 2021.

Block Rotation

SKALE Chains don’t store a full history of all blocks. Each SKALE Chain is allocated an amount of storage on each node, and when this limit is reached, older blocks are discarded to ensure SKALE chains and Nodes don’t run out of space. For dApps that need access to older blocks, you can retrieve snapshots from your SKALE Chain and store them in Filestorage or third-party services such as Arweave.

Snapshotting

To support rotation, SKALE Chains create regular Btrfs snapshots.

DDoS Protection

Besides limiting the gas consumption rate on SKALE Chains, each chain also comes with a configurable DDOS protection system that allows the Chain to detect peak (per second) and long load (per minute) JSON-RPC calls and WS/WSS connections. The protection enables the chain to survive in high load situations by banning caller origins for a preset number of seconds.

An example configuration is:

 "unddos": {
        "origins": [
            {
                "origin": [ "192.168.1.1", "127.0.0.*", "::1" ],
                "ban_lengthy": 0,
                "ban_peak": 0,
                "max_calls_per_minute": 1000000000,
                "max_calls_per_second": 1000000000,
                "max_ws_conn": 65535
            },
            {
                "origin": [ "*" ],
                "ban_lengthy": 120,
                "ban_peak": 15,
                "max_calls_per_minute": 5000,
                "max_calls_per_second": 1500,
                "max_ws_conn": 20
            }
        ]
    },

The first "origins" block configures allowed unlimited load from specified IP origins. The second origins block configures all call origins allowed, but allow 1500 JSON-RPC calls per second and 5000 calls per minute. If the calls exceed the per second limit, "ban_peak" bans the caller for 15 seconds. If the calls exceed the per minute limit, "ban_lengthy" bans the caller for 120 seconds. And finally, "max_ws_conn" allows for 20 concurrent connections from a single IP.

The configuration settings can be expanded to limit specific JSON-RPC calls, like eth_blockNumber. For example:

{
  "origins": [
    {
      "ban_lengthy": 120,
      "ban_peak": 15,
      "custom_method_settings": {
        "eth_blockNumber": {
          "max_calls_per_minute": 150000,
          "max_calls_per_second": 5000
        }
      },
      "max_calls_per_minute": 15000,
      "max_calls_per_second": 500,
      "max_ws_conn": 50,
      "origin": [
        "*"
      ]
    }
  ]
}

And DDoS protection can be completely disabled with the following config:

 "unddos": {
        "enabled": false,
 }