File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -903,14 +903,6 @@ access(all) contract TidalProtocol {
903903 adjustedCollateral = adjustedCollateral - collateralEffectiveValue
904904 log (" [CONTRACT] collateralTokenCount: \( collateralTokenCount ) " )
905905 log (" [CONTRACT] effectiveCollateralAfterDeposit: \( effectiveCollateral ) " )
906-
907- // We can calculate the available debt increase that would bring us to the target health, unless the health
908- // after deposit is an edgecase, in which case getting to the target health is impossible.
909- var availableDebtIncrease = (healthAfterAdjustment == UFix64.max ? effectiveCollateral : effectiveCollateral / targetHealth ) - effectiveDebt
910-
911- // var availableDebtIncrease = (effectiveCollateralAfterDeposit / targetHealth) - effectiveDebtAfterDeposit
912- let availableTokens = (availableDebtIncrease * self .borrowFactor [withdrawType ]! ) / self .priceOracle .price (ofToken : withdrawType )!
913- return availableTokens + collateralTokenCount
914906 }
915907
916908 // At this point, we're either dealing with a position that didn't have a credit balance in the withdraw
You can’t perform that action at this time.
0 commit comments