[FEAT] Streaming swaps
Relevant THORChain MR's:
-
[feature] Streaming swaps #check-lint-warning 2886 -
[refactor] streaming swaps tweaks #check-lint-warning 2986 -
Refactor memo #check-lint-warning2968(Making separate MR for this) -
[patches] misc minor fixes to streaming swaps #check-lint-warning 3000 -
[economics] adjusted algo for determining bond/TVL cap #check-lint-warning 3020 -
emit streaming swap event 3039 -
[feature] outbound delays are reduced by streaming swap time 2991 -
[feature] streaming swap tracks which sub-swap fails and for what reason 3033 -
[V119-specific] Use voter.Height rather than voter.FinalisedHeight for streaming swap adjustment 3044 -
[invariant] streaming swaps 3014 -
[api] Improved Quote Fee Structure 3074 -
[bug] if chain or trading is halted, skip streaming swap attempts 3085 -
Fix endpoint 'quote/swap' for streaming swaps 3119 -
[api] Remove Deprecated Quote Fee Fields 3563 -
[Version-unspecific] Stages (and Status) endpoint support for Streaming swaps 3062 -
[api] Swap Quote Auto Max Quantity, Misc Fee Fixes 3115 -
[ADD] Streaming Swaps for Savers adds/withdraws 3070 -
[bug] include streaming swap quantity and count into a swap event 3038 -
Streaming swaps ignore tvl/synth cap during swap 3095 -
[Version-unspecific] AsgardInvariant: Explicitly check IsStreaming to not double-count streaming In and Out for affiliate swaps 3123 -
[bug] reset pool depth between simulated swaps3194 -
[V124-specific] Use refundTx for streaming swap partial refunds 3016 -
[Version-unspecific] StreamingSwap endpoints' source_asset and target_asset and destination fields 3274 -
[Version-unspecific] Querier: continue
rather thanbreak
on queryStreamingSwap/s GetSwapQueueItem error (expected when no MsgSwap set for that index) 3404 -
[Fix Streaming Savers Affiliate THORName broken invariant and swallowed funds3427 -
Leave coins in vault if fail to process non-native outbound #check-lint-warning 3503 -
[V132-specific] As swaps may be streaming sub-swaps, remove the swap handler's outbound fee check 3428 -
Stream by default. No need to specify streaming params in the memo. If specified in the memo, use these params instead. The streaming by default can be controlled by Mimir. See: #69 -
Always return the shortest memo possible when quoting -
In the API, list the exceptions of the 1e8 decimals rule when quoting (cacao 1e10)
For Streaming Swaps, we should use 'short codes' for gas assets. E.g. use b
for BTC.BTC, e
for ETH.ETH, etc. to don't exceed maximum amount of bytes within the memo/OP_RETURN/extra payload field. The following PR's are relevant for this:
-
[feature] allow memos to use asset "short codes" 2899 -
[api] Asset Code Quote Memo, Fix Fuzzy Asset, Loan Quote Short Memo 3078 -
[Version-unspecific] Display pool asset short codes in querier 3086 -
[V124-specific] ATOMAsset line in NewAssetWithShortCodes to match ShortCode #check-lint-warning3170 -
[Version-unspecific] querier_quotes: Allow synth address shortening and shortened (or short code) asset parameters 3396
Some added PRs that we can consider (or are necessary) since we're editing some of the code or needed:
-
Leave coins in vault if fail to process non-native outbound #check-lint-warning -
[add] Recommended Gas Rate for Quotes 3517 -
add more tss keygen logging #check-lint-warning 2972 -
Upgrade to go 1.22 3524 -
Replace Query structs with OpenAPI structs 3452 -
Commit Generated Files 3113 Closes #42 -
[PERF] don't store node signers for deposit txs 2659 -
[refactor] Avoid NET Environment Variable for Current Network #check-lint-warning 2740
Edited by Itzamna