near-contract-helper
near-contract-helper copied to clipboard
Rate limit faucet by IP
Overview
We're experiencing issues with users "mining" the faucet to accumulate large amounts of NEAR.
To prevent this, we should implement rate limiting by IP address.
Relevant route: https://github.com/near/near-contract-helper/blob/master/app.js#L83
Acceptance Criteria
- [ ] A unique IP address is unable to receive more than 500 NEAR per hour (1 account)
- [ ] Calls to
/account
return an error "Account limit reached. Try again in 60 minutes" if the IP is over the limit
Closing for now, as we decided to adjust faucet amount instead
@kcole16 I think we should re-open with lower priority. We still need to figure out long term solution.
Maybe for example we should always use POA setup as primary networks for development and have strict limits on testnet/betanet faucets, etc.