Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 1.17 KB

File metadata and controls

38 lines (20 loc) · 1.17 KB

Kind White Buffalo

Medium

Vouch amount can be lower than minimum

Summary

When vouching the minimum vouch amount must be >= ABSOLUTE_MINIMUM_VOUCH_AMOUNT (0.0001 ether), however, it can be lower than that as the validation is not sufficient.

Root Cause

In vouchByProfileId:380 it is validated that msg.value is not lower than the minimum vouch amount, however, the actual vouch amount will always be less than msg.value due to the fees. Therefore, it is possible for the msg.value to be higher than the minimum, whilst the actual vouch is not.

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. vouchByProfileId is called with msg.value = ABSOLUTE_MINIMUM_VOUCH_AMOUNT
  2. 10% of the ETH is deducted due to the fees, and the amount of the vouch lowers below the minimum

Impact

An important invariant of the protocol is broken.

PoC

No response

Mitigation

Validate whether toDeposit is not lower than ABSOLUTE_MINIMUM_VOUCH_AMOUNT.