Skip to content

fix: prevent sybil bypass via delete then re claim and fix status code mismatch#25

Open
Sertug17 wants to merge 1 commit into
base:masterfrom
Sertug17:fix/sybil-protection-bypass
Open

fix: prevent sybil bypass via delete then re claim and fix status code mismatch#25
Sertug17 wants to merge 1 commit into
base:masterfrom
Sertug17:fix/sybil-protection-bypass

Conversation

@Sertug17

@Sertug17 Sertug17 commented Jun 14, 2026

Copy link
Copy Markdown
There was a bug in the airdrop claim flow someone could delete their claim via delete-airdrop, then re-claim with a different wallet using the same social account. The delete was removing the verification token entirely, so the re verification check had nothing to find.

Added a DeletedToken model. When someone deletes their claim, the token gets saved there instead of being thrown away. On re verification, we check both the active records and the deleted token table.

Also fixed a smaller issue: the frontend was checking for HTTP 400 but the backend returns 412 for "traits not satisfied". Dead code basically that error path never worked. Changed the frontend check to 412.

…e mismatch

Bug 1 (Critical): delete-airdrop removes user record but does not track
the verification token. A user can claim multiple times with different
wallets using the same verified social account. Fixed by adding a
DeletedToken model that tracks tokens from deleted claims, checked on
re-verification.

Bug 2 (Minor): Frontend checks HTTP 400 but backend returns HTTP 412
for traits-not-satisfied. Fixed frontend to match backend status code.

Closes base#24
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@Sertug17 is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@Sertug17

Copy link
Copy Markdown
Author

Would appreciate a review on this when either of you gets a chance. Fixes a sybil bypass in the claim flow (delete + re-claim reuses the same verification token) and corrects a status code mismatch between frontend and backend for the traits-not-satisfied path.

@patnir @kushagras481

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

Successfully merging this pull request may close these issues.

1 participant