Signaling on FOAM

A novel staking mechanism to incentivize location-specific mining

Ryan John King
FOAM

--

We believe Proof of Location is a fundamental infrastructure protocol needed to achieve the full vision of a decentralized ‘web3’ economy and can foster an ecosystem of applications built on top of a verified location standard. In general, any decentralized system for Proof of Location in the physical world will need to build itself into existence — ranging from the weakest self attestation claims to strong fraud proof authority based claims.

For FOAM, the starting point is Static Proof of Location for geographic Points of Interest, places and locations for a consensus driven map of the world. Since launch, FOAM token holders can become Cartographers and can contribute to their locality and interests by curating, mapping and verifying the locations of static objects. As FOAM Cartographers continue to engage with the FOAM map, the FOAM community are seeing the FOAM map build itself into existence across the globe. For example, the first decentralized treasure hunt was conducted by a Cartographer in Las Vegas by placing the clue on the map. Some Cartographers have took up the OpenStreetMap notion of “Ground Truth” to their contributions, which entails physical on site examination of a space and documentation of having been there before making an addition. Others have took to the new FOAM message board to contemplate and debate what it means to be a Cartographer and the incentive models involved with the protocol.

As the FOAM network grows and Cartographers begin to fully explore and map the world, once the necessary technical upgrades are made, FOAM token holders may decide to contribute to the network as part of a Zone. In order to prepare their area for these upgrades, the Cartographers can also stake tokens in the Signaling process, to incentivize dynamic Proof of Location services to be offered in their area and demonstrate demand.

While Static Proof of Location continues to provide the FOAM map with Points of Interest, a Dynamic Proof of Location system can account for Proof of Location in space and over time by accounting for mobile and dynamic location users. As described in our previous posts, this kind of system requires necessary radio hardware for a robust Byzantine Fault Tolerant time synchronization protocol to work effectively for users.

Foamspace hopes that the Cartographers and other users will contribute the necessary individual work, resources, and effort themselves to contribute to the ongoing community-driven growth and upgrade of this important cartography project. We have already seen great engagement and effort from Cartographers and other users with the addition of POIs through Static Proof of Location. With the addition and use of necessary radio hardware, Proof of Location could be expanded to further prove location status through a time synchronization protocol. This time synchronization protocol is intended to ensure continuity of a distributed clock, whereby specialized hardware can serve as a Zone Anchor and synchronize nodes’ clocks over radio to provide location services in a given area, called a Zone.

How to Bridge the Gap Between Static and Dynamic Proof of Location with Signaling

Prior to the launch of Dynamic Proof of Location mass community testing will need to occur. Naturally, the question arises of how to not only incentivize participation but also determine the regions where testing is desired.

Signaling is a mechanism designed to allow Cartographers to incentivize the growth and geographic coverage of the FOAM network. To Signal, a Cartographer stakes FOAM Tokens to a Signaling smart contract by reference to a particular area. These staked tokens serve as indicators of demand, and are proportionate to: (i) the length of time staking (the earlier, the better), and (ii) the number of tokens staked (the less well-served areas, the better). In the context of the Dynamic Proof of Location utility these indicators are the weighted references that determine the spatial mining rewards.

Cartographers will Signal where location services are needed, and in doing so increase the eventual block reward (the FOAM Tokens received through the mining process) of that location. The mining rewards of the FOAM protocol are available to Zone operators. This incentive mechanism is to coordinate Cartographers, in a grass roots fashion, to operate the protocol and further incentivize Cartographers to potentially operate Dynamic Proof of Location Zones themselves.

For an introduction to how Zones earn mining rewards see:

A Spatial Distribution of Tokens

The purpose of signaling is to create incentives for mining at specific locations in the future. It does so by determining the spatial distribution of mining rewards for Dynamic Proof of Location.

A challenging problem in a protocol such as Proof of Location is how to not only incentivize participation, but how to incentivize that participation in a physically distributed and decentralized manner so that everyone has a chance to contribute to the FOAM community and use the FOAM map. The spatial distribution of mining rewards is intended to guide and incentivize participants to grow and spread the geographic coverage of the network, and take the focus off solely the number of nodes or existing regions where there is a strong pre-existing FOAM community. If the spatial distribution of mining rewards was not a part of Dynamic Proof of Location, the issuance of new tokens would only incentivize running a node, regardless of where it is.

Supply as a % of supply after N years

Bitcoin provides the original example of how mining interacts with time. In Bitcoin, the monetary supply increases each year at a known rate. The date at which the final Bitcoin will be mined can be estimated. If you know the current supply of Bitcoin you should very well be able to determine what year it is as well. Inflation and total supply is measured over time. In FOAM the mining rewards supply associated with a Signal should not increase simply over time, but additionally over space.

Supply should not to increase simply over time, but additionally over space.

Supply as a % of supply after N locations have Zone coverage

Ideally, if you know the current supply of FOAM you should be able to determine what percent of the Earth has Zone coverage. A better notion might be something akin to “velocity”, amount of space covered during a certain time.

In FOAM, mining block rewards are spatially weighted by the signals. This further incentivizes the growth and dissipation of the network across a variety of users and locations. Prior to the initiation of mining, participants will signal where location services are needed, and in doing so increase the eventual block reward of that location. This incentive mechanism is to coordinate contributors, in a grass roots fashion, to operate the protocol. The potential rewards for a signaler are linked to that of the miners. Signals are effectively acting as indicators to where the most number of transactions are happening, and the FOAM protocol allocates a direct ratio reward based on length of signal and accuracy.

The mining contracts can only be deployed as a result of community testing and feedback in order to accurately set reward and punishment parameters from this data. This means that the actual rewards from signaling will be calculated after the fact and are effectively not yet enforced. The design of signaling has been done with extreme simplicity in mind. It allows for as large a design space as possible so that the community may determine the appropriateness of different iterations and implementations of the mining contract as feedback from Signaling becomes apparent.

In principle, the purpose of the signaling contracts are

  • To bond the FOAM token to indicate where there is demand for Zones and adjust the mining rewards appropriately
  • To record signaling for possible future rewards of early signalers
  • Perform proof-of-use

Signals as Non-Fungible Tokens

The design of the Signal smart contracts takes a novel approach in tokenizing and representing staked tokens as Non-Fungible Tokens (NFT). Multiple tokens bonded to a signal generates an NFT that represents the signal and provides a transfer function.

FOAM implements a general purpose simple NFT that holds an arbitrary, non-zero amount of ERC20 tokens. That means, that upon minting, it requires that the NFT has been allowed to transfer tokens from the ERC20 contract. Symmetrically, the burn function simply transfers the FOAM token back to the owner.

We inherit from the ERC721BasicToken and override the mint and burn functions to lock the tokens:

// sketchcontract StakeToken is ERC721BasicToken {function mint(address owner, uint256 stake){require(token.transferFrom(owner, this, stake);super._mint(owner);}function burn(...) {require(token.transferFrom(this, owner, stake);super._burn(owner);}}

Spatial NFT Registry

The CSTRegistry is a general purpose registry for registering NFTs on the FOAM map. This contract, the CSTRegistry simply tracks a NFT tokenID and its location in a general registry.

contract CSTRegistry {functiongetGeohash(bytes32cst) publicviewreturns (bytes32geohash);functiongetRadius(bytes32cst) publicviewreturns (uint256radius);functiongetCreatedOn(bytes32cst) publicviewreturns (uint256timestamp);functiongetDeletedOn(bytes32cst) publicviewreturns (uint256timestamp);function computeCST(address nft, uint256 tokenID) returns (bytes32) {return keccak256(abi.encodePacked(nft, tokenID));}}

Signaling

The signaling contract simply ties the two contracts together. It specifically uses the FOAM token in a NFT and populates it on the map using the CSTRegistry. When signal is called, a NFT is minted with the specified FOAM value and registered on the map. To remove the signal, the token is simply burned.

contract SignalToken {functionmintSignal(addressowner, uint256stake, bytes32geohash, uint256radius) publicreturns (uint256tokenID) {tokenID = super.mint(owner, stake);tokenGeohash[tokenID] = geohash;tokenRadius[tokenID] = radius;bytes32cst = computeCST(address(this), tokenID);cstToID[cst] = tokenID;}}

Proof of Use

Upon signaling, we increment a tally mapping (address => uint256) totalSignal that is read by the token controller to determine proof-of-use. Similar to how proof-of-use is tracked in static proof-of-location, this amount is never decreased, because the token controller is strictly state-less.

Architecture

Visualizing the Signal Layer

The FOAM Map is based on the architecture of the Spatial Index Visualizer.

An important component of this stack is deck.gl which is a large-scale Web-GL powered Data Visualization tool that has been developed and open sourced by Uber.

deck.gl

The FOAM Map relies on this tool to render heat maps for the Signaling layer. One of the most interesting aspects is that many different kinds of layers to render Signals can be developed by anyone. Foamspace is excited for the launch of Signaling and what is to come next! Below are some previews of the user experience:

Initial Use Period and Signaling Launch Date

The smart contract audits are taking longer than expected and the launch of signaling will be slightly delayed — t̶h̶e̶ ̶I̶n̶i̶t̶i̶a̶l̶ ̶U̶s̶e̶ ̶P̶e̶r̶i̶o̶d̶ ̶h̶a̶s̶ ̶n̶o̶w̶ ̶b̶e̶e̶n̶ ̶e̶x̶t̶e̶n̶d̶e̶d̶ ̶t̶o̶ ̶N̶o̶v̶e̶m̶b̶e̶r̶ ̶9̶t̶h̶,̶ ̶2̶0̶1̶8̶. [Update: This rollout has been temporarily paused. Read more here]

As many in the FOAM community know, we’re hard at work refining some of the interface features and Signaling aspects. This is done because the idea of the Initial Use Period, and its associated Proof of Use requirement, is to interact with all possible functionality, for both Static and Dynamic Proof of Location, before participation becomes possible for individuals not part of the initial token purchasers.

While it is unfortunate that audits are taking longer than expected, it is a priority to make sure that the users that interact with the protocol have the most positive experience possible. We will keep the FOAM community updated on developments. We hope you continue to contribute points of interest to the FOAM Map in the meantime and thank you for your patience!

--

--

Editor for

Ryan John King is the co-founder and CEO of FOAM, a spatial protocol for the Ethereum blockchain that provides secure Proof of Location services www.foam.space