The above processClaims call lets the Minter claim locked KAT rewards from Merkl and mint LKAT for users.
Setting the claim recipient and toggling the operator are necessary so that Minter can legally and technically claim the KAT on behalf of the user before converting it to LKAT.
Smart contract interfaces:
A. Distributor Contract Interface (Merkl Distributor)
function setClaimRecipient(address recipient, address token) external;
[ Allows the user to specify that their KAT rewards should go to a different address ]
function toggleOperator(address user, address operator) external;
[ Lets the user enable or disable an operator (like the Minter) to claim on their behalf ]
B. Minter Contract Interface (Levrex Minter)
[ Claims KAT rewards for users and mints LKAT in return ]
LKAT is a standard ERC20 burnable token (from OpenZeppelin) that anyone can burn.
It adds custom owner-controlled minting, dynamic minter lists, and disables ownership renouncement to ensure security and governance.
It adds custom owner-controlled minting, dynamic minter lists, and disables ownership renouncement to ensure security and governance.
Example flows for frontend and backend integration
Frontend (user side):
The user connects to the wallet.
Get Reward Details.
Fetch reward entitlements & Merkle proofs from Merkl API.
Bundle claim data (users, tokens, amounts, proofs).
Check if users has already executed setClaimRecipient & toggleOperator
Frontend helps user call:
- setClaimRecipient(Minter, KAT_ADDRESS)
- toggleOperator(user, Minter)
User Clicks Process Claims → frontend sends claim data & proofs directly to Minter Contract.
function processClaims(
address[] calldata users, // List of users to claim for
address[] calldata tokens, // Tokens to claim (e.g., KAT)
uint256[] calldata amounts, // Amounts to claim
bytes32[][] calldata proofs // Merkle proofs to verify entitlement
) external;