Merge branch 'feature/V2' of github.com:DODOEX/contractV2 into feature/V2

This commit is contained in:
mingda
2021-01-11 09:44:41 +08:00
65 changed files with 978 additions and 4288 deletions

View File

@@ -82,7 +82,7 @@ library DODOMath {
} else if ((ki * delta) / ki == delta) {
sqrt = (ki * delta).div(V1).add(DecimalMath.ONE2).sqrt();
} else {
sqrt = (4 * k).mul(i).div(V1).mul(delta).add(DecimalMath.ONE2).sqrt();
sqrt = ki.div(V1).mul(delta).add(DecimalMath.ONE2).sqrt();
}
uint256 premium =
DecimalMath.divFloor(sqrt.sub(DecimalMath.ONE), k * 2).add(DecimalMath.ONE);