Third party "arbitration" between two untrusted pods

Hi! I recently saw an interesting social media design idea—and I’ve been thinking of how to implement it in a server-agnostic design.

The gist of it is this: I have a group of friends (like Facebook), and this app encourages me to spend more time with them in person. I could set my status as active, and any friend close by geographically speaking would get a notification like “Alice is available and nearby. Would you like to grab lunch with them?” The idea behind the app would be to help increase in-person interactions by friends knowing when they’re nearby and free.

There’s some pretty serious privacy issues with this though. I have to get the GPS position of all my friends and compare it with my own. I really don’t want every single friend of mine to be able to access my raw GPS data.

Here’s my idea of how to implement it. Let’s take two friends, Alice and Bob. This app wants to check whether they are in proximity to each other, so it does the following: Alice’s pod reaches out to Bob’s pod, and requests an arbitration. Both pods compare a list of third party servers they trust, and decide on a shared one. Alice’s pod contacts the third party and schedules a script, say “distance between individuals.” Alice’s pod then tells Bob’s pod the script instance id. Both pods individually send their GPS data to the third party, and in return both get the distance between Alice and Bob. That way, Alice’s pod and Bob’s pod never directly share sensitive data, but still benefit from that data being compared.

Perhaps this is way to zany and it would be best to use a specialized service, any thoughts on this architecture?

I believe there will be a zero knowledge algorithm to only output “we are near each other” with encrypted input, that you can send to other user’s client.