# Rate Limiting Nullifier by AtHeartEngineer | Devcon Bogotá

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-07
- Duration: 07:03
- Watch: https://streameth.org/watch/yt-vrNiPBfbLw0
- YouTube: https://www.youtube.com/watch?v=vrNiPBfbLw0

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/rate-limiting-nullifier/

RLN (Rate limiting nullifier) is a construct based on zero-knowledge proofs that enable spam prevention mechanisms for decentralized, anonymous environments.

Speaker(s): AtHeartEngineer
Skill level: Intermediate
Track: ZKPs: Privacy, Identity, Infrastructure, & More
Keywords: zk,spam,anonymous

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] there we go so uh our land has been mentioned quite a few times throughout presentations this week and uh I wanted to kind of talk about how it worked like what's under the hood in a way that's like accessible to most people uh so the key part is the rate limiting so it's basically controlling like how fast you can interact with the system so an example would be like interacting with uh Discord like if you're in a big Discord there's like a Slowdown mode where you can only send one message every like 15 seconds or so it's very similar so it is made up of a couple of things so semaphore which is the talk before this which is basically just uh proving you're part of an anonymity set without revealing Who You Are samir's secret sharing scheme which is the majority of this talk uh and some time or event delineation which I'll get into in a minute there's kind of three stages to how Arlen works so there's a registration process so like joining uh which is basically just a Markle tree and signaling which is your actual sending of messages then there is the slashing or secret recovery so yeah so like I just said the registration process is just the Merkle tree so this is basically what semaphore is so it's just proving you're part of and and an anonymity Set uh and this can be done on or off chain so the signaling part this is kind of the the meat of all of this is uh so it's a circum circuit and the first public input is the epoch which is like a time or it could be like a post on Reddit or something like that um just some delineation in a time or an event and then the actual message and then a secret key and out of that comes proof that your Epoch and your message are accurate and you know verified with uh what you put into it it proves that you belong to that that Merkle tree that membership group and it spits out a secret chair so this secret chair is one of the most important parts of of how rln Works um basically if you have a a secret uh you can plot that on a graph and on the y-axis you can you know this is basically how Sumer secret sharing Works um the random so you have to have a random point to construct your uh shares and that is derived from the epoch and the shares are generated from the message hash so uh the shares basically the the whole idea behind Superior secret sharing scheme is you have you have a secret you break it up into parts and you distribute those parts publicly and if you have enough of them you can reconstruct the secret so with these two shares you can reconstruct where that line is so I'm going to go through how that works so if you have one share you really don't know where that line is right if you have two shares then you can see where it crosses the y-axis and you can determine what the secret is so if someone basically submits too many messages too fast like uh you know within a 15 second time period or whatever your your rate limiting is then someone can reconstruct your your secret your private key basically figure out uh your identity commitment and withdraw uh you know a steak or something like that um and this can be split up into multiple pieces it doesn't just have to be a linear function this could be a polynomial so you can have like multiple shares that you need to be able to recover so you can say like you know a person can send 15 messages per day but that's it so this is the actual circuit I know this looks a little confusing but uh if you kind of just look and see how all this is assembled it's really not that bad so uh you have the epoch the message and the secret key going in and the center part here I have a little laser pointer this center part is the shimir secret sharing scheme and the right side this is basically just the construction of the identity commitment so it's your like public identifier for being anonymous and uh the left side so this is just the this is uh nullifier so it's basically the equivalent of like a nonce and some use cases for this uh that we thought of is you know you could do like auctions where you can have only so many uh bids per item or whatever bits per user you can have a bulletin board system like Reddit where you can only have you know you can only comment once per post or you know once per level of post uh this we've also thought about using this for preventing denial of surface attacks for something like cloudflare where we can do that anonymously and decentralized and then uh so this is also used in a couple applications that the PSE has developed like uh skidder so like we have a we have ZK chat in there so it's Anonymous chat where it's rate limited and so we have a JavaScript library for this we're working on a rush library in collaboration with the VAC team and we're probably gonna write a python version and a couple other bindings for languages um yeah so if you want to look at the documentation or the code there's the QR code and if you have any questions you can join our Discord again I'm at heart engineer and yeah thank you thank you so much we have still one minute and a half maybe one question the audience some q a any questions raise your hand here hello uh how does this compare to I suppose if you like use Zaxby's approach where you keep one note and you keep countering the notes and you keep including encounter and you prove that it counters lesson um some some number um I don't know I'll have to talk to you about that offline I'll have to think about that for a minute all right okay okay any other questions all right right Plus thank you [Music]
