This commit is contained in:
owen05
2021-01-07 21:58:24 +08:00
parent b2c8668a12
commit 267ad24edc
9 changed files with 18 additions and 69 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