Faucet Integration Guide

This document provides instructions for integrating the Shield Finance faucet (https://faucet.shyield.finance/) with the main Shield Finance app's points system.

Overview

When users claim tokens from the faucet, the faucet should call the Shield Finance API to award points. This integration enables:

  • 15 points awarded per faucet claim

  • Points contribute to tier progression (Bronze → Silver → Gold → Diamond)

  • Higher tiers earn larger share of the 2M SHIELD mainnet airdrop

API Endpoint

POST /api/points/activity/external

Base URL (Production): https://shyield.finance Base URL (Testnet): https://testnet.shyield.finance (or your deployed URL)

Request Headers

Content-Type: application/json

Request Body

{
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "activityType": "faucet_claim",
  "metadata": {
    "tokenType": "SHIELD",
    "amount": "1000"
  },
  "apiKey": "your-api-key-here"
}

Parameters

Field
Type
Required
Description

walletAddress

string

Yes

Ethereum address (0x + 40 hex chars)

activityType

string

Yes

One of: faucet_claim, shield_faucet, flr_faucet

metadata

object

No

Additional data (tokenType, amount, txHash, etc.)

apiKey

string

No

API key for authentication (optional for now)

Activity Types

Activity Type
Points
Description

faucet_claim

15

Generic faucet claim

shield_faucet

15

SHIELD token faucet claim

flr_faucet

15

C2FLR token faucet claim

Success Response (200)

Error Responses

400 Bad Request - Invalid input

401 Unauthorized - Invalid API key (when API key is required)

429 Too Many Requests - Rate limit exceeded

500 Internal Server Error

Rate Limiting

  • Limit: 2 requests per wallet address per hour

  • Response: 429 with retryAfter (seconds until limit resets)

  • Rate limiting is per-wallet, not per-IP

Implementation Examples

Node.js / Express

React Frontend (for confirmation display)

Python

CORS Configuration

The API endpoint has CORS enabled for the following origins:

  • https://faucet.shyield.finance

  • https://shyield.finance

  • http://localhost:* (development)

If you need additional origins whitelisted, please contact the Shield Finance team.

Testing

Test with cURL

Verify Points

After logging a faucet claim, users can verify their points at:

  • Points Dashboard: https://shyield.finance/app/points

  • Leaderboard: https://shyield.finance/app/leaderboard

API Key Authentication (Future)

Currently, the API accepts requests without authentication for easy integration.

In the future, we may require API key authentication:

  1. Set FAUCET_API_KEY environment variable on the Shield Finance server

  2. Include apiKey in all requests from the faucet

Points System Overview

Tier
Points Required
Multiplier
Share of Airdrop

None

0

1x

Base allocation

Bronze

100+

1x

Base allocation

Silver

500+

1.5x

1.5x base

Gold

2,000+

2x

2x base

Diamond

5,000+

3x

3x base

Total Airdrop Pool: 2,000,000 SHIELD tokens

Support

For integration questions or issues:

Last updated