Closed rbharath closed 5 years ago
At present, the transferStake method in Voting.vy (called from resolveChallenge in Listing.vy) overwrites the stake in its destination address (see https://github.com/computablelabs/goest/blob/master/contracts/Listing.vy#L217):
transferStake
Voting.vy
resolveChallenge
Listing.vy
self.stakes[addr][hash] = staked
This can cause errors in flow. In particular, if a maker has successfully fended off two challenges, the stake for their listing will be incorrect. This line should be changed to
self.stakes[addr][hash] += staked
The line in question is: https://github.com/computablelabs/goest/blob/master/contracts/Voting.vy#L213
Fixed by #144.
Re-opening after rollback
Re-implemented in #169
At present, the
transferStake
method inVoting.vy
(called fromresolveChallenge
inListing.vy
) overwrites the stake in its destination address (see https://github.com/computablelabs/goest/blob/master/contracts/Listing.vy#L217):This can cause errors in flow. In particular, if a maker has successfully fended off two challenges, the stake for their listing will be incorrect. This line should be changed to