- DoS when the list has more than ~5527 items. Every time the median is calculated, it loops through the entire list to get the size and then loop
size / 2
to get the median itself. Consider storing and update the size of the list every time the user insert or remove a node along with the two nodes which are part of the median in thestruct
. The worst scenario for an insert could ben - 1
loop wheren
is the size of the list. Consider using a binary search in order to reduce as much as possible a possible DoS.
Livepeer team requested the LIP-25 proposal revision by auditing the Governor smart contract, the commit referenced for this audit is ac98605f78520b0ef43e31d0d20d0efbf2d32876.
- Based on how each update is staged, if for some reason two calls are needed within a delay, the second one will fail. Even it is not part of the spec, a common usage as set regular payments won't be possible. This could be allowed by using a
nonce
allowing the same call to be staged more than once.
OlderNewer