bitshares / bitshares/bitshares-ui

FOK should never be default behavior

Open
#3,227 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
520
Forks
575
Avg merge
12h 7m
Merged PRs (30d)
5

Description

**Describe the Bug**
Currently if you place a limit order into the opposing side of the book as a "market order" it is flagged with Fill or Kill. That's not the way this would work at any traditional CEX. FOK should be an optional feature; not the default behavior. FOK is an extreme, edge case, rare scenario. It is highly unlikely that most lay users would expect this behavior, be aware of this order type, or desire to use it. Pretty much the ONLY reason you ever FOK is if there is a huge wall flashing on and off (spoofing) and you intend to eat the whole thing... and you don't want to give away your intention to the person spoofing the wall without complete execution. Its a counter measure to market manipulation; whale hunting. I can think of just a few times I've executed a FOK to harpoon a market manipulator for all the years I've been trading. Few traders ever have the need for such an order type.

**Expected Behavior**
FOK should never be default.

The lay user's expectation is for their limit order, placed into the opposing book of the market - if not executed in full - to remain a limit order at the top of the book.

Alternate expectation would be for an OPTIONAL button to enact a FOK order.

**More Info**
`Characterized as Extreme Orders`
https://en.wikipedia.org/wiki/Fill_or_kill

https://en.wikipedia.org/wiki/Spoofing_(finance)

**Screenshot**
The worst part about the current situation is in the event the user wants to place a market order partially into the book with the remaining balance on top of the book - a much more common request - they are instead presented with an error. The response is not expected, hardly descriptive or intelligible to to the lay user, and leaves them with the notion that the system is just buggy:

![FOK](https://user-images.githubusercontent.com/27382428/75818432-db914700-5d66-11ea-9244-97650d926f50.png)

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is identified in the issue. Reproduce a limit order placed into the opposing side of the book, trace the UI's order-type handling, and verify that an unfilled remainder stays a limit order while FOK is only selected explicitly and the error behavior is understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, javascript, react
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.