Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement alternative black swan response methods #2499

Merged
merged 99 commits into from
Sep 29, 2021
Merged

Commits on Aug 8, 2021

  1. Configuration menu
    Copy the full SHA
    97a7752 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b177cbc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    29925a8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    013cea1 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Configuration menu
    Copy the full SHA
    c0b3724 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2021

  1. Configuration menu
    Copy the full SHA
    055f7c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e83f842 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2021

  1. Configuration menu
    Copy the full SHA
    3227652 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57b837a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6d73d00 View commit details
    Browse the repository at this point in the history
  4. Implement BDSM update

    abitmore committed Aug 16, 2021
    Configuration menu
    Copy the full SHA
    3834127 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. Fix code smells

    abitmore committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    1a77212 View commit details
    Browse the repository at this point in the history
  2. Fix more code smells

    abitmore committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    ccf9e3f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6100550 View commit details
    Browse the repository at this point in the history
  4. Disallow BDSM on PM

    abitmore committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    7aa02cb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e998ddd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    67dd8a1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d1b6bda View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. Configuration menu
    Copy the full SHA
    0684f3f View commit details
    Browse the repository at this point in the history
  2. Refactor database::clear_expired_force_settlements

    to reduce the number of levels of nested if, for, or while statements
    abitmore committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    d9180f0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    183b80f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5c0fbf View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2021

  1. Add a comment

    abitmore committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    f58a0cb View commit details
    Browse the repository at this point in the history
  2. Add GS price tests

    abitmore committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    5dd32b2 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2021

  1. Configuration menu
    Copy the full SHA
    b1db7e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5518907 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7b7eabe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    23b78d3 View commit details
    Browse the repository at this point in the history
  5. Add some tests for BDSM

    abitmore committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    3700800 View commit details
    Browse the repository at this point in the history
  6. Fix asset_settle when force settlement is disabled

    after paid from individual settlement fund, cancel the rest
    abitmore committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    7baa8f5 View commit details
    Browse the repository at this point in the history
  7. Add a comment

    abitmore committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    23902a6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8bbe408 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    151ba84 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2021

  1. Configuration menu
    Copy the full SHA
    8e9f3e4 View commit details
    Browse the repository at this point in the history
  2. Rename BDSM to BSRM

    Rename "bad-debt settlement method" to "black swan response method"
    abitmore committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    d035122 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2021

  1. Fix apply_order and apply_force_settlement

    by calculating with new current_feed after filled a call order
    abitmore committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    fe65758 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e42d21 View commit details
    Browse the repository at this point in the history
  3. Fix match_force_settlements

    by calculating with new current_feed after filled a call order
    abitmore committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    2d706d0 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2021

  1. Call check_call_orders() in apply_order()

    when feed price is updated and the new limit order is fully filled
    abitmore committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    4c5ac83 View commit details
    Browse the repository at this point in the history
  2. Call check_call_orders in apply_force_settlements

    check limit orders first when feed price is updated
    abitmore committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    2244a21 View commit details
    Browse the repository at this point in the history
  3. Fix tests about BSRM no_settlement

    when current_feed got updated, some existing limit orders may be filled
    abitmore committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    565c73f View commit details
    Browse the repository at this point in the history
  4. Fix check_call_orders() wrt no_settlement

    check limit orders again after matched a call order with a settle order
    abitmore committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    b8f7881 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b50b2f8 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2021

  1. Configuration menu
    Copy the full SHA
    3a7a6c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d6b3d43 View commit details
    Browse the repository at this point in the history
  3. Simplify code

    abitmore committed Aug 29, 2021
    Configuration menu
    Copy the full SHA
    e7b1245 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5415c03 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    221cd45 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2021

  1. Configuration menu
    Copy the full SHA
    caa70b0 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2021

  1. Configuration menu
    Copy the full SHA
    b614a1a View commit details
    Browse the repository at this point in the history
  2. Fix rounding issue when matching limit with call

    and slightly refactor other code
    abitmore committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    19c39fc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d8a96e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    64cbfd0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a432884 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    edd7382 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2021

  1. Configuration menu
    Copy the full SHA
    0443f54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f71eb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e20704 View commit details
    Browse the repository at this point in the history
  4. Add comments

    abitmore committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    cdcc4d6 View commit details
    Browse the repository at this point in the history
  5. Rename a function

    abitmore committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    d483ebb View commit details
    Browse the repository at this point in the history
  6. Add tests about updating BSRM from no_settlement

    to other types when exists an undercollateralized debt position
    abitmore committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    fa7e7d7 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2021

  1. Simplify code

    abitmore committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    7b82a6c View commit details
    Browse the repository at this point in the history
  2. Refactor call_order_update_evaluator

    by moving some assertions from do_apply() to do_evaluator()
    abitmore committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    e1f5547 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb90153 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ea5ffb8 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2021

  1. Configuration menu
    Copy the full SHA
    0a843b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29e36f0 View commit details
    Browse the repository at this point in the history
  3. Fix call_order_update issues about no_settlement

    * check call orders after updated/closed a debt position
    * always allow increasing CR if not to increasing debt
    * allow partial fill if triggers margin call and new CR > ICR
    abitmore committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    30c6441 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9866bb0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    245d44f View commit details
    Browse the repository at this point in the history
  6. Fix code smells

    abitmore committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    186a4b6 View commit details
    Browse the repository at this point in the history
  7. Refactor call_order_update_evaluator::do_apply()

    to reduce the number of levels of nested if, for, or while statements
    abitmore committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    e1a6ac5 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2021

  1. Configuration menu
    Copy the full SHA
    c699e53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6abdc1e View commit details
    Browse the repository at this point in the history
  3. Update comments

    abitmore committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    cb00696 View commit details
    Browse the repository at this point in the history
  4. Update manual GS tests for different BSRM types

    check capping and uncapping of current feed price
    abitmore committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    1a8f51d View commit details
    Browse the repository at this point in the history
  5. Slightly refactor asset_global_settle_evaluator

    by using database::find_least_collateralized_short()
    abitmore committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    c0c7c57 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2021

  1. Configuration menu
    Copy the full SHA
    a070eeb View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. Configuration menu
    Copy the full SHA
    5a5c0bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7729a51 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2021

  1. Fix check_call_orders() : check limit orders again

    after filled a call order with a settle order
    abitmore committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    3170106 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b38112 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2021

  1. Remove an unused variable

    abitmore committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    9b2bfff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c253f40 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2021

  1. Configuration menu
    Copy the full SHA
    d357023 View commit details
    Browse the repository at this point in the history
  2. Fix code smells

    abitmore committed Sep 18, 2021
    Configuration menu
    Copy the full SHA
    7f9e15b View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2021

  1. Fix individual_settlement_to_fund

    Settle undercollateralized debt position when unable to match with a limit order
    abitmore committed Sep 21, 2021
    Configuration menu
    Copy the full SHA
    21c93b4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9cecdb5 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2021

  1. Refactor database::check_call_orders()

    and fix individual settlements: always check limit orders again
    after individually settled some debt positions
    abitmore committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    9240fa7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8ec1e03 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2021

  1. Configuration menu
    Copy the full SHA
    6390945 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4dbaa30 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f9446a7 View commit details
    Browse the repository at this point in the history
  4. Fix a comment in a test case

    abitmore committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    270a506 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2021

  1. Update a comment

    abitmore committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    01bcfa5 View commit details
    Browse the repository at this point in the history
  2. Update comments

    abitmore committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    d3da53f View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

  1. Configuration menu
    Copy the full SHA
    c38ad74 View commit details
    Browse the repository at this point in the history
  2. Update comments

    abitmore committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    67d6624 View commit details
    Browse the repository at this point in the history
  3. Add a comment

    abitmore committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    5ba086c View commit details
    Browse the repository at this point in the history