func (k Keeper) DecrementCurrentAssetSupply(ctx sdk.Context, coin sdk.Coin) error {
	supply, found := k.GetAssetSupply(ctx, coin.Denom)
	if !found {
		return sdkerrors.Wrap(types.ErrAssetNotSupported, coin.Denom)
	}
	if supply.CurrentSupply.Amount.Sub(coin.Amount).IsNegative() {
		return sdkerrors.Wrapf(types.ErrInvalidCurrentSupply, "decrease %s, asset supply %s", coin, supply.CurrentSupply)
	}
	supply.CurrentSupply = supply.CurrentSupply.Sub(coin)
	k.SetAssetSupply(ctx, supply, coin.Denom)
	return nil
}
DecrementCurrentAssetSupply decrement an asset's supply by the coin
package keeper
import (
	"time"
	gogotypes "github.com/gogo/protobuf/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
	"github.com/irisnet/irismod/modules/htlc/types"
)
func (k Keeper) IncrementCurrentAssetSupply(ctx sdk.Context, coin sdk.Coin) error {
	supply, found := k.GetAssetSupply(ctx, coin.Denom)
	if !found {
		return sdkerrors.Wrap(types.ErrAssetNotSupported, coin.Denom)
	}
	limit, err := k.GetSupplyLimit(ctx, coin.Denom)
	if err != nil {
		return err
	}
	supplyLimit := sdk.NewCoin(coin.Denom, limit.Limit)
	if supplyLimit.IsLT(supply.CurrentSupply.Add(coin)) {
		return sdkerrors.Wrapf(
			types.ErrExceedsSupplyLimit,
			"increase %s, asset supply %s, limit %s",
			coin, supply.CurrentSupply, supplyLimit,
		)
	}
	if limit.TimeLimited {
		timeBasedSupplyLimit := sdk.NewCoin(coin.Denom, limit.TimeBasedLimit)
		if timeBasedSupplyLimit.IsLT(supply.TimeLimitedCurrentSupply.Add(coin)) {
			return sdkerrors.Wrapf(
				types.ErrExceedsTimeBasedSupplyLimit,
				"increase %s, current time-based asset supply %s, limit %s",
				coin, supply.TimeLimitedCurrentSupply, timeBasedSupplyLimit,
			)
		}
		supply.TimeLimitedCurrentSupply = supply.TimeLimitedCurrentSupply.Add(coin)
	}
	supply.CurrentSupply = supply.CurrentSupply.Add(coin)
	k.SetAssetSupply(ctx, supply, coin.Denom)
	return nil
}