audit fix02

This commit is contained in:
owen05
2020-12-09 11:20:27 +08:00
parent ca692ee548
commit fc39f709f2
6 changed files with 41 additions and 5 deletions

View File

@@ -123,7 +123,7 @@ library DODOMath {
if (k == DecimalMath.ONE) {
// if k==1
// Q2=Q1/(1+ideltaBQ1/Q0/Q0)
// temp = (1+ideltaBQ1/Q0/Q0)
// temp = ideltaBQ1/Q0/Q0
// Q1-Q2 = Q1*(temp/(1+temp))
uint256 temp = i.mul(delta).mul(V1).div(V0.mul(V0));
return V1.mul(temp).div(temp.add(DecimalMath.ONE));