forked from XRPLF/rippled
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
limitOut() in StrandFlow adjusts remainingOut for single path with AMM and limitQuality so that generated AMM offer matches limitQuality. If there is LOB offer and this offer is not considered when calculating quality function then the following might happen. The quality function is calculated based on max AMM offer and remainingOut is reduced. When the strand is executed, AMM offer can't be generated to match LOB quality and LOB offer is used instead of AMM offer. Because remainingOut is reduced, possibly substantially, only a fraction of LOB offer is consumed. The same process may repeat for many iterations until either LOB offer is consumed or max iterations is reached. The unit-test verifies that considering LOB offer when calculating quality function addresses this issue. There are also fixes to factor in the trading fee into AMM spot quality.
- Loading branch information
1 parent
f2d37da
commit 2875f70
Showing
4 changed files
with
129 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters