Add SparkDEX Adapter for Flare Network #2069
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add SparkDEX Adapter for Flare Network
Overview
This PR adds a new SparkDEX adapter to provide yield information for the SPRK token ecosystem on the Flare network. The adapter integrates with SparkDEX's dividends smart contract to deliver real-time APY data for xSPRK staking pools.
What is SparkDEX?
SparkDEX is a decentralized exchange and staking protocol on the Flare network that allows users to:
Adapter Details
Project Information
sparkdex
flare
Smart Contract Integration
0x710a578356A3Dfa7C207B839D3E244807b2f5AFE
0x657097cC15fdEc9e383dB8628B57eA4a763F2ba0
0xB5Dc569d06be81Eb222a00cEe810c42976981986
Data Sources
@defillama/sdk
Implementation
Contract Calls
The adapter makes the following smart contract calls:
distributedTokensLength()
- Get count of distributed tokensdistributedToken(index)
- Get token address at specific indextotalAllocation()
- Get total xSPRK allocationdividendsInfo(token)
- Get dividend information for specific tokenAPR Calculation
Pool Structure
Testing
Contract Integration
Sample Data (from live contract)
Files Added
src/adaptors/sparkdex/index.js
- Main adapter implementationsrc/adaptors/sparkdex/dividends-abi.json
- Smart contract ABIsrc/adaptors/sparkdex/README.md
- DocumentationChecklist
@defillama/sdk
for contract callsWhy This Adapter?
Related Links
Note: This adapter has been tested with live contract data and provides accurate yield information for the SparkDEX protocol on Flare network.