Problem Statement
quantara/web_app/contract_tools/airdrop.py:27 defines REWARD_API_ENDPOINT = "https://app.zklend.com/api/reward/all/" — a zkLend (Starknet lending protocol) endpoint. Quantara is on Stellar, but the airdrop fetcher queries a Starknet protocol's rewards API.
Evidence
# quantara/web_app/contract_tools/airdrop.py:26-27
# Default endpoint – replace with the actual protocol airdrop API
REWARD_API_ENDPOINT = "https://app.zklend.com/api/reward/all/"
The comment acknowledges it needs replacement but it was never changed. Airdrop checking queries wrong blockchain's protocol.
Impact
High — incorrect airdrop data. Users see incorrect or no airdrop information. The AirdropFetcher.get_contract_airdrop() method queries zkLend for airdrop data that may not correspond to any Stellar-based protocol. The AirdropResponseModel parsing expects zkLend's response format.
Proposed Solution
Replace zkLend API with an equivalent Stellar protocol's airdrop/rewards API. Update AirdropFetcher to parse the new API response format. If no Stellar protocol has airdrop programs, remove or stub the functionality.
Acceptance Criteria
File Map
quantara/web_app/contract_tools/airdrop.py:27 — change REWARD_API_ENDPOINT
quantara/web_app/tasks/claim_airdrops.py — update claim logic
quantara/web_app/tests/test_airdrop.py — update tests
quantara/web_app/tests/test_zklend_airdrop.py — rename/remove
Testing Strategy
- Unit: Test
AirdropFetcher with mocked new API responses
- Integration: Query real Stellar protocol airdrop API if available
Security Considerations
Querying wrong blockchain's API may return confusing or misleading data displayed to users. If functionality is not needed, removing it reduces attack surface.
Definition of Done
Labels: bug
Priority: High
Difficulty: Advanced
Estimated Effort: 1d
Problem Statement
quantara/web_app/contract_tools/airdrop.py:27definesREWARD_API_ENDPOINT = "https://app.zklend.com/api/reward/all/"— a zkLend (Starknet lending protocol) endpoint. Quantara is on Stellar, but the airdrop fetcher queries a Starknet protocol's rewards API.Evidence
The comment acknowledges it needs replacement but it was never changed. Airdrop checking queries wrong blockchain's protocol.
Impact
High — incorrect airdrop data. Users see incorrect or no airdrop information. The
AirdropFetcher.get_contract_airdrop()method queries zkLend for airdrop data that may not correspond to any Stellar-based protocol. TheAirdropResponseModelparsing expects zkLend's response format.Proposed Solution
Replace zkLend API with an equivalent Stellar protocol's airdrop/rewards API. Update
AirdropFetcherto parse the new API response format. If no Stellar protocol has airdrop programs, remove or stub the functionality.Acceptance Criteria
REWARD_API_ENDPOINTchanged to Stellar protocol endpoint (or airdrop feature removed)AirdropFetcher._validate_response()updated for new response formattest_zklend_airdrop.pyrenamed/removed as it's Starknet-specificFile Map
quantara/web_app/contract_tools/airdrop.py:27— change REWARD_API_ENDPOINTquantara/web_app/tasks/claim_airdrops.py— update claim logicquantara/web_app/tests/test_airdrop.py— update testsquantara/web_app/tests/test_zklend_airdrop.py— rename/removeTesting Strategy
AirdropFetcherwith mocked new API responsesSecurity Considerations
Querying wrong blockchain's API may return confusing or misleading data displayed to users. If functionality is not needed, removing it reduces attack surface.
Definition of Done
Labels: bug
Priority: High
Difficulty: Advanced
Estimated Effort: 1d