daostack / infra

GNU General Public License v3.0
25 stars 22 forks source link

possible bug with the threshold to move to the preboosted state #50

Closed jellegerbrandy closed 5 years ago

jellegerbrandy commented 5 years ago

In line https://github.com/daostack/infra/blob/master/contracts/votingMachines/GenesisProtocolLogic.sol#L518 the _score of the proposal is compared to the confidenceThreshold.

The _score is calculated here: https://github.com/daostack/infra/blob/master/contracts/votingMachines/GenesisProtocolLogic.sol#L720. It is rounded down to the nearest integer.

Suppose the confidence threshold = 1.4, and and there are 160 stakes for yes, and 100 for no. In that case, the _score is int(160/100) = 1, which is below the threshold.

Which is not what you'd expect :-)