dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

maxbuy/maxsell: take redemption fees into account

Open norwnd opened this issue 1 year ago • 0 comments

It seems when maxbuy/maxsell is calculated only swap fee is taken into account (but not redemption fee) as a "limiting factor",

namely when I try to place limit order of size N (where N is the value maxsell shows) on DCR-USDC market my request gets rejected with error message along the lines of "attempting to lock more polygon for redemption that is currently available. 4x > x" (presumably because I don't have enough POL to actually redeem the trade of size N),

I guess this is only relevant to validate for account-based assets (since for assets such as DCR and BTC you can pay any fees you need subtracting it from the funds you receive as redemption beneficiary).

norwnd avatar Dec 21 '24 11:12 norwnd