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

feat: add spot price provider for specified route #796

Merged
merged 91 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
a103c73
add spot price provider for specified route
dmoka Apr 2, 2024
a5f0f8a
add integration tests for spot price providing of routes
dmoka Apr 2, 2024
23b03f6
clean up
dmoka Apr 2, 2024
8d67f73
clean up
dmoka Apr 2, 2024
81d8fa4
fix spot price calculation for stablepool to work any kind of assets …
dmoka Apr 3, 2024
5d783bd
bump version
dmoka Apr 3, 2024
cb905cd
simplify logic of route spot price provider
dmoka Apr 3, 2024
41a73b4
minor adjustments
dmoka Apr 3, 2024
875a7fd
simplify lbp spot price provider
dmoka Apr 3, 2024
b1277c0
adjust error handling
dmoka Apr 3, 2024
408f5c6
formatting
dmoka Apr 3, 2024
d271b69
make clippy happy
dmoka Apr 3, 2024
fbf393f
use math formular for spot price in stableswap
dmoka Apr 5, 2024
3947b3e
add safety checks to prevent panics
dmoka Apr 5, 2024
b7ae424
bump versions
dmoka Apr 5, 2024
90fa70b
make clippy happy
dmoka Apr 5, 2024
1023df6
do small trade in stableswap to include fee in the trade
dmoka Apr 8, 2024
3a15148
add implementation for omnipool spot price including fee
dmoka Apr 8, 2024
89817e6
merge master to feat/route-spot-price-provider
dmoka Apr 8, 2024
9dbc58e
adjust comment
dmoka Apr 8, 2024
b61f6b6
WIP - adjust spot prices including the fees
dmoka Apr 8, 2024
6109bb3
add spot price calculation for XYK sell
dmoka Apr 10, 2024
efc7f8c
add spot price without fee for both buy and sell of XYK
dmoka Apr 10, 2024
a0e0f54
add spot price with fee for omnipool
dmoka Apr 11, 2024
fad5d41
add spot price with fee implementation lf LBP
dmoka Apr 11, 2024
7c2a497
fix lbp spot price, as spot price needs to be increased when both use…
dmoka Apr 11, 2024
4ad1993
adjust comment
dmoka Apr 11, 2024
3a2b48f
adjust comment
dmoka Apr 11, 2024
3f978e0
adjust comment
dmoka Apr 11, 2024
654b53b
add failing test for possible bug
dmoka Apr 11, 2024
548d52b
fix spot price for stableswap to work in any kind of decimals
dmoka Apr 11, 2024
5bb4833
add implementation for spot price between two normal assets
dmoka Apr 12, 2024
2464e06
wip - fix spot price to work with 18 decimal too within stableswap
dmoka Apr 12, 2024
54d31c7
remove trade type as not needed, we sell and buy should return the sa…
dmoka Apr 12, 2024
436a437
bump versions
dmoka Apr 12, 2024
7cd5366
remove warnings
dmoka Apr 12, 2024
d48216f
clean up
dmoka Apr 12, 2024
c203143
remove unused imports
dmoka Apr 12, 2024
a34fd4a
make clippy happy
dmoka Apr 12, 2024
cb34363
merge master to feat/route-spot-price-provider
dmoka Apr 12, 2024
8175b69
fix cargo toml version
dmoka Apr 12, 2024
ff84a5e
dump version that have been not updated yet
dmoka Apr 12, 2024
2cef1dc
improve tests to reduce slippage
dmoka Apr 15, 2024
e609ed6
make tests more precise for compare fee by selling min amount
dmoka Apr 15, 2024
d259375
fix fee calculation for LBP when distributed asset is bought.
dmoka Apr 15, 2024
5628a9d
add some explanatory comments
dmoka Apr 15, 2024
8751245
make stableasset spot price tests more meaningfull by selling less am…
dmoka Apr 15, 2024
4a6185d
renaming test
dmoka Apr 15, 2024
609163c
improve spot price tests by selling less amounts in the comparisons
dmoka Apr 15, 2024
3887adf
adjust spot price for hte case when lrna sold
dmoka Apr 15, 2024
c7aa89a
adjust tests and comments
dmoka Apr 15, 2024
bd45072
remove unused imports
dmoka Apr 15, 2024
c5f51e5
make clippy happy
dmoka Apr 15, 2024
c4b8bb3
adjust comment
dmoka Apr 15, 2024
356fd15
use safe fixed operation to prevent panic
dmoka Apr 15, 2024
8826eaf
Merge branch 'master' into feat/route-spot-price-provider
Roznovjak Apr 17, 2024
1ca26e2
Merge branch 'master' into feat/route-spot-price-provider
Roznovjak Apr 24, 2024
4d0d7f8
adjust spot price calculation, use math instead of doing trades
dmoka Apr 26, 2024
bca40d8
simplify calculation as we have the same logic in the pallet
dmoka Apr 26, 2024
0435154
simplify spot price calculation for stableswap
dmoka Apr 29, 2024
22a8950
introducing fee to spot price calc of omnipool math
dmoka Apr 29, 2024
788b29b
extract xyk spot price calculation to math
dmoka Apr 29, 2024
f225a75
extract lbp spot price with fee calculation to math
dmoka Apr 29, 2024
1ff177b
merge master to feat/route-spot-price-provider
dmoka Apr 29, 2024
c63f208
bump math package version
dmoka Apr 29, 2024
18f6d98
returning fixedu128 from stable spot price
dmoka Apr 29, 2024
6b6fba8
extract calculations of spot price involving share and stable asset i…
dmoka Apr 30, 2024
8d09480
simplify spot price calculatin between stable and share
dmoka Apr 30, 2024
b195dae
add doc comments for stable spot price
dmoka Apr 30, 2024
3701b7c
add comment for xyk
dmoka Apr 30, 2024
dd7b47c
add lbp doc comment and renaming
dmoka Apr 30, 2024
5efaa8d
add doc comment for omnipool spot price calc
dmoka Apr 30, 2024
07c5024
clean up
dmoka Apr 30, 2024
9bc845f
merge master to feat/route-spot-price-provider
dmoka Apr 30, 2024
952a77b
make clippy happy
dmoka Apr 30, 2024
39b9098
bump versions
dmoka Apr 30, 2024
c746907
renaming
dmoka Apr 30, 2024
103eef8
adjust doc comment
dmoka May 1, 2024
9bbcbac
merge master to feat/route-spot-price-provider
dmoka May 1, 2024
75d5cda
bump version
dmoka May 1, 2024
0d42e2b
update lock file
dmoka May 1, 2024
338cd19
renaming
dmoka May 8, 2024
0564b5a
do the calculation of route spot price in chunks to prevent overflow …
dmoka May 8, 2024
606e1ae
merge all stableswap spot price calculations into one
dmoka May 8, 2024
cbe758f
remove warnings
dmoka May 8, 2024
35d3881
renaming
dmoka May 8, 2024
e52892b
renaming
dmoka May 8, 2024
7e7dea4
Merge remote-tracking branch 'origin/master' into feat/route-spot-pri…
dmoka May 8, 2024
10fd13c
bump versions
dmoka May 8, 2024
72e88bf
make clippy happy
dmoka May 8, 2024
301c530
make clippy happy
dmoka May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime-integration-tests"
version = "1.21.1"
version = "1.21.2"
description = "Integration tests"
authors = ["GalacticCouncil"]
edition = "2021"
Expand Down
Loading
Loading