A Farcaster Cast Action that enables reporting of suspicious sybil accounts, creating an open database of potential sybil activity that can be used by researchers and developers to improve sybil detection algorithms.
You can help the community by reporting suspicious sybil activity! Here's how:
- Quick Share: Create a cast with this link to share Report Sybil on Warpcast:
https://op-report-sybil-farcaster-frame.vercel.app/api/add-report-sybil
- Adding without sharing: Alternatively, add the cast-action directly through Warpcast's developer tools using this link
We encourage users to report suspicious sybil accounts to help maintain the integrity of the Farcaster ecosystem.
Requirements:
- docker
- docker-compose
- postgres@16
- node@20.X
- ngrok (must have a ngrok account and a configured static domain. Check ngrok.com/getting-started and ngrok.com/domains)
1.1 Create a .env from .env.example
1.2 Set APP_URL as your ngrok domain
1.3 (optional) set a safer captcha encyption key
2.1 In a new terminal, run:
cd docker
docker-compose up -d
2.2 Check if the database was created
docker exec -it report-sybil-frame-container psql -U myuser -d postgres
\c report_sybil_frame_database
SELECT * FROM reports;
In a second terminal:
yarn install
npx prisma generate
yarn dev
Open a third terminal and run:
ngrok http --url=<your-ngrok-url> http://localhost:3000
5.1 Go to Warpcast developer tool, type <your-ngrok-url>/api/add-report-sybil
and add the report-sybil cast-action to your cast-actions bar
5.2 Find a sybil suspicious cast (i.e. this one) and use the Report Sybil cast-action
5.3 Back in the database terminal, run again SELECT * FROM reports;
to check if the new row was added
5.4 Now check that the API is working by searching on your browser:
<your-ngrok-url>/get-reports?fid=<fid-of-sybil-you-just-reported>
<your-ngrok-url>/get-report-count?fid=<fid-of-sybil-you-just-reported>
The API provides a single GET endpoint:
GET /api/check-sybil?fid={fid}
{
"success": true,
"data": {
"fid": string,
"fname": string | null,
"sybilProbability": number | null,
"diagnosis": "benign" | "sybil" | null,
"humanReports": number,
"sybilReports": number,
"lastUpdatedProbability": string // ISO 8601 date string
}
}
- fid: The Farcaster ID that was queried
- fname: The Farcaster username associated with the FID, if any
- sybilProbability: Probability score of the account being a sybil (0-1), if available
- diagnosis: Final diagnosis based on sybil probability
- "benign": Account is classified as legitimate
- "sybil": Account is classified as a sybil
- null: No classification available
- humanReports: Number of unique reporters who flagged this account as human
- sybilReports: Number of unique reporters who flagged this account as sybil
- lastUpdatedProbability: Timestamp of when the sybil probability was last updated
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.