v0.18.1

Overview

This release contains two changes:

  • A fix to a -1 percentage issue. In rare circumstances SDK was inaccurately calculating vote percentages resulting in one of the answer options getting -1%.

  • Percentages calculation approach has been replaced with a different approach based on Hamilton’s method. This method produces fairer results as we illustrate in the table below.

    // Raw votes per answer option
    [88267, 273, 255, 284, 225, 258, 258, 248, 224, 233]
    
    // Total
    90,525
    
    // 2 decimal places precision percentages
    [97.51%, 0.30%, 0.28%, 0.31%, 0.25%, 0.29%, 0.29%, 0.27%, 0.25%, 0.26%]
    
    // Percentages calculation prior to v0.18.1
    [99, 0, 0, 1, 0, 0, 0, 0, 0, 0]
    
    // Percentages calcualtion post v0.18.1
    [98, 1, 0, 1, 0, 0, 0, 0, 0, 0]

Last updated