FOAM brings consensus to a decentralized map

Nastya Parygina
D E C E N T . F U N D
5 min readJul 19, 2018
The article is written for the Advanced Cryptoeconomics Fellowship by BlockFellows

About FOAM

FOAM aims to build the first decentralized and trusted map of the world. FOAM is a multicomponent project consists of three levels:

1.The FOAM Crypto-Spatial Coordinate (CSC) — the protocol with the geohash standard as a basis, enabling smart contracts on Ethereum communicate with each other about location.

2. The Spatial Index and Visualizer (together, the “SIV”) — serves as a front-end interface to Dapps that are built above the FOAM protocol, visualizes smart contracts’ info on the map. The design allows users to interact with the Ethereum blockchain and to work with smart contracts from the web browser.

3. The Proof of Location solution (POL) provides the framework for the new decentralized, highly accurate, secure and censorship-resistant alternative to GPS. FOAM POL bootstraps the crypto economy ecosystem of Dapps built on the top of it.

To know more about the new geospatial standard and FOAM implementation check the article “Can FOAM replace GPS and Google maps with new geospatial standard for Ethereum blockchain?

The snap shot from the Spatial Index and Visualizer

FOAM main features

Trustless: Byzantine fault-tolerant clock synchronization

Independent: Does not rely on GPS

Open: Anyone can utilize the network or offer utility services

Accountable: Economy is structured to ensure honest behavior, verified with fraud proofs

Incentivized: Service providers are rewarded for extending localization and zones’ verification

Source

Static and Dynamic Proof of location

At the current stage, FOAM uses the Static Proof of Location (SPOL) on the Ethereum Proof of Work Consensus. The SPOL is the process of mapping Points of Interest’ data using Token Curated Registries.

In the long term FOAM is preparing to implement the Dynamic Proof of location (DPOL)- the solution we are going to focus in this article due to its interesting consensus choice.

DPOL is currently based on a low-power wide-area network (LPWAN) technology which uses beacons like LoRa to define and verify location. Such a beacon serves as a Zone Anchor, four or more of them triangulate and verify location, forming a Zone by that. Zones are run by Zone operators (both verifiers and anchors) in the FOAM network.

Lora — the beacon example, possible Zone Anchor for FOAM network based on Dynamic Proof of location

In order to become a Zone operator and participate in verifying locations, and earn this way, an applicant should stake some token amount on the Ethereum blockchain (Parent Chain). Zone operator will lose his stake in case of malicious intents to falsify data — slashing conditions.

Each zone forms its own blockchain, called Child chain. This way FOAM solves scalability issues of Parent chain (Ethereum).

The network’s growth meanwhile is provided by FOAM token as a crypto-economic incentives.

Relationship between Child Chains, Verifiers checking for Fraud Proof and the Parent Chain where Tokens are Staked

The consensus of FOAM Dynamic Proof of Location

FOAM is going to implement Tendermint consensus algorithm for Child chains. It’s a Byzantine Fault Tolerant consensus algorithm based on a Proof of Stake design.

The description of the process below is taken from the article Consensus Compare: Casper vs. Tendermint

Tendermint works as a round-based voting mechanism which makes the consensus protocol and begins with a set of validators.

Validators maintain a full copy of the blockchain and are identified by their public keys. They take turns proposing blocks at each new block height. There is at most one proposer per voting round. Each proposal is signed by a validator’s corresponding private key so that the validator responsible for it can be identified if some failure were to occur. The rest of the validators then vote on each proposal, signing their votes with their private keys. This is a single round described. It may take several rounds before a new block is committed because the Tendermint requires that more than ⅔ of the validators voted to proceed. Here is a weak spot of the consensus — the network may halt by reason of ⅓ or more of validator not voted.

Tendermint guarantees that safety will never be violated because a validator will never commit conflicting blocks at the same height. Therefore, a Tendermint-based blockchain never forks. That reflects the FOAM priorities in secure data over the time blocks are committed.

So the consensus in a FOAM Zone will be achieved through the Tendermint as well as the incentives of sharing, the structure of voting round and updating a state machine. The ultimate goal of Zones is to provide location services, the accuracy of which depends on of the number of synced entities involved.

The pic is related to the open maps’ spoofing problem

Please note that I am not an expert on consensus design and would love feedback on this post.

--

--