Dividend Hub Installation
In order to be able to using our Dividend Hub, you must implement some function into your smart contract following our standards.
Last updated
In order to be able to using our Dividend Hub, you must implement some function into your smart contract following our standards.
Last updated
What you need to do is quite simple, you only need to add few functions below into your smart contract which later will be used by our frontend to communicate.
For full example of implementation, feel free to observe DoKEN Smart Contract as an example at
DoKENRewardAddress function expect returns the reward address token. for example if your token has offering cake token, then it should return the cake token address.
DoKENDividendTrackerAddress function expect returns the dividend tracker address of your project
DoKENRewardOnPool function expect returns the value of total reward that is not been distributed yet. In other words, is the balance of your reward pool ( dividendTracker ) in form of rewardToken. The return value must be in uint256, and do not divide the value by corresponding token decimals, just leave it as it is
DoKENTokenFees expect returns a multiple uint256 values, and it must be a number that represent the percentage of fees.
These numbers must be presented in these order :
totalFee,rewardFee,liquidityFee,marketingFee,developerFee,additionalSellingFee
DoKENRewardDistributed expect returns the amount of distributed reward in uint256 values, do not divide the amount with the corresponding token decimal. just leave it as it is
DoKENGetAccountDividendsInfo Expect returns a dividend information by address, the return values should in these order
address account,
int256 index
int256 iterationsUntilProcessed
uint256 withdrawableDividends
uint256 withdrawnDividends
uint256 totalDividends
uint256 lastClaimTime
uint256 nextClaimTime
uint256 secondsUntilAutoClaimAvailable
DoKENRewardPaid expect return a uint256 value of the paid reward for the corresponding holder address
DoKENRewardUnPaid expect return a uint256 value of the unpaid reward for the corresponding holder address
DoKENRewardClaim will be use to communicate with your project claim function
DoKENNumberOfDividendTokenHolders Expect to returns the total holders of the dividend
Lets say you already have a deployed contract, and not implementing DoKENDividendHub Interface, but want to be able to register on our DividendHub.
Changing contract code is impossible ( assumed you're not using upgradable contract ) , so the alternative would be you have to create a new contract as the middle man of our dapps to your real contract, and we call it "DoKENHubProxy"
How can you make one ? Lets follow our next documentation