diff --git a/x/leverage/types/position.go b/x/leverage/types/position.go index ea55500b0a..20e3b3ab55 100644 --- a/x/leverage/types/position.go +++ b/x/leverage/types/position.go @@ -186,7 +186,9 @@ func (ap *AccountPosition) MaxBorrow(denom string) sdk.Dec { ), ) + // // TODO: improve for cases where new special assets can be paired + // // Prevent over-limit accounts from returning negative max borrow return sdk.MaxDec(sdk.ZeroDec(), maxNormalBorrow) @@ -204,7 +206,9 @@ func (ap *AccountPosition) MaxWithdraw(denom string) sdk.Dec { usage := ap.totalCollateralUsage() // collateral usage after special pairs owned := ap.collateralValue.AmountOf(denom) + // // TODO: withdraw first from normal, then from special pairs, one at a time. + // // - for borrow limit, subtracting [collat * weight] from borrow limit // - TODO: for special pairs, subtracting additional [collateral * delta weight]