atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

Trading protocol upgrade v2.

Open artemii235 opened this issue 2 years ago • 0 comments

TBA: Scope of work

  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1927#discussion_r1286108339
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1927#discussion_r1287843683
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1927#discussion_r1288000574
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1927#discussion_r1288337998
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1936#discussion_r1307365637
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1980#discussion_r1346365562
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1927#discussion_r1288348156 (don't use as)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1980#discussion_r1344736097 (negotiate funding spend tx fee beforehand, taker pays it)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046#discussion_r1475314026 (Add spend fee to funding tx)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1980#discussion_r1347946935 (research: concurrent conf)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/1980#discussion_r1375712280 (remove pub from StoredNegotiationData)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2006#issuecomment-1814006678 (burn KMD from dex fee?)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015#discussion_r1411210541 (either remove the TODO or add trading-bot feature flag for now)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015#discussion_r1411833083 (immediate taker refund & recover_funds_of_swap)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2015#discussion_r1412425282 (accept_only_from our order peer)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046#discussion_r1477887876 (OnceLock)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2046#discussion_r1477884629 (Docker tests context)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2043#issuecomment-2251219443 (Allow editing of swap v2 data in DB)
  • [x] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2129#discussion_r1688705781 (provide new gas limit consts and params for v2 calls) - https://github.com/KomodoPlatform/komodo-defi-framework/pull/2211
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2129#discussion_r1693621843 (premium calculation approach)
  • [ ] https://github.com/KomodoPlatform/komodo-defi-framework/pull/2169#discussion_r1720360738 (use refund_taker_funding_timelock to recreate the taker swap data from maker swap data if taker lost their secret)

Eth TPU list

  • [x] support kickstart process for EthCoin - https://github.com/KomodoPlatform/komodo-defi-framework/pull/2300
  • [ ] add retry eth call for Payment State - https://github.com/KomodoPlatform/komodo-defi-framework/pull/2334
  • [x] skip preimage p2p messages in swap state machine if coin is ETH, as ETH coin uses etomic swap contract methods and doesnt need preimages for process

TPU Swap Robustness

  • [ ] Automatic swap recovery (like in legacy swap https://github.com/KomodoPlatform/komodo-defi-framework/pull/2280)

Versioning

  • [x] add maker/taker swap protocol version check for legacy fallback https://github.com/KomodoPlatform/komodo-defi-framework/blob/0a5ff84eb5f5cc5cad6711526e7bed8129a97d5a/mm2src/mm2_main/src/lp_ordermatch.rs#L3000 https://github.com/KomodoPlatform/komodo-defi-framework/blob/0a5ff84eb5f5cc5cad6711526e7bed8129a97d5a/mm2src/mm2_main/src/lp_ordermatch.rs#L3220 https://github.com/KomodoPlatform/komodo-defi-framework/pull/2324

  • [ ] provide swap_version to stats_swaps table (ref https://github.com/KomodoPlatform/komodo-defi-framework/pull/2324#discussion_r1951131754)


TPU features

  • [ ] we need Premium feature to be implemented

Refactoring

  • [ ] encapsulate fixed-size array refs into domain-specific types (ref https://github.com/KomodoPlatform/komodo-defi-framework/pull/2261#discussion_r1897932912)

artemii235 avatar Jul 03 '23 16:07 artemii235