Claim Borrow Incentive Rewards
Borrowers earn incentive rewards while their Obligation Account is staked in the borrow incentive program. Rewards accrue per debt asset and are paid in the reward coin of the incentive pool (for example SCA).
Stake/Unstake Obligation Account
An Obligation Account must be staked to earn rewards. Staking locks the obligation until it is unstaked.
Using ScallopClient
import { ScallopClient } from '@scallop-io/sui-scallop-sdk';
const scallopClient = new ScallopClient({
addressId: '695fcdc084f790c04eb068dc',
fullnodeUrl: 'https://fullnode.mainnet.sui.io:443',
secretKey: '...', // or mnemonics: '...'
});
await scallopClient.init();
const obligations = await scallopClient.query.getObligations();
const { id: obligationId, keyId: obligationKey } = obligations[0];
// Stake
await scallopClient.stakeObligation(obligationId, obligationKey);
// Unstake
await scallopClient.unstakeObligation(obligationId, obligationKey);Using ScallopBuilder
Check Claimable Rewards
The claimable rewards are listed under each debt of the obligation account.
Claim Rewards
Using ScallopClient
Using ScallopBuilder
claimBorrowIncentiveQuick returns the reward coin of one reward type, so call it once for each reward coin.
Was this helpful?