Skip to content

Commit

Permalink
comment++
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki authored Sep 8, 2022
1 parent 9ff4710 commit 87fb8e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/leverage/keeper/collateral.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ func (k Keeper) CollateralLiquidity(ctx sdk.Context, denom string) sdk.Dec {
liquidity := k.AvailableLiquidity(ctx, denom)

// Zero collateral will be interpreted as full collateral liquidity. This encompasses two cases:
// - 0/0 liquidity / collateral: Empty market, system is considered healthy by default
// - x/0 liquidity / collateral: No collateral but plenty of liquidity, also considered healthy
// - liquidity / collateral = 0/0: Empty market, system is considered healthy by default
// - liquidity / collateral = x/0: No collateral but nonzero liquidity, also considered healthy
// In both cases, "all collateral is liquid" is technically true, given that there is no collateral.
if totalCollateral.IsZero() {
return sdk.OneDec()
Expand Down

0 comments on commit 87fb8e2

Please sign in to comment.