Goblin - p2p Grim MOD using nostr and nym

Goblin is a Nostr- and Nym-powered peer-to-peer Grin wallet built on Grim. The UX is styled after Cash App - mobile-first, and it works with pretty much any Nostr relay in the wild that supports the NIPs Goblin uses. Usernames are handled by our own lightweight name-authority server (which anyone can run if they have a valid domain), which can run alongside a Nostr relay for added network redundancy. Neither the relays nor the name server ever see your IP and everything routes through Nym first.

What is Nostr?

As anynomous puts it:

What is Nym?

Nym is a Sphinx-based mixnet: layered encryption plus per-hop delays, packet reordering, and cover traffic, which buys metadata privacy against a global passive adversary that Tor’s low-latency design can’t. We route relay traffic through it first, so relays see a gateway IP instead of yours.

How does this work?

Basically like an end-to-end encrypted nostr direct message traveling across the nym mixnet and Goblin auto-handling slatepacks. Because of our NIP implementations a receiver’s relay cannot see the sender and the timing of the message is fuzzed, greatly improving privacy.

The best part is that your identity is in no way tied to your wallet publicly. Technically you could have many identities for 1 wallet!

Here’s a full overview of the goblin transport layer.

Plans:

  • Improvements to UI/UX
  • following Grim’s public release upstream

Download:

Support:

  • I want to request a channel within Telegram: View @grinprivacy I don’t see the point of starting yet another group. For now just open up an issue or use carrier pidgeon.
  • Documentation: coming soon to the website
If anyone feels like tipping me through Goblin here's my Goblin QR (the data is a simple nostr profile!)

And of course, disclaimer: Goblin is still in early development.

Crates Goblin adds to Grim

nostr (the messaging layer: how a slatepack becomes a DM):

  • nostr-sdk with NIP-06/44/49/59/98 (encryption, seal/gift-wrap, key storage, HTTP auth)
  • nostr-relay-pool : relay connection management
  • async-wsocket + tokio-tungstenite : the relay WebSocket transport
  • regex, base64, hex : parsing + NIP-98 payload encoding

Nym mixnet (the private transport):

  • nym-sdk : the mixnet SDK, linked in-process (path dep, no sidecar)
  • tokio-socks : SOCKS5 dialer so the relay WebSocket rides the mixnet
  • reqwest (rustls + socks) : NIP-05 / price lookups routed through the mixnet’s SOCKS5
  • rustls : pulled in explicitly to pin the ring crypto provider (two providers are present once Nym is added)
Crates Goblin removes from Grim

The Tor client + onion-service receive path:

  • arti-client : the Tor client itself
  • tor-rtcompat : its async-runtime glue
  • tor-hsservice : hosts the onion (hidden) service
  • tor-hsrproxy : reverse-proxies inbound onion traffic to the wallet
  • tor-hscrypto : onion-service crypto
  • tor-keymgr : manages the onion-service keys

Tor config / errors / low-level crypto:

  • tor-config : Tor configuration
  • tor-error : Tor error types
  • tor-llcrypto : low-level crypto primitives

HTTP + TLS over Tor:

  • hyper-tor : the HTTP client that ran over Tor
  • tls-api : TLS abstraction layer
  • tls-api-native-tls : its native-TLS backend

Supporting crypto + arti utilities:

  • curve25519-dalek : X25519 keys Tor used
  • ed25519-dalek : Ed25519 keys Tor used
  • safelog : arti’s log-redaction helper
  • fs-mistrust : arti’s file-permission checker
13 Likes

Wow! Extremely cool man! Well done! Hopefully the council sees fit to support your project.

3 Likes

Very interesting :yellow_heart:.

:backhand_index_pointing_up: This basically addresses all the concerns I had about using Nostr for Grin.

2 Likes

Nice to see something new for Grin! Look forward to seeing the documentation to let newbies know how to use and understand the benefits. About goblin transport layer, is it same technique like abadoned grin box GitHub - vault713/grinbox: Relay service for interactive transaction building for Grin / Mimblewimble · GitHub?

2 Likes

That’s great to hear. And security improvements will continue: I am in the process of an even more secure version of the NIP-44 implementation to further encrypt our payment messages.

Essentially they solve the same problem and both layer end to end encryption on top of a relay. The difference is what sits beneath them. Grinbox is a relay, WebSocket server and message broker, and the privacy is on the user. Goblin’s transport layer is a Nym mixnet substrate beneath a standard Nostr messaging layer and privacy is handled end to end by the mixnet and the nostr implementations which double-encrypt the slatepacks payments and fuzz the timing of the message..and that’s after the timing is fuzzed by the mixnet. For someone expecting speed it looks like the payment is being sent for a few seconds (a long time for a simple message) but the experience should feel exactly the same as cash app or venmo, which is a good side effect considering we get robust privacy.

So yeah, Goblin IS grinbox’s idea, relay-resolved slatepack exchange addressed by a keypair, but rebuilt on Nostr instead of a custom protocol and a 5-hop mixnet instead of bare TCP.

I’ll be honest I’ve used many projects from the first iterations of GRIN but I never used Grinbox.

My knowledge of federated networks including nostr comes from operating a large federated social media site for the last 5 years.

I’ll prioritize this, actually. Thank you.

4 Likes

It was a lot of work to get it working on NixOs, had to write a shell.nix to do it, but after all that work it payed off! This is hot bro!!

@dog

4 Likes

Hey, I received that in my sleep and woke up to it in the morning already confirmed! That was awesome, … And I am hearing that it works in the wild from telegram users as well. Cheers everyone, the next update will be a major one (and the documentation as well).

Thank you very much, @syntaxjak

4 Likes

Could this wallet be also a wallet listener to receive coinbase from stratum server?

It’s literally fun to pay people using Goblin, share your goblin name here and I’ll send you 150 cold hard grin coins! Unboard this mfkrs! (Upto 4 people, limited time offer lol)

4 Likes

Thanks for your generosity. My username hellogrin

1 Like

I imagine, since we could use the app with username, why don’t we have features like chat/group/marketplace… it must be fun :smiley:

1 Like

Ya that’s a good idea, a chat/boards integrated into the wallet itself would really solve the whole jumping around to different chat services, discord to keybase to telegram oh my. Also i think your wallet has to be online to receive thr pay via username @hellogrin pending “waiting for hellogrin to receive”

@dog can’t wait to see your next update man, goblin changes the game, all thanks to you, and @ardocrat for Grim and those who made the original cli node and wallet. Exciting times for GRIN!

3 Likes

LFGGGG! Well that solves this basically: Venmo/Cashapp product planning

Does the “Activity” screen show the last transactions like a Cash App history feed then? I would imagine that you let people add notes and such via nostr similar to how cash app does?

It seems to be missing some sort of contact / address book, or I might be missing it.

Here is the current Cash App UX btw. The tabs are just Wallet, Pay/Receive (combined into one), and History. Pretty slick and simple. Maybe you could combine Pay and Receive too. Just a thought.

Looks like Pay/Request is combined in Venmo too.

How are you doing receive btw? Is it the contract branch where you’re actually building an invoice?

It’s a good thought, but even Cash App and Venmo don’t bother with that.

Haha ya man, it has notes and activity, the app is fricking awesome! When you resize the app window it changes to this cool version with that smile at the bottom! Way to slick! When you joining grim-goblin gang Trab? :slight_smile:


3 Likes

Amazing! I will definitely try it.

3 Likes

And since the app is using nostr, a messaging protocol :winking_face_with_tongue:

2 Likes

And to add more pressure on @dog :grin: How cool it would to have a complete nostr client with Grin wallet functionality :smiling_face_with_sunglasses:

2 Likes

Ah so the resize combines Pay/Receive into one thing? Awesome

I’ll let you know when I set it up!

Btw @dog the wallet creation sucks. Reminds me of how annoying Iron Belly was. I think it’s better to decrease the barrier to entry during wallet creation. Don’t force them to hand write some crap down and disable the copy button and stuff. It almost made me not want to bother making a wallet at all. Can we spin up the wallet really easily and then later on improve our recoverability and such as we need? I think that’s ideal especially since people will just want to play around with Grin and test it out a bit I bet.

Heck, since we’re using nostr with this, maybe we want to use something like Horcrux for recovering wallets or something too.

2 Likes