Updated on Aug 31, 2020
What is the main goal of Gravity protocol? What problem does the protocol and the network solve in the Web3 industry?
Gravity is a blockchain-agnostic protocol that handles communication of blockchain networks with each other (interchain) and with the outside world (through data oracles). It is focused around interchain communication, establishing a solid foundation for the creation of gateways and cross-chain applications and providing a solution to blockchain scalability challenges through the mechanism of sidechains.
What does “blockchain agnostic” mean?
Being “blockchain-agnostic”, the Gravity protocol at its core does not discriminate between different blockchains. Among blockchains supported by Gravity, no blockchain takes priority over another blockchain in terms of functionality or implementation.
Is Gravity an open network for new node operators?
Yes. The network is open for new members to join, and its internal governance mechanics serve as protection from attacks and allow it to remain flexible and regularly updated to adapt to the variability of technology and market.
Are Waves, Ethereum, Tron or other supported blockchains the primary ones for Gravity?
In the Gravity protocol, there is no concept of the primary blockchain, meaning that all blockchains support all operations within Gravity.
How is Gravity different than popular interchain solutions such as Polka, Cosmos, Aion etc?
Although Gravity solves the same global challenge with interchain communication, the solution that we propose does not entail the creation of a new master blockchain with a new native token which other public blockchain networks are integrated with. The Gravity protocol is blockchain-agnostic in a sense that instead of creating a new tokenomics with a new token, the Gravity network works with the economies of the native tokens of public blockchains integrated into Gravity.
How is Gravity different than popular oracle and interchain solutions such as Band, Chainlink, Provable etc?
Similarly to the interchain problem, although Gravity solves the same global challenge with oracle data provision, the solution that we propose does not entail the creation of a new oracle network that delivers data provision services in return for a payment in a new token. Paying for Gravity oracles’ services is done in the native liquid tokens of public blockchains integrated with the Gravity network.
Unlike Chainlink oracles, the Gravity network can be viewed as a single self-governing decentralized oracle with free entry for new members, instead of a framework to create centralized oracles or a marketplace with a partnership of oracles without free entry.
Unlike Provable, the Gravity network is decentralized.
How is Gravity different than popular token gateway solutions such as RenVM, Bisq, Atomic Swaps etc?
The Gravity protocol is a more low-level protocol vs. the protocols that provide transfers, which means that it can give rise to different asset provision protocols on top of it, thereby opening larger opportunities for fully automated and decentralized gateway solutions.
The key differences between Gravity and other popular solutions for oracles and interoperability are presented in the table below:
A more in-depth comparison of different token gateway solutions can be found in this article about SuSy — a gateway protocol based on Gravity.
What makes the security/verifiability of the mechanism for transferring information to user smart contracts secure?
The authenticity of information transfer is achieved via the verification work done through a multisignature. When the oracle chosen to be the so-called Pulse leader collects all hashes and their signatures from the peers, reading them from the internal ledger, it performs a pulse transaction in the target chain by passing the hashes and signatures to the corresponding nebula contract. As part of the outgoing transaction verification, the pulse verification status, validity of hashes from the aggregated data and the data transmitted to the user contract, and the recipient itself, are verified. The typical rules of leader selection are based on PoA (proof of authority), i.e. the mod of block height rotation rule.
What types of data feeds and data sources are supported by Gravity?
Any open web service endpoint that serves JSON or XML can be used in Gravity if it is defined by specification and supported by an extractor. An example of a data feed would be a number of newly registered COVID-19 cases in the world per day, cryptocurrency prices, or external events with boolean outcomes (“happened”, “didn’t happen”).
Can I become a Gravity node operator?
A system smart contract, deployed in each of the supported blockchain networks, takes care of system interaction and deposit locking, registration of nodes and collection of Gravity node scores about each other. As a data provider, you can enter the network by locking a deposit for one year in any of the supported public host-chains in the native token of the selected blockchain and installing all necessary infrastructure on your servers (a node with extractors).
How significant is the amount of deposited funds?
The required deposit is going to be in the vicinity of ~1000–5000$ equivalent in any of the supported tokens of integrated chains.
Will I lose my locked deposit if the Gravity network recognizes me as malicious and disconnects me from participation in the data transfer activities?
In the case of malicious behavior of your node (i.e. if the data from it diverges greatly from the aggregate values, or if the node stops receiving and processing data feeds from its peers), your peers can set their peer rating to zero, which quickly shuts the node down to protect the Gravity network. If at the moment of exit the reputation level is zero, the deposit gets locked for one year after exit, otherwise one year after the registration.
How quickly is reputation earned?
For a long period after the start (>1 year), reputation will be increased manually by a DAO-like p2p score voting mechanics. This is necessary to prevent fraud attempts and perform a deeper research of potential automated reputation farming schemes.
Why do Gravity node operators need to lock a deposit?
In a trust-based system, the role of an oracle is critical and significant, and assumes a certain level of commitment on the part of data providers. Depositing tokens for a relatively long period of time can serve as confirmation of “good will” and is the first indicator of how trustworthy a new oracle is. Delaying the deposit lock for an extended period of time after the oracle voluntarily leaves the system is a security measure aimed at introducing complications for attacks such as the Sybil attack, which consists of registration and re-registration of a large number of nodes.
What is Gravity score for?
Gravity Score is a numerical representation of confidence level put into a Gravity node from its peer nodes, calculated on the basis of regular mutual evaluations of all nodes. The Gravity nodes evaluate each others’ performance and send their own confidence score for all other nodes of Gravity, which is then translated into the Gravity score of a particular node via the EigenTrust algorithm.
Do I have to make a list of oracles for my application as a user of Gravity?
Becoming a part of the data provision workflow, the user is not obligated to choose a specific oracle or their subset to trust. Instead, the entire data provision service of the Gravity network provides all necessary checks within itself to be ultimately trustful.
As a user, how can I get a less expensive data subscription option?
Gravity users can choose to use one of two options to pay for Gravity services: putting and maintaining a deposit above a certain threshold on a designated blockchain account, or paying a recurring subscription fee. Please note that different nebulae have different SLA and prices.
In the first case, a user can deposit tokens by calling the deposit method in NEBULA-SC. As long as the balance is sufficient, USER-SC will receive messages with data from Gravity oracles.
In the second case, the payment takes part alongside each execution of a user contract method (USER-SC) and is sent to the NEBULA-SC account. If payment is not received during this operation, the subscription is considered to be suspended and requires reactivation by the user.
How does shutdown of oracles happen when there is malicious activity?
When the data from some oracle diverges greatly from the aggregate values, or if the node stops receiving and processing data feeds from its peers, or if the node stops responding to any requests from the Gravity service, the scoring is automatically updated and decreased. In this case, the peers set their rating to zero, which guarantees a quick shutdown of the node to protect the Gravity network from malicious activity.
Can node operators customize the logic of data collection from external sources?
Extractors are services that request and process data feeds from external sources. One extractor corresponds to one data feed supported by the node but can use and combine multiple data sources. Datafeeds supported by a Gravity node can be described as a boilerplate source code or its implementations as a data extractor. Each extractor collects data in accordance with the specification for the required data. The specification defines: where to get data from (recommended sources or mandatory sources), how to process data points received from different sources (e.g. aggregate them as median, average or mode over a certain period of time), the format in which data will be delivered to customers in target blockchains. Each operator of a Gravity node can develop and use custom implementations according to the described specification. Development of the specification, documentation, or implementation of extractors are managed as part of open source development flow by Gravity developers.
As a user I don’t see the data feed that I need in the list of data feeds supported by Gravity. What should I do?
You should create a Nebula contract with a specification of data and ask providers to start serving this contract, or ask a provider to manage this whole process for you.
If I am a Gravity node operator with limited resources to support and monitor all Gravity data feeds, how do I work?
Nodes are not isomorphic, meaning that providers can freely choose to work in one or several target chains, or to implement extractors not for all possible data feeds, but only for their relevant subset.
As a Gravity node operator, do I need to have an account in each of the blockchains supported by Gravity?
Each node should have an associated account and public key in each of the supported target blockchains that it needs to serve.
As a user, how can I balance SLA vs price ratio for my application?
The variety of nebula contracts exists with different reputation thresholds, different SLAs and prices. This means that the Gravity network is flexible enough to suit anyone’s data provision needs.
As a user, is it true that data from Gravity becomes available for any contracts deployed on the target blockchain after getting into my application?
In order to monetise the work of oracles, verification of obtained data and its delivery to user smart contracts must be separated, and the data itself must be disclosed (decrypted) only at the time of delivery to the client.
The process of verifying the data without disclosing it in a target blockchain allows the data to be kept secret and disclosed only when delivered to the recipient, who has the right to determine its availability to other smart contracts in the blockchain. This solution increases the incentive for oracles to deliver data by safeguarding ways to receive rewards for data provision.
What is a target blockchain (target chain)?
Target blockchain is a supported blockchain network where data is written by nodes, that contains smart contracts to verify signatures and smart contracts of users who pay for data delivery.
Is the information about the internal log/history of a Gravity node public for external audit?
Yes. The information about communication of nodes between each other can be checked in the internal ledger.
As a user, do I need to verify the responses of Gravity oracles in my application and perform all necessary aggregation?
The user is not required to apply their own methods of data aggregation, as it can be executed automatically within the system, which can provide finalized and ready-to-use numbers or string values from a data feed to user applications (USER-SC).
As a node, do I have to go through KYC to become a part of Gravity?
As a user, do I or users of my app need to pass KYC?
Is Gravity a ready-to-use solution for token cross chain transfers?
It is possible to implement cross-chain transfer of digital assets (tokens) with Gravity. Data provision between two blockchain networks is the key link for such applications, with the primary principle being: to lock tokens on the account in one blockchain (origin), report this event to another blockchain (destination), which will issue exactly the same number of tokens. In the case of an emergency situation where the release of the token has not occured, the mechanism for resolving the dispute is triggered, which sends a signal to unlock the token on the origin blockchain. There are multiple ways to implement such applications, for example, based on the transfer of a Merkle tree and information to the origin blockchain from the destination blockchain, and if the existing cryptography supports this, it is possible to validate the presence of any requested transaction in the destination (e.g., issue transaction). This way of implementing the gateway requires a coordinated operation between oracles of the Gravity network in both target blockchains.
What is a nebula and what does it mean to subscribe to a nebula?
NEBULA-SC is a smart contract in the target chain used by a number of oracles that provide a certain data feed under certain conditions (price for delivery, reputation threshold, minimum required number of oracles). This contract verifies the threshold signature parameters, accumulates payments from users and controls the distribution of rewards among the oracle providers of the nebula.
Users can subscribe their USER-SCs to Gravity events, which will result in specified functions being called with aggregated data sent as parameters into the functions. Depending on the subscription configuration, users can change security settings, adjust pricing, or set up white lists of oracles.
Is Gravity a flexible system capable of smart contract updates and migrations?
The updates are possible with consuls, which are nodes with the maximum reputation score in the network that obtain special functions within the system. They are authorized to update/migrate the system smart contracts, nebula smart contracts and serve as consensus validators in the internal ledger.
How does the Gravity network achieve governance?
Governance in Gravity achieved through manual scoring by node operators. For example, via manual scoring, the process of score modification takes place either for the nodes disconnected as a result of automatic shutdown after an incident, or when it is necessary to manually “score-boost” nodes of the operators with an established reputation in the industry (for example, a large exchange or a popular data aggregator).
How do the nodes of Gravity communicate with each other and where is the history of their communications written?
The logs of internal communication of nodes are written in Internal Distributed Ledger (IDL), which is a “software message bus” that supports communication of Gravity nodes with each other and provides a storage with a quick finalization consensus (e.g.: BFT).
Are there any technical limitations to the connection of public blockchains?
The Gravity protocol is universal for most blockchain networks with smart contracts (Ethereum, TRON, Stellar etc). Some limitations exist for scripting only blockchains, such as BTC or LTC.
As a user, what token do I use to pay for services?
Users pay fees in the native token of the hostchain where their dApps are deployed.
As a node operator, how do I monetize the work of my node?
NEBULA-SC accumulates payments from users. All profits are distributed every week (on Mondays). Gravity smart contracts (SYSTEM-SC and NEBULA-SC), collect activity logs for each oracle in all host blockchains. At the moment of profit distribution, the percentage of funds that can be claimed by each of the Gravity nodes is calculated, where the share of rewards received by a single oracle is the product of its activity and reputation score normalized on the total amount of funds.
In each of the contracts that the oracle participated in, it has the ability to withdraw funds proportional to its impact share.
How does protection against nodes that do not collect information from the outside world, but simply copy data from each other, work?
To protect against this, a proof is needed that the data was obtained in the original way by each oracle independently of the others. This problem is solved in Gravity by the scheme of commit-reveal, where first the hash from the data is shown and then the values are disclosed, and if the disclosed hash does not correspond, it is considered that there has been an attempt of fraud.
Which oracle(s) writes data to the target chain and why is it safe?
Leader is a node selected to initiate data transfer transactions in the target chain within the current pulse. It calls two types of transactions in the target chain: pulseTx, which verifies the hash generated via multisignature from data aggregated within the Gravity system, and sendDataTx, which delivers the verified data to USER-SC. In addition, the leader collects hashes and proofs of aggregated data from all nodes that provide data feeds.
Who are Consuls?
Consuls are nodes with the maximum reputation score in the network that obtain special functions within the system. They are authorized to update/migrate the system smart contracts, nebula smart contracts and serve as consensus validators in the internal ledger.
What is pulse and how regularly does it happen?
The Pulse algorithm is a two-step procedure that encompasses the core internal mechanics of Gravity as a data service, as well as the external parts of on-chain data verification and delivery within one of the supported target blockchains. Pulse is a process that starts with a request to deliver data to a target blockchain and ends with a successful verification and delivery of data to subscribers (USER-SC).
Target chains may fork. Does this affect the quality of Gravity data?
No, the Gravity oracles resolve these issues by providing services with different SLA levels and ensuring the reliability of the crosscheck data. If a fork occurred in the target chain, the oracles will attempt to do the pulse again.
Who manages the schedule of data delivery to target chains?
The Scheduler manages processes that depend on the time and status of the tasks. For example, it can start scheduled data delivery to target chains and extraction from external sources based on a certain time condition.
Why do you need an internal distributed ledger?
Internal Distributed Ledger (IDL) is a “software message bus” that supports communication of Gravity nodes with each other and provides a storage with a quick finalization consensus (e.g.: BFT).
How is balanced participation of oracles in data provision achieved?
The rules of Gravity score distribution and the rotation of subsets of leaders (depending on the height of target blockchains), are some of the mechanisms that ensure a balanced participation of nodes.
How to stop being a Gravity node?
The exit from Gravity is free of charge. To leave the system, the node operator needs to call the deactivate method in SYSTEM-SC of the same blockchain where the registration took place. If at the moment of exit the reputation level is zero, the deposit is locked and can be released one year after exit, otherwise one year after the registration.
As a node operator, how do I obtain a high reputation score?
Make sure that your node provides correct data at all times and has a perfect uptime.
Is Gravity an open source protocol?
Yes. Development of Gravity is managed as part of open source development flow by Gravity developers.
If I want to become a Gravity node, in what token and blockchain do I have to open a deposit?
A data provider can enter the network by locking a deposit for one year in any of the supported public host-chains in the native token of the selected blockchain.
Why do I need a deposit if there is no slashing?
It is necessary for an oracle’s improper performance or malicious actions to have financial consequences for its owners.
What makes Gravity safe from a Byzantine attack?
The score for all new Gravity nodes is set to zero, which means that a node needs to show stable operation for a certain time period before it can take part in data provision. The deposit that is required when the node is registered is also helpful to filter malicious actors. Also, the mechanism of manual emergency node shutdown can help in case some malicious behavior is detected.
As a user, does my application need to request Gravity for fresh data?
No, you only need to subscribe once to make the Gravity network call your dApp methods and feed data into them.
I am a developer and I think that there aren’t enough data feeds. I would like to add and support my own data feed. Can I do this?
Yes, and you would need to create and deploy a new NEBULA-SC for that. It is a smart contract in the target chain that describes how to provide a certain data feed under certain conditions (price for delivery, reputation threshold, minimum required number of oracles).
How is the pulse leader selected?
The leader selection is based on the rules described in NEBULA-SC (for instance, nodes can alternate as leaders depending on the height of a target chain).
Can the pulse leader contribute arbitrary data to target chains?
No, only the data verified by multisignature.
How is a provider’s deposit locked?
A SYSTEM-SC is deployed in each of the supported blockchain networks, which takes care of system interaction and deposit locking, registration of nodes and collection of Gravity node scores about each other. A data provider can enter the network by locking a deposit for one year in any of the supported public host-chains in the native token of the selected blockchain.
Is Gravity a centralized service with a team of administrators and support?
Gravity is an open source software with transparent mechanisms for introducing changes and improvements. Visit gravity.tech to join the open source developers team and contribute to the success of web3.0!