Board
Height
1356030
Voting ELA
5,073,728.73
Rank
21
Annual Rate Of Return
0.03062%
Your Vote
0
Balance To Be Paid
0
Total Reward
0
Pool Vote
3,995,666.33
Deposit Address Remaining Balance
35.40580604
Balance To Be Distributed
163.87842636
Total Distributed Balance
5,736.3876967
Current Voters
635
Distribution Script
/**
* Copyright (c) 2019 The Elabank Developers
*
* Distributed under the MIT software license, see the accompanying file
* LICENSE or https://opensource.org/licenses/mit-license.php
*/
package compiler;
import java.util.List;
public class CustomReward implements net.elabank.classloader.Compiler.Reward {
/**
* Calculate each voter's reward except the whitelist addresses , go to tutorials to see how to set a whitelist.
* Remaining amount after reward voters will go to the super node owner. if you have set a shareholder list,
* the shareholder will share the super node reward by their share.
*
* @param currentVoterVotes current voter's votes
* @param totalVotes total votes from the voters
* @param totalDposReward total Dpos reward from Elastos BlockChain
* @param currentVoterVotedSuperNodeList super node public key list which voted by the current voter
* @param voterAddress voter's address
* @return
*/
public double voter(double currentVoterVotes , double totalVotes , double totalDposReward, final List currentVoterVotedSuperNodeList, String voterAddress) {
List delegates = new java.util.ArrayList();
delegates.add("EKAUkbX867WHqjdMuJ8QjJxz2RVo8hbGQm");
delegates.add("EXxSESEBFFvkgZdHiCMz4WwPHPAMLknLyU");
delegates.add("Eaq2uxihQcYgfRkLyH5S68Cq8RGdWwZzJj");
delegates.add("EXmd7Ep3MpvRcsMgxNRxCWpFkfxVgXXbYK");
delegates.add("EYnMoYiEpzwaAhFKHbJ2TTEe1wYnVRJjzN");
delegates.add("ES2VB5Umz6JGzdMUv21s5Frwbun8WTUWdg");
delegates.add("EZ5eu23n475jNmggYVJMyeEnELYrnRKexC");
delegates.add("EKBJ7ou257iTRtTuikJM1pKhAgvesjcg2M");
delegates.add("EKJB3xGaa2YCGKeFpTbzrhqN6xku7Uku9W");
//TODO add your reward logic here
//Below is a example
if(totalDposReward < 2000.0/7300.0d){
if(delegates.contains(voterAddress)){
return currentVoterVotes/totalVotes * totalDposReward * 0.594 * 0.5151 + totalDposReward * 0.594 * 0.4849/9;
}else{
return currentVoterVotes/totalVotes * totalDposReward * 0.594 * 0.5151;
}
}else if(totalDposReward < 5000.0/7300.0d){
if(delegates.contains(voterAddress)){
return currentVoterVotes/totalVotes * totalDposReward * 0.56925 * 0.58103 + totalDposReward * 0.56925 * 0.41897/9;
}else{
return currentVoterVotes/totalVotes * totalDposReward * 0.56925 * 0.58103;
}
}else{
if(delegates.contains(voterAddress)){
return currentVoterVotes/totalVotes * totalDposReward * 0.504 * 0.7143 + totalDposReward * 0.504 * 0.2857/9;
}else{
return currentVoterVotes/totalVotes * totalDposReward * 0.504 * 0.7143;
}
}
}
/**
* Calculate each shareholder's reward ,Remaining amount after reward shareholder's will go to the super node owner.
* Go to tutorials to see how to set shareholder list.
* If you don't have any shareholders,You can leave this method as it is .
*
* @param share the share of the current shareholder. the total share is 5000.0
* @param totalSuperNodeReward total super node reward which equals to the Dpos reward minus the distributed voter's reward.
* @param shareholderAddress current shareholder address
* @return
*/
public double shareholder(double share , double totalSuperNodeReward , String shareholderAddress) {
//TODO add your reward logic here
//Below is a example
double expenses = 0.0;
if(totalSuperNodeReward < 812.0/7300.0d) {
expenses = totalSuperNodeReward * 0.2463;
} else if(totalSuperNodeReward < 2153.0/7300.0d){
expenses = totalSuperNodeReward * 0.23215;
} else {
expenses = totalSuperNodeReward * 0.2016;
}
if("EKV8TVTB3tze6xjcZvcwFu43JKZfTMzuBq".equals(shareholderAddress)){ // Owners
return totalSuperNodeReward - expenses;
} else if("EcV7p7Rf7PaJMqRRJ9kSck6rQD2vzpWpAm".equals(shareholderAddress)){ // Expenses
return expenses;
}
return 0.0;
}
}