dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

Need market-specific trade limit factor

Open buck54321 opened this issue 2 years ago • 0 comments

#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.

buck54321 avatar Aug 11 '23 07:08 buck54321