Fees Collector Smart Contract (1.0.0)
Download OpenAPI specification:Download
The Fees Collector is a smart contract developed for the Klever network that manages the collection and distribution of fees and rewards. This contract is part of the energy integration system and works in conjunction with other modules to ensure fair and efficient reward distribution.
The Fees Collector contract provides:
- Fee Collection: Collects fees accumulated weekly from trading pairs
- Multi-token Support: Manages multiple tokens for fee distribution
- Weekly Tracking: Maintains records of fees accumulated per week
Claim Rewards
Allows users to claim their accumulated rewards from the Fees Collector.
How it works:
- Distributes rewards to users who hold XKFI and have Energy in their account
- Rewards are calculated based on the user's Energy amount relative to total Energy
- Supports weekly reward distribution cycles
Process:
- Verifies the user has XKFI tokens and accumulated Energy
- Calculates the user's share of rewards based on their Energy
- Distributes the proportional rewards to the user
- Updates the user's claim progress
Benefits of claiming regularly:
- Updates
getCurrentClaimProgress - Reactivates
getLastActiveWeekForUser - Synchronizes local data
- Corrects energy values through
refund_after_token_unlock()
Recommended maintenance flow:
- Check for expired positions
- Unlock expired positions
- Claim rewards
- Verify updated energy
Note: Users should claim rewards periodically (weekly recommended) to keep their storage updated and optimize energy calculations.
Request Body schema: application/jsonrequired
| scAddress required | string Fees Collector contract address |
| funcName required | string Value: "claimRewards" |
| args | Array of strings No arguments required |
Responses
Request samples
- Payload
Content type
application/json
{- "scAddress": "klv1qqqqqqqqqqqqqpgq9696g7x76kwrrh02fahn4rpem4v595t8c0nqgxzpmu",
- "funcName": "claimRewards",
- "args": [ ]
}Response samples
- 200
Content type
application/json
{- "data": {
- "returnData": [
- "reward tokens distributed to user"
], - "returnCode": "ok"
}
}