dcrdex
dcrdex copied to clipboard
Need market-specific trade limit factor
#2432 began scaling trading limits with the user's bond level, but is based on a simple formula
consst defaultTakerLotLimit = 6
takerLimit := `tier * lotSize * defaultInitTakerLotLimit
But the lot size for a market is based roughly on the market pairs' transaction fee rates. For some markets, we can have super-low lot sizes, but that would result in unreasonably low trading limits.
Let's add an additional, per-market limit coefficient.
type Market struct {
...
LotLimitCoefficient uint64 `json:"lotLimitCoefficient"`
}
which would then be used to calculate lot limits by tier * lotSize * defaultInitTakerLotLimit * mkt.lotLimitCoefficient.