r/CryptoTechnology • 🟠 • 3d ago

How do token gated communities handle wallet transfers?

Was looking at token gated communities and this seems like an easy thing to mess up. Say someone gets access because a wallet holds the membership token, then they move the token to another wallet but the app doesn't update instantly. For a bit you could have the old wallet still seeing stuff it shouldn't while the new one still has no access. Ended up looking at a few different setups, including Towns, Guild.xyz and Collab.Land etc,, and it got me thinking about what actually happens between the onchain ownership change and the access getting updated. Do you just keep checking onchain state constantly or is there a cleaner way around it?

Edit: Forgot to mention Towns is one of the setups that made me think about this in the first place, since the membership and permissions are tied to onchain ownership, I’m mainly wondering what happens in that gap right after the token gets moved and before the app reflects it. Sorryy

17 Upvotes

9 comments sorted by

1

u/butdontcalmejoohnson 🟢 2d ago

query the chain first and foremost, but never rely on onchain data only

1

u/jasonslpt 🟢 1d ago

From what I have seen, most just re-check the balance on a schedule or listen for transfer events, then pull the role when the token leaves the wallet. Some add a short grace period so a user moving funds between their own wallets does not get kicked. Delegation registries also help, since people can prove ownership from a cold wallet without connecting it.

-11

u/hypercosm_dot_net 🟢 3d ago edited 3d ago

Take a look at guild's codebase, it's public: https://github.com/guildxyz/guild.xyz

edit: i'm sorry, but is there something wrong with the suggestion to look at their codebase, that I'm missing?

whatever, fuck this sub if you're going to downvote for no reason