Holochain Forum

Giving gps locations addresses

Hey, would it be possible to build an app where I could generate addresses based on locations? say based on their lat&long, or what3words? Also how man addresses would be “too many” to reserve this way? Would I need to maybe worry about collision with existing addresses?

That way users could place items at the locations.

2 Likes

I’m not sure this is Holochain-specific enough a question, however my first impression is that general purpose computing can achieve anything you imagine.

The tricky thing about location is that it can be lied about very easily. So how does the Holochain dna prove that you are at that location? I don’t know of any method for that at the moment…

Otherwise yeah pretty easily, the UI gets the location from the device and sends it over to holochain.

4 Likes

Ah, I see… the relationship with a game. I see my somewhat flippant answer wasn’t that helpful in context, I apologise.

Well, my brain immediately went “consensus” when I read @guillemcordoba’s reply, then I thought “oh hang on, that would require more than one person, would that work in a game scenario”, then my brain went “wow, a game where consensus is required could be… {wait for it}… a real game-changer!”.

OK, it’s Friday, I’ve only had one coffee so far…

2 Likes

Haha yea the idea is for a GPS based game, and I am trying to figure out a good way to do what guillemcordoba was talking about and verify locations. I may just have the smart contracts check the distance between your last 2 actions and compare it to how far one could walk, drive, or fly in a given time and if the distance makes sense for walking driving or flying.

While it wouldn’t be perfect it seems like it’d be a limit an SC/DNA could potentially implement to at least make you have to spoof your gps as if you’re walking or driving lol.

One thing I am wondering though is if each hApp/set of DNA has it’s own collection of addresses, and if I could limit what a certain range of addresses could do, say maybe prevent all addresses that begin with “30” from making withdraws?

So then i could use a hash of the places “what3words” and add 30 to the front or whatever and make them send only private key addresses for purposes of the game.

Ohh I see, yes! Actually @alexoceann AFAIK is planning to implement this with the S3 location mapping algorithm. Yes this is totally possible and I’m really interested in this.

1 Like

Oh wow really!? What would that be mapping specifically?

I was also thinking of maybe allowing Apps themselves to work as oracles, and the community could vote to let them into the “valid oracles” list.

So say you have your own plane and are hopping across europe and want to play the game. If the app you’re using to play has been “validated” as a gps oracle or source of truth by the community, it could be used by the SC/DNA to verify your location possibly and override the driving/flight distance checks i’d hardcode into the DNA.

Maybe let the community add oracle/source of truth things via a 2 thirds vote or something.

1 Like

So, sounds a bit like consensus on location then :smiley:

I remember watching a programme about this guy who was recreating the travel guides / walks this author wrote years ago and he had 3 GPS gadgets because they all provide slightly different results and/or could be incorrect.

It would be a great conversation starter on consensus, and different ‘roles’ as you mentioned for the game, and hopefully help lessen potential lone ‘bad actors’.

You mention what3words - big issue about ownership of data there, there are open source alternatives but it’s another example of a good idea marred by proprietary thinking and tactics, e.g.:

possibly.
I’m thinking of maybe using an oracle (or the holochain equivalent) to verify a users steps via a phone app like google fit, apple fit, samsung health etc, ones that already verify step counts, and then just have the SC verify it using the account api key they provide or something.

That would cover steps, which is the only thing I’d want to give the “token” away for. However, I’d still want to prevent people from placing too many items in too may places around the world too fast, so i’d probably have some kind of system that checks something like this when placing an item:

  • Get last requested gps location
  • Get current gps location
  • check if speed is < max walk speed.
    • If it is, just don’t care.
    • if it’s not, check a few map oracles to see if driving times make sense
      • If it’s not, check if flight based travel time makes sense, and that there’s a delay between fly times.
        • if this doesn’t check out, flag the entry as suspicious and let elected admins or the community vote to ban them and remove the entries if they get enough flags and can’t explain themselves.
        • if it is, we good.

Maybe even have a system to pause people who get too many flags until enough admins vote to unpause them.

1 Like

Although question I still have. Does each happ have it’s own collection of addresses? Or would my PK on one app be the same on another?

You would decide whether the data is just local, shared, and shared between whom.

Have you been through the gym tutorials yet? I forget if you mentioned but that should help understand what is and what is not possible.