Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - rate limit guard? #22

Open
ohaddahan opened this issue Oct 4, 2022 · 3 comments
Open

Question - rate limit guard? #22

ohaddahan opened this issue Oct 4, 2022 · 3 comments

Comments

@ohaddahan
Copy link

Is there a plan for rate limiting guard?

Not sure if needed , since the bot tax has been quite successful in reducing spam.

If it's needed , I can open a PR.
Plan is, having a PDA used as a mini blockchain.

As in, client reads PDA data and pass that to minting instruction.

The program will compare PDA data to client input and hash this data with a nonce from client or clock time, and update the PDA.

This means that only one can mint until the network propagates the new state and clients can pass the correct PDA info again.

Can also be expanded to store an array of size X if a higher throughput is desired.

@febo
Copy link
Contributor

febo commented Oct 5, 2022

Interesting. Perhaps this could be a time-based one, so it is more predictable. Like, you are allowed to mint one every 30 seconds. So the PDA would have the timestamp of the last mint transaction of the user and a new mint will only be allowed if the difference between the last transaction time and the clock time is over a certain limit.

@ohaddahan
Copy link
Author

Yeah time limit also possible, simpler and easier to config specific rate.
Can just allow specific number of mints per time interval.
Will update my PR accordingly.

@austbot
Copy link

austbot commented Nov 24, 2022

I like this, @ohaddahan

@febo febo transferred this issue from metaplex-foundation/mpl-candy-guard Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants