Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 935 Bytes

019.md

File metadata and controls

28 lines (20 loc) · 935 Bytes

Proud Rusty Mantis

Medium

Incorrect debasing percentage calculation causing a lower debase

Vulnerability Detail

If the CF is in a critical state, the debasing factor should increase by another 10% to help being back the CF (quoting the docs):

Further, the synthetics are debased an additional 10% beyond this rate

However, the percentage is incorrectly applied and instead the debase increases by ~9.09%.

Attack Path

  1. The debase factor is increased with this line:
criticalDebaseFactor = (criticalDebaseFactor * BASE_1000) / criticalDebaseMult;
  1. This results in $90 * 1000 / 1100 = 81,8181818182$ which is a 9.09091% decrease

Impact

Incorrect debase which causes the CF to remain lower than intended

Mitigation

+ criticalDebaseFactor = criticalDebaseFactor - (criticalDebaseFactor * 100 / 1000)
- criticalDebaseFactor = (criticalDebaseFactor * BASE_1000) / criticalDebaseMult;