Thank you to everyone from the community that contributed questions and tuned in for the livestream. This AMA was developer oriented and dives into the protocols that FOAM is creating.

Hi everyone, welcome to the FOAM developer AMA.

My name is Kristoffer and I am the CTO of FOAM. And I am Martin, I am the lead blockchain engineer at FOAM. Today we are going to talk about some questions that we have received over the past couple of weeks and what we want to achieve in the coming months. We released the private beta of the Spatial Index and there are some questions that we want to discuss around that application that some of you may have tried out.

First, a quick recap and introduction to what FOAM is.

Very simply FOAM is three things. One, the Crypto-Spatial Coordinate (CSC) standard proposal that uniquely ties a smart contract on the blockchain to a physical address. You can read more about that in our blog posts. The second component is what we call the Spatial Index, which is a block explorer that utilizes a map as the basic view. We like to think of it as a Bloomberg terminal crossed with Google Maps where you can track any blockchain activity that inherits or utilizes the Crypto-Spatial Coordinate standard. The third component is Proof of Location which is our most ambitious track. It is a time-synchronization protocol and a cryptographic token that incentivizes people and companies to deploy radio beacons that talk to the Ethereum protocol or blockchain and provides timestamped messages to radio broadcasts which are then received by mobile phones or other radio receiving devices. This ultimately creates a cryptographic Proof of Location.

Is it possible for the owner of a Crypto-Spatial Coordinate to move it once it has been placed? Or would the funds and any associations with that smart contract have to be transferred to a new one?

In the current CSC standard, one of the main points is that the pairing between the smart contract address and the geohash, or the location, is immutable. Once it’s on the blockchain, it can never be changed. So the direct answer to the question is no, but that doesn’t tell the full story. Much like smart contract addresses are immutable on their own, there are other smart contracts that can maintain a list of references to multiple smart contracts and act as a smart proxy for them. A similar example is for uPort and their handling of identity. Identity itself is not given by just a smart contract’s address, it’s a proxy contract. You can update it through calling the specific address in that contract.

I have an idea for an app that I want to build using the spatial index. What languages should I start learning to make sure that I can make it happen?

The short answer is that you can learn whatever languages you want. We put a lot of emphasis on making a pretty sophisticated set of back-end services that are able to abstract away a lot of the Ethereum and web3 peculiarities that come with doing blockchain development. We use traditional data stores and caching services so that the API from an external observer’s point of view is very similar to other REST API’s and web socket API’s that you probably have used in the past. In terms of posting new content relevant to the Spatial Index and Proof of Location protocol, the standard JavaScript web stack is reigning supreme. But we offer an alternative solution to that which we have developed namely through Purescript or Haskell stacks. So if you are a Purescript or Haskell developer (or have ambitions to become one), you are in a pretty good position because we offer a lot of custom tool sets that are built in those languages that are directly connected with the work that we do here. Basically, the short answer is that it’s not important that you need to know those, but it is certainly helpful.

Will there be API access to place beacons in the future? I can see a possible need to be able to programmatically add beacons with more precise lat/lon coordinates than are possible with a map click.

Absolutely. Similar to the previous answer, we are offering an API for all of the functionality that the Spatial Index supports. The Spatial Index as you see it now is basically our first take at a demo app that utilizes the API. There will be a blog post soon where we outline the principles of the API and how to access it. We haven’t made that public yet, but it will be possible.

To answer your other question, the precision that is selectable through clicking is some what arbitrary. It was just a choice to make it simple. Using the API, you will be able to use as high precision as the CSC allows .

Along the lines of data access, will there be a way to query all the beacons and underlying data? There are already ideas that are surfacing that are about finding good places for beacon placement. Maps and dataviz could be used to highlight coverage opportunities.

Also related to the previous two questions, we have an API whose specifications are possibly reachable, but will need some explanation and justification that will come in a future blog post. However, I would also like to say that because this is a blockchain application, theoretically anybody who has access to an Ethereum node would be able to view all of the relevant geospatial data that is processed through our smart contracts. We have no problems with helping developers figure out how to build custom API calls that we are not offering. Or perhaps you would like to run your own instance of our data processing unit for your own in house data needs. We are also open to things like that. We are able to support other projects in a similar way to ours using our data processing unit if you are willing to host it yourself.

Is the plan for this to work on the main blockchain network, a private blockchain network, or will each user have their own private blockchain so they can manage who has access to it? Or will the beacons be open and available for developers to use for whatever they want?

Our system is agnostic to what kind of Ethereum blockchain you are running, as long as we have access to a node that is fully synced with the network so we can fully process the events. We can certainly display all of the geospatial events on it. In order for the current version of the Spatial Index to be interactive, meaning that if you want to put a beacon on it, you need to have write access to that blockchain (which I presume you would have if you were in a private blockchain context). Related to the previous question, our data processing pipeline that you are currently seeing is utilizing a number of back ends: Redis, Postgres (with their PostGIS extension), and Elasticsearch. For example, we are only utilizing a fraction of the capabilities on the PostGIS backend. If you have specific queries that you would want to use, we could just target your server which you perhaps would have an API.

If this was a real world situation, after claiming a beacon area on the Spatial Index, would I have to immediately have a beacon out there connected and running? Can I claim areas in some way until I have my beacons ready? Can you describe briefly how it would work.

That’s a good question. The idea behind the current demo of the Spatial Index is that the blue dots represent these Ethereum compatible radio beacons in physical space. The layers that we added are triangulations and arcs. Arcs display some kind of communication between movable beacons and these radio beacons in physical space. So, they are not yet there.

On the one hand, the demo shows how that will eventually work. Because the CSC standard is totally general and can be used for any smart contract that needs to work with space, you can also imagine future versions of the Spatial Index that display other CSCs that do not represent radio beacons, but application specific data in space. We would be able to differentiate these two visually. So you could have these blue dots representing these future hardware beacons, but you might have pink dots representing another smart contract. Certainly, our architecture supports extending this arbitrary distinction.

The Spatial Index looks great. I was able to see the Triangulations, Arcs, Beacons, Bots and on the NYC area of the map, but couldn’t get much to appear in the area that I placed beacons (Colorado). Is that because I don’t have enough coverage with my beacons? How can I add my own Bot to move around in my beacon area? Will the beacons react to the bots that pass by in some way?

The answer to the first part is that there was a small problem when it was initially deployed that was causing some of our services to crash. However, that has been fixed with the work that we did yesterday. Now you shouldn’t be experiencing the delay you might have seen yesterday. The bots are coming from data that we pulled from Uber riding around in New York City, so the bots not currently changeable and you cannot not move them to Denver. However, this is something that could be added in the future or even coming up pretty soon, is a way to talk about bots in more locations than New York City so you could have a more realistic feel for your own cities.

I’ll also mention that because we started in New York City where we added a lot of CSCs, the triangulation layer uses a fixed distance threshold that is sort of adapted to the density that we have in New York City. This might explain why you might not see unless you place them at a similar distance apart. Now that we have released it, and we are seeing users add more points, we can eventually remove the points that we added in New York City and possibly make this triangulation threshold user adaptable so that users across the world can have a better experience. This is stuff that we are learning from seeing how users are using the Spatial Index.

Why is it preferred to create a new beacon network rather than attempting to leverage existing devices (phones/etc) to comprise the network?

Generally speaking, we believe that a network of provably timed synchronized radio beacons is necessary in order to provide real proof of location, which is a primary reason we are working on this. In principal, existing networks could be superimposed on the network that we are deploying and enabling other to people deploy. If these other networks and their devices are Ethereum compatible, meaning that they can send transactions to the network, and they choose to use the Crypto-Spatial Coordinate standard, they will automatically show up in the Spatial Index. One of the things that we are really excited about and anticipating is this overlay of multiple, different networks. As long as you have one network that can provide real Proof of Location, the other networks will eventually, by proxy of that network, also have “proof” of the their location. The short answer is that in order to have Proof of Location, we need to create proof of time-synced mesh networks of radio beacons. We are certainly anticipating merging that with the existing networks.

Can you describe the window that appears when you click on a beacon? What does FT mean? The beacons will work with Ether and Bitcoin somehow? (ETH, BTC are shown).

The short answer to that is that it is sort of a mock-up of what one might want to view in terms of their beacon’s traffic. FT stands for FOAM Token, which is the token that will drive the protocol for the system. The relationship to its Ether price or Bitcoin price was only displayed because they are popular currencies that one might consider the value of a beacon natively in its Ethereum or Bitcoin value. Although it is not absurd to think that at some point in the future beacons could utilize cross-chain compatibilites that are being spoken of to allow transfer of value into other currencies. This isn’t a central feature of the app, it is just for display purposes at the moment.

I’d also just add that if you are to click on a beacon, or at least some of the beacons in the New York City area, you will see a token transfer history. It is currently just mocked, but it will give you a better indication of what this window is intended to show. It will show a history of the amount of tokens at that location, as if that location was an ERC20 contract. In the future, this window will also display data that is being produced by this node for the Proof of Location protocol. For example, what zones does it belong to or its history in terms of executing the protocol; not just its token balance or monetary value.

Now we will address some of the questions that have come in during the last 20 minutes.

As a member of the Trusted-IoT Alliance, what is your relationship with projects like Stream, IOTA, VeChain, or QTUM?

The best person to respond to this would be our CEO, Ryan, because he has the most direct relationships with our IoT partners. We just very recently joined the Trusted-IoT Aliiance, and we are definitely partaking in the all of the discussions happening there, but we don’t have any formal relationships with any of these projects. Due to our history as developers, we have a current bias towards Ethereum, and we are comfortable using it. Generally speaking, we believe that ultimately Proof of Location will be blockchain agnostic, it is just not something we are prioritizing right now for our first iteration.

About the beacon, do you have any lists of possible hardware on the market to be used as a beacon? Any references?

Again, that is a better question for Ryan. Our current favorite potential technology, for a lack of a better word, is the LoRa chip and the associated devices around that. It is a really feasible standard to use, and perhaps more importantly, there are already people running LoRa nodes (in New York City, and all over the world). We are looking to partner and develop with both enthusiasts and professional companies, and our current best bet is LoRa. But I do know that Ryan has other candidates out there.

Do you have a live-demo app on FOAM?

We don’t currently have a demo DApp that utilizes the FOAM protocol, we just have the Spatial Index explorer. There have been a number of proposals for doing this, I know that people have talked about making a demo app for KYC purposes. There are things that are similar to Foursquare that people have talked about doing. It’s definitely something that we are interested in doing, we just haven’t really had the time yet. We are hoping that people who are capable of developing DApps come to us to develop demo apps outside of FOAM, but in collaboration with us and they would receive our full support.

Why is the FOAM token essential to this project?

In order to have any kind of security guarantees for the staking that you want the beacons to participate in, you need the token. It’s hard to coordinate activity unless there’s some kind of staking involved. This doesn’t mean that the fees for Proof of Location are using the FOAM token, it’s simply a means to stake value into the work that needs to be done for these radio beacons.