231 views
# 5000 FLT for your Nixpkgs Commits The [Fluence DAO](https://fluence.network/governance) has decided to distribute 5000 [FLT](https://www.coingecko.com/coins/fluence-2) to each GitHub user that has contributed to "web3 repositories" according to an announcement from 2024-02-27 [on their blog](https://blog.fluence.network/the-future-is-cloudless-fluences-depin-computing-platform-and-flt-token-are-now-live/) (see also their [FAQs](https://blog.fluence.network/fluence-developer-community/)). For their definition of a "web3 repository", they are using the ["_Crypto Ecosystems_ taxonomy" by "Electric Capital"](https://github.com/electric-capital/crypto-ecosystems). It turns out, that [this taxonomy lists multiple forks of Nixpkgs](https://github.com/search?q=repo%3Aelectric-capital%2Fcrypto-ecosystems+nixpkgs&type=code). It is unclear which commit range of Nixpkgs exactly is relevant, but all GitHub accounts with commits in Nixpkgs "in 2023" and suitable SSH keys (see below) should be eligible. **SSH Key Required.** Fluence scraped public RSA (key format specifier exactly `ssh-rsa`) and Ed25519 (key format specifier exactly `ssh-ed25519`) keys from `https://github.com/${USERNAME}.keys` to encrypt a challenge. Thus, you can only claim tokens if you had at least one such public key registered with GitHub at the time of scanning (2024-Q1) *and* you are currently in control the corresponding private key(s). **Two Months Delay.** The tokens are not immediately available once claimed, you can only unlock them two months after claiming. There are two separate invocations with [the smart contract](https://etherscan.io/token/0x6081d7f04a8c31e929f25152d4ad37c83638c62b) required: 1. Call [`claimTokens`](https://etherscan.io/token/0x6081d7f04a8c31e929f25152d4ad37c83638c62b?a=0xBa41e1b0F0967fDD0EDde83Fc10Fdf7c78A4b60E#writeContract#F1) to prove that you control a private key associated to the GitHub account that they would like to reward. This will associate FLT-DROP with your account, locked for two months. 2. Call [`transfer`](https://etherscan.io/token/0x6081d7f04a8c31e929f25152d4ad37c83638c62b?a=0xBa41e1b0F0967fDD0EDde83Fc10Fdf7c78A4b60E#writeContract#F2) two months later to transfer [FLT](https://etherscan.io/token/0x236501327e701692a281934230af0b6be8df3353) to your account. **Reward Decreases.** The amount you may claim halves every three months and the overall claiming period is one year. | After (UTC) | Amount [FLT] | |---|---:| | 2024-02-27 22:04:23 | 5000 | | 2024-05-27 22:04:23 | 2500 | | 2024-08-27 22:04:23 | 1250 | | 2024-11-27 22:04:23 | 625 | | 2025-02-27 22:04:23 | 0 | **Exchange Rate.** As of 2024-04-09 the token trades in the range of 0,75 EUR to 1,25 EUR [according to CoinGecko](https://www.coingecko.com/coins/fluence-2). ## Checking Eligibility You may enter your GitHub username on their website <https://claim.fluence.network>. Otherwise, you may download ca. 238 MiB from Amazon S3 and use [`jq`](https://jqlang.github.io/jq/) to filter: ``` curl 'https://fluence-dao.s3.eu-west-1.amazonaws.com/metadata.json' \ | jq --arg username ${USERNAME} '.encryptedKeys[$username]' ``` Or, if you use [`gh`](https://cli.github.com/): ``` curl 'https://fluence-dao.s3.eu-west-1.amazonaws.com/metadata.json' \ | jq --arg username "$(gh api user --jq .login)" '.encryptedKeys[$username]' ``` The output is an object, where keys are the public keys (compare those with e.g. `~/.ssh/*.pub`, SSH Agent, or your keyring) and the values are the respective challenges that you have to decrypt as a form of proof. ## How To Claim We split this into two parts: 1. Producing your proof (offline, after downloading the challenge from AWS). 2. Sending your proof (online, using an Ethereum account, calling a smart contract). The simple reason being, that if you would like to donate your FLT to someone, you may stop after the first part, hand over your proof to the donee and tell them to do the second part on their own. ### Producing Your Proof There are at least three ways to make the claim. In all three cases you require the private key to one of the public keys associated with your GitHub profile, and an Ethereum wallet/account with some ETH to cover fees. 1. [Instructions from Fluence for doing all steps manually](https://github.com/fluencelabs/dev-rewards/blob/main/MANUAL_INSTRUCTIONS.md) using `age`, `curl`, `xxd`, `sha3sum`, `openssl`. - `sha3sum` is not packaged in Nixpkgs but you can replace `sha3sum -a Keccak256 | awk -F $'\xC2\xA0' '{ print $1 }'` with `openssl dgst -keccak-256 | cut -d' ' -f2` (requires `openssl_3_2`). 2. [Instructions from Fluence for using Docker (without networking).](https://github.com/fluencelabs/dev-rewards/tree/main?tab=readme-ov-file#generate-proof-in-docker) 3. <details><summary> The following patch turns Fluence's <a href="https://github.com/fluencelabs/dev-rewards/blob/1f91d919328d6a8cadd9e06727b6299320e686d8/proof-sh/proof.sh"><code>proof.sh</code></a> into a nix-shell script. </summary> ```patch @@ -1,4 +1,5 @@ -#!/usr/bin/env bash +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6.tar.gz -i bash --pure --packages coreutils xxd age openssl_3_2 curl gawk set -o errexit -o nounset -o pipefail # TODO: what about openssl versions? maybe use python for signing? @@ -32,7 +33,7 @@ # check that everything installed PATH="./bin:${PATH}" -for i in age base64 sha3sum; do +for i in age base64; do check_program_in_path $i done @@ -67,8 +68,7 @@ ETHEREUM_ADDRESS="$2" else if [ ! -f "$METADATA_BIN" ]; then - echo "$METADATA_BIN doesn't exist" - exit 1 + curl -o "$METADATA_BIN" 'https://fluence-dao.s3.eu-west-1.amazonaws.com/metadata.bin' fi printf "\nWelcome to the proof generation script for Fluence Developer Reward Airdrop." @@ -194,8 +194,7 @@ PREFIX_HEX=$(echo -n $'\x19Ethereum Signed Message:\n'${LENGTH} | xxd -p) DATA_HEX="${PREFIX_HEX}${ETH_ADDR_HEX_ONLY}" -## '|| true' is needed to work around this bug https://gitlab.com/kurdy/sha3sum/-/issues/2 -HASH=$(echo -n "$DATA_HEX" | xxd -r -p | (sha3sum -a Keccak256 -t || true) | sed 's/[^[:xdigit:]].*//') +HASH=$(echo -n "$DATA_HEX" | xxd -r -p | openssl dgst -keccak-256 | cut -d' ' -f2) ## Write temporary eth key to file in binary format (DER) cat "$DECRYPTED_DATA" | cut -d',' -f3 | xxd -r -p -c 118 >"$ETH_KEY_DER" ``` </details> ### Sending Your Proof Go to <https://claim.fluence.network>, enter your GitHub username, connect your wallet. The website will prepare the call to the smart contract for you. Before you send it, make sure you have enough ETH in your account to pay associated fees and make sure that you are using the contract linked above. ## Donating It is straightforward to send your proof to someone else, and have them claim for you. However, one Ethereum account may only claim once. There's fees per claim. Given this upfront cost, and unclear value of FLT after the lockup period of two months, it's unlikely that someone would be willing to organize donations. If you are willing to handle donations, please add your info here and post to Discourse so that this Hedgedoc can be set to read-only, protecting donation information. ## See Also It's not the first time that someone donates tokens to Nixpkgs committers: - [Discussion about this on Discourse.](https://discourse.nixos.org/t/fluence-developer-rewards/43082) - [Discussion about Starknet Cryptocurrency “contributions” on Discourse](https://discourse.nixos.org/t/starknet-cryptocurrency-contributions/40268) - https://pad.lassul.us/starknet