Skip to main content

Bonus

Introduction

The Bonus/Sponsorship feature enables everyone, including DAOs, to add sponsored tokens to specific Gauges to attract more voters. The bonus rewards will be distributed to users based on their locked $sDYSN proportion in each gauge.

For further insights, please consult the relevant explanations provided in the Dyson Finance mechanisms documentation.

Apr Calculation

Coming Soon

Claim bonus

We enable users to claim multiple tokens from multiple weeks within a single Bribe Contract call. For our main app, we store a mapping for official bribe contracts to gauge contracts, developer can get full address list here.

import { prepareClaimBribeMatrix } from '@dyson-finance/dyson-interface-sdk/actions'
import { isAddress, publicActions, TransactionReceipt } from 'viem'
import {
getWalletClient,
prepareWriteContract,
waitForTransaction,
writeContract,
WriteContractResult,
} from 'wagmi/actions'
//...
// example polygon-zkevm tokenList: Address[] => [DYSN address, USDC address]
// tokenList = [0x9CBD81b43ba263ca894178366Cfb89A246D1159C, 0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035]
// example week matrix: bigint[][] => tokenList index, week list
// weekMatrix = [[2826, 2827],[2821, 2028]]

const client = await getWalletClient({ chainId })
const { request } = await prepareWriteContract({
...prepareClaimBribeMatrix(client, {
tokenList,
weekMatrix,
}),
address: bribeAddress,
})

const tx = await writeContract(request)
const receipt = await waitForTransaction(tx!)

//...