Skip to content

Commit

Permalink
fix normal asset max borrow
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Nov 9, 2023
1 parent 56bc9c2 commit 520aa2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/leverage/types/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (ap *AccountPosition) MaxBorrow(denom string) sdk.Dec {
// limited by collateral weight: borrow up to remaining limit
limit.Sub(ap.BorrowedValue()),
// limited by borrow factor: borrow up to unused collateral / borrow factor
ap.CollateralValue().Sub(usage).Quo(
ap.CollateralValue().Sub(usage).Mul(
borrowFactor,
),
)
Expand Down

0 comments on commit 520aa2e

Please sign in to comment.