-
Notifications
You must be signed in to change notification settings - Fork 11
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
Further limit draining faucet before the hackathon weekend #164
Comments
Thanks for raising this @ericnakagawa 👍 Convo started on Slack and moved over here. I checked, the faucet address (0x22579CA45eE22E2E16dDF72D955D6cf4c767B0eF) is indeed low on tokens. faucet.celo.org also display a message that the faucet is low on tokens: |
Eric is hosting a hackathon this weekend and needs the faucet to be accessible to devs. |
It looks like the current faucet balance is:
Source: https://alfajores.celoscan.io/address/0x22579ca45ee22e2e16ddf72d955d6cf4c767b0ef |
Checking how much the faucet distributes at the moment. From here faucet/apps/firebase/src/database-helper.ts Lines 205 to 222 in c95522e
we know it's the amounts set here faucet/apps/firebase/src/config.ts Lines 3 to 12 in c95522e
Checking what the amounts are set to. Following the setup instructions in readme.md: $ cd apps/firebase
$ yarn dlx firebase-tools@latest logim
# ...
$ yarn install From firebase/README.md, we get the config values with: $ yarn cli config:get --net alfajores
{
// ...
"authenticated_stable_amount": "5000000000000000000",
"authenticated_gold_amount": "5000000000000000000",
"faucet_gold_amount": "500000000000000000",
"faucet_stable_amount": "500000000000000000",
// ...
} Converting from wei to ethers # authenticated
$ cast from-wei 5000000000000000000 ether
5.000000000000000000
# not authenticated
$ cast from-wei 500000000000000000 ether
0.500000000000000000 |
Ideas to avoid faucet being empty:
|
Ideas to fill the faucet by the weekend:
|
|
Historical context: Aaron shared that the faucet is currently only getting replenished using carbon offsetting rewards. $ celocli network:parameters --node alfajores
...
EpochRewards:
carbonOffsetting:
factor: 0.25
partner: 0x22579CA45eE22E2E16dDF72D955D6cf4c767B0eF
... The faucet address is set as the carbon offset reward recipient: In the past, the faucet was replenished by transferring funds from a larger funder account. |
Asked for help to make a short-term transfer to the faucet for the weekend hackathon. |
This address Source: https://alfajores.celoscan.io/address/0xb8c3475d736ab7c587b3fcf6a4e2d55136d4968f It then seems to be sending them on to Source: https://alfajores.celoscan.io/address/0xb8c3475d736ab7c587b3fcf6a4e2d55136d4968f That address Source: https://alfajores.celoscan.io/address/0x90c68a26b792814e99ac8e337f5b1bb47136f9ff |
The faucet balance has been drained by 100,000 |
It might be necessary to limit the amount of |
The faucet seems to be funded by carbon offsetting rewards once per epoch (= day): Source: https://explorer.celo.org/alfajores/block/23241600/epoch-transactions |
The funding amount fluctuates with use, because carbon offset rewards depend on network usage. In recent days it's around ~900-1,000 Source: https://explorer.celo.org/alfajores/block/23241600/epoch-transactions Source: https://explorer.celo.org/alfajores/block/23224320/epoch-transactions Source: https://explorer.celo.org/alfajores/block/23207040/epoch-transactions |
Other ideas to limit abuse:
|
The faucet used be funded every hour: |
This address Eric briefly funded the faucet with 25 Source: https://explorer.celo.org/alfajores/address/0x22579CA45eE22E2E16dDF72D955D6cf4c767B0eF |
Hi @arthurgousset ! Thanks for the explanation. Do we know what authentication method is the draining bot using? |
This address |
Yes, the bot is using a Github authenticated account to request 5 But, more importantly, we have a mechanism in place that doesn't fund any address that has more than 20 That means if the bot has a balance >= 20 Technically, the bot could be updated to always have a balance < 20 Depends how quickly they'll update the scripts. I'll look into better long-term solutions to prevent abuse. |
Unfortunately, it looks like the bot is still able to request 5 |
One short-term fix could be to reduce the amount of Currently, it's 5 |
Whenever the bot's balance is above 20, the faucet doesn't send tokens as expected 👍 Here |
We could consider limiting requests per Github user per day. We could store a hash of the Github username, so it anonymizes users, but still uniquely identifies them. We could also limit requests to 1x per day. |
|
(for future reference) |
We also sent @ericnakagawa 50,000 CELO as a short-term fix for the weekend. That way he can top up the faucet independently, if he has a short-term need, and the faucet is still affected by the abuse. |
I'm closing this issue as it pertains to the hackathon weekend, and opened a new issue for longer-term changes to prevent abuse:
|
Describe the feature you would like
I’d like a way to further limit draining of testnet faucet.
One idea is to require GitHub auth via Social Connect to further limit abuse.
Additional context
No response
The text was updated successfully, but these errors were encountered: