@@ -232,11 +232,11 @@ mod omnipool {
232232 filler: Omnipool :: protocol_account( ) ,
233233 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
234234 operation: pallet_broadcast:: types:: TradeOperation :: ExactOut ,
235- inputs: vec![ Asset :: new( HDX , 140280462317696 ) ] ,
236- outputs: vec![ Asset :: new( LRNA , 70140229415762 ) ] ,
235+ inputs: vec![ Asset :: new( HDX , 140421094366889 ) ] ,
236+ outputs: vec![ Asset :: new( LRNA , 70210545436637 ) ] ,
237237 fees: vec![
238- Fee :: new( LRNA , 17535057353 , Destination :: Burned ) ,
239- Fee :: new( LRNA , 17535057354 , Destination :: Account ( Treasury :: account_id( ) ) )
238+ Fee :: new( LRNA , 17552636359 , Destination :: Burned ) ,
239+ Fee :: new( LRNA , 17552636359 , Destination :: Account ( Treasury :: account_id( ) ) )
240240 ] ,
241241 operation_stack: vec![
242242 ExecutionType :: DCA ( schedule_id, 0 ) ,
@@ -249,11 +249,11 @@ mod omnipool {
249249 filler: Omnipool :: protocol_account( ) ,
250250 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
251251 operation: pallet_broadcast:: types:: TradeOperation :: ExactOut ,
252- inputs: vec![ Asset :: new( LRNA , 70105159301055 ) ] ,
252+ inputs: vec![ Asset :: new( LRNA , 70175440163919 ) ] ,
253253 outputs: vec![ Asset :: new( DAI , amount_out) ] ,
254254 fees: vec![ Fee :: new(
255255 DAI ,
256- 150225338008 ,
256+ 250626566417 ,
257257 Destination :: Account ( Omnipool :: protocol_account( ) )
258258 ) ] ,
259259 operation_stack: vec![
@@ -277,11 +277,11 @@ mod omnipool {
277277 filler: Omnipool :: protocol_account( ) ,
278278 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
279279 operation: pallet_broadcast:: types:: TradeOperation :: ExactOut ,
280- inputs: vec![ Asset :: new( HDX , 140280475647099 ) ] ,
281- outputs: vec![ Asset :: new( LRNA , 70140232425987 ) ] ,
280+ inputs: vec![ Asset :: new( HDX , 140421107723192 ) ] ,
281+ outputs: vec![ Asset :: new( LRNA , 70210548452699 ) ] ,
282282 fees: vec![
283- Fee :: new( LRNA , 17535058106 , Destination :: Burned ) ,
284- Fee :: new( LRNA , 17535058106 , Destination :: Account ( Treasury :: account_id( ) ) )
283+ Fee :: new( LRNA , 17552637113 , Destination :: Burned ) ,
284+ Fee :: new( LRNA , 17552637113 , Destination :: Account ( Treasury :: account_id( ) ) )
285285 ] ,
286286 operation_stack: vec![
287287 ExecutionType :: DCA ( schedule_id, 3 ) ,
@@ -294,11 +294,11 @@ mod omnipool {
294294 filler: Omnipool :: protocol_account( ) ,
295295 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
296296 operation: pallet_broadcast:: types:: TradeOperation :: ExactOut ,
297- inputs: vec![ Asset :: new( LRNA , 70105162309775 ) ] ,
297+ inputs: vec![ Asset :: new( LRNA , 70175443178473 ) ] ,
298298 outputs: vec![ Asset :: new( DAI , amount_out) ] ,
299299 fees: vec![ Fee :: new(
300300 DAI ,
301- 150225338008 ,
301+ 250626566417 ,
302302 Destination :: Account ( Omnipool :: protocol_account( ) )
303303 ) ] ,
304304 operation_stack: vec![
@@ -499,7 +499,7 @@ mod omnipool {
499499 ) ) ;
500500
501501 //Assert
502- assert_balance ! ( ALICE . into( ) , HDX , 859719537618218 ) ;
502+ assert_balance ! ( ALICE . into( ) , HDX , 859578905568959 ) ;
503503 assert_balance ! ( ALICE . into( ) , DAI , ALICE_INITIAL_DAI_BALANCE + amount_out) ;
504504 } ) ;
505505
@@ -528,7 +528,7 @@ mod omnipool {
528528 ) ) ;
529529
530530 //Assert
531- assert_balance ! ( ALICE . into( ) , HDX , 859719537618218 ) ;
531+ assert_balance ! ( ALICE . into( ) , HDX , 859578905568959 ) ;
532532 assert_balance ! ( ALICE . into( ) , DAI , ALICE_INITIAL_DAI_BALANCE + amount_out) ;
533533 } ) ;
534534 }
@@ -586,7 +586,7 @@ mod omnipool {
586586 ) ) ;
587587
588588 //Assert
589- assert_balance ! ( ALICE . into( ) , LRNA , 4929894840779065 ) ;
589+ assert_balance ! ( ALICE . into( ) , LRNA , 4929824559916281 ) ;
590590 assert_balance ! ( ALICE . into( ) , DAI , ALICE_INITIAL_DAI_BALANCE + amount_out) ;
591591 } ) ;
592592
@@ -618,7 +618,7 @@ mod omnipool {
618618 ) ) ;
619619
620620 //Assert
621- assert_balance ! ( ALICE . into( ) , LRNA , 4929894840779065 ) ;
621+ assert_balance ! ( ALICE . into( ) , LRNA , 4929824559916281 ) ;
622622 assert_balance ! ( ALICE . into( ) , DAI , ALICE_INITIAL_DAI_BALANCE + amount_out) ;
623623 } ) ;
624624 }
@@ -718,7 +718,7 @@ mod omnipool {
718718 let fee = Currencies :: free_balance ( HDX , & Treasury :: account_id ( ) ) - TREASURY_ACCOUNT_INIT_BALANCE ;
719719 assert ! ( fee > 0 , "Treasury got rugged" ) ;
720720
721- assert_balance ! ( ALICE . into( ) , DAI , 2071285765446401 ) ;
721+ assert_balance ! ( ALICE . into( ) , DAI , 2071214372591672 ) ;
722722 assert_balance ! ( ALICE . into( ) , HDX , alice_init_hdx_balance - dca_budget) ;
723723 assert_reserved_balance ! ( & ALICE . into( ) , HDX , dca_budget - amount_to_sell - fee) ;
724724 } ) ;
@@ -776,10 +776,10 @@ mod omnipool {
776776 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
777777 operation: pallet_broadcast:: types:: TradeOperation :: ExactIn ,
778778 inputs: vec![ Asset :: new( LRNA , 49974999160577 ) ] ,
779- outputs: vec![ Asset :: new( DAI , 71285765478967 ) ] ,
779+ outputs: vec![ Asset :: new( DAI , 71214372624206 ) ] ,
780780 fees: vec![ Fee :: new(
781781 DAI ,
782- 107089282142 ,
782+ 178482136903 ,
783783 Destination :: Account ( Omnipool :: protocol_account( ) )
784784 ) ] ,
785785 operation_stack: vec![
@@ -821,10 +821,10 @@ mod omnipool {
821821 filler_type: pallet_broadcast:: types:: Filler :: Omnipool ,
822822 operation: pallet_broadcast:: types:: TradeOperation :: ExactIn ,
823823 inputs: vec![ Asset :: new( LRNA , 49974997361814 ) ] ,
824- outputs: vec![ Asset :: new( DAI , 71285760673769 ) ] ,
824+ outputs: vec![ Asset :: new( DAI , 71214367823821 ) ] ,
825825 fees: vec![ Fee :: new(
826826 DAI ,
827- 107089274924 ,
827+ 178482124872 ,
828828 Destination :: Account ( Omnipool :: protocol_account( ) )
829829 ) ] ,
830830 operation_stack: vec![
@@ -1491,7 +1491,7 @@ mod omnipool {
14911491 assert ! ( fee > 0 , "Treasury got rugged" ) ;
14921492
14931493 assert_balance ! ( ALICE . into( ) , HDX , alice_init_hdx_balance - dca_budget) ;
1494- assert_balance ! ( ALICE . into( ) , DAI , 2071285765446401 ) ;
1494+ assert_balance ! ( ALICE . into( ) , DAI , 2071214372591672 ) ;
14951495 assert_reserved_balance ! ( & ALICE . into( ) , HDX , dca_budget - amount_in - fee) ;
14961496 } ) ;
14971497 }
@@ -1599,7 +1599,7 @@ mod omnipool {
15991599 let treasury_balance = Currencies :: free_balance ( LRNA , & Treasury :: account_id ( ) ) ;
16001600 assert ! ( treasury_balance > 0 ) ;
16011601
1602- assert_balance ! ( ALICE . into( ) , DAI , 2142642852904326 ) ;
1602+ assert_balance ! ( ALICE . into( ) , DAI , 2142499995765714 ) ;
16031603 assert_balance ! ( ALICE . into( ) , LRNA , alice_init_hub_balance - dca_budget) ;
16041604 let reserved_budget = Currencies :: reserved_balance ( LRNA , & ALICE . into ( ) ) ;
16051605 assert ! ( reserved_budget < dca_budget) ;
@@ -1638,7 +1638,7 @@ mod omnipool {
16381638 let fee = Currencies :: free_balance ( HDX , & Treasury :: account_id ( ) ) - TREASURY_ACCOUNT_INIT_BALANCE ;
16391639 assert_reserved_balance ! ( & ALICE . into( ) , HDX , dca_budget - amount_to_sell - fee) ;
16401640
1641- assert_balance ! ( ALICE . into( ) , DAI , 2071285765446401 ) ;
1641+ assert_balance ! ( ALICE . into( ) , DAI , 2071214372591672 ) ;
16421642 } ) ;
16431643
16441644 //Direct Omnipool
@@ -1664,7 +1664,7 @@ mod omnipool {
16641664
16651665 //Assert
16661666 assert_balance ! ( ALICE . into( ) , HDX , alice_init_hdx_balance - amount_to_sell) ;
1667- assert_balance ! ( ALICE . into( ) , DAI , 2071285765446401 ) ;
1667+ assert_balance ! ( ALICE . into( ) , DAI , 2071214372591672 ) ;
16681668 } ) ;
16691669
16701670 //Router
@@ -1696,7 +1696,7 @@ mod omnipool {
16961696
16971697 //Assert
16981698 assert_balance ! ( ALICE . into( ) , HDX , alice_init_hdx_balance - amount_to_sell) ;
1699- assert_balance ! ( ALICE . into( ) , DAI , 2071285765446401 ) ;
1699+ assert_balance ! ( ALICE . into( ) , DAI , 2071214372591672 ) ;
17001700 } ) ;
17011701 }
17021702
@@ -1728,7 +1728,7 @@ mod omnipool {
17281728 let fee = Currencies :: free_balance ( LRNA , & Treasury :: account_id ( ) ) ;
17291729 assert_reserved_balance ! ( & ALICE . into( ) , LRNA , dca_budget - amount_to_sell - fee) ;
17301730
1731- assert_balance ! ( ALICE . into( ) , DAI , 2142642852904326 ) ;
1731+ assert_balance ! ( ALICE . into( ) , DAI , 2142499995765714 ) ;
17321732 } ) ;
17331733
17341734 //Direct omnipool
@@ -1754,7 +1754,7 @@ mod omnipool {
17541754
17551755 //Assert
17561756 assert_balance ! ( ALICE . into( ) , LRNA , alice_init_lrna_balance - amount_to_sell) ;
1757- assert_balance ! ( ALICE . into( ) , DAI , 2142642852904326 ) ;
1757+ assert_balance ! ( ALICE . into( ) , DAI , 2142499995765714 ) ;
17581758 } ) ;
17591759
17601760 //Router
@@ -1782,7 +1782,7 @@ mod omnipool {
17821782
17831783 //Assert
17841784 assert_balance ! ( ALICE . into( ) , LRNA , alice_init_lrna_balance - amount_to_sell) ;
1785- assert_balance ! ( ALICE . into( ) , DAI , 2142642852904326 ) ;
1785+ assert_balance ! ( ALICE . into( ) , DAI , 2142499995765714 ) ;
17861786 } ) ;
17871787 }
17881788
@@ -2361,7 +2361,7 @@ mod stableswap {
23612361 #[ test]
23622362 fn sell_should_work_with_omnipool_and_stable_trades ( ) {
23632363 let amount_to_sell = 200 * UNITS ;
2364- let amount_to_receive = 197416345953090 ;
2364+ let amount_to_receive = 197218633037918 ;
23652365 //With DCA
23662366 TestNet :: reset ( ) ;
23672367 Hydra :: execute_with ( || {
@@ -2733,7 +2733,7 @@ mod stableswap {
27332733 let fee = Currencies :: free_balance ( stable_asset_1, & Treasury :: account_id ( ) ) ;
27342734 assert ! ( fee > 0 , "The treasury did not receive the fee" ) ;
27352735 assert_balance ! ( ALICE . into( ) , stable_asset_1, alice_init_stable1_balance - dca_budget) ;
2736- assert_balance ! ( ALICE . into( ) , HDX , 1070797284164893 ) ;
2736+ assert_balance ! ( ALICE . into( ) , HDX , 1070726380525269 ) ;
27372737
27382738 assert_reserved_balance ! ( & ALICE . into( ) , stable_asset_1, dca_budget - amount_to_sell - fee) ;
27392739 TransactionOutcome :: Commit ( DispatchResult :: Ok ( ( ) ) )
@@ -2834,7 +2834,7 @@ mod stableswap {
28342834 stable_asset_1,
28352835 alice_init_stable1_balance - amount_to_sell
28362836 ) ;
2837- assert_balance ! ( ALICE . into( ) , HDX , 1070797284164893 ) ;
2837+ assert_balance ! ( ALICE . into( ) , HDX , 1070726380525269 ) ;
28382838
28392839 TransactionOutcome :: Commit ( DispatchResult :: Ok ( ( ) ) )
28402840 } ) ;
@@ -2937,7 +2937,7 @@ mod stableswap {
29372937 stable_asset_1,
29382938 alice_init_stable1_balance - amount_to_sell
29392939 ) ;
2940- assert_balance ! ( ALICE . into( ) , HDX , 1070797284164893 ) ;
2940+ assert_balance ! ( ALICE . into( ) , HDX , 1070726380525269 ) ;
29412941
29422942 TransactionOutcome :: Commit ( DispatchResult :: Ok ( ( ) ) )
29432943 } ) ;
@@ -3477,7 +3477,7 @@ mod all_pools {
34773477
34783478 //Assert
34793479 assert_balance ! ( ALICE . into( ) , HDX , alice_init_hdx_balance - dca_budget) ;
3480- assert_balance ! ( ALICE . into( ) , DAI , 2380585424345097 ) ;
3480+ assert_balance ! ( ALICE . into( ) , DAI , 2380211607465609 ) ;
34813481
34823482 TransactionOutcome :: Commit ( DispatchResult :: Ok ( ( ) ) )
34833483 } ) ;
@@ -3632,7 +3632,7 @@ mod with_onchain_route {
36323632 #[ test]
36333633 fn sell_should_work_with_omnipool_and_stable_trades_with_onchain_routes ( ) {
36343634 let amount_to_sell = 200 * UNITS ;
3635- let amount_to_receive = 187360410419945u128 ;
3635+ let amount_to_receive = 187172768546856u128 ;
36363636
36373637 TestNet :: reset ( ) ;
36383638 Hydra :: execute_with ( || {
@@ -3841,7 +3841,7 @@ mod with_onchain_route {
38413841 assert ! ( fee > 0 , "The treasury did not receive the fee" ) ;
38423842
38433843 assert_balance ! ( ALICE . into( ) , DOT , alice_init_dot_balance - dca_budget) ;
3844- assert_balance ! ( ALICE . into( ) , HDX , 1398403530658226 ) ;
3844+ assert_balance ! ( ALICE . into( ) , HDX , 1398004528624518 ) ;
38453845
38463846 assert_reserved_balance ! ( & ALICE . into( ) , DOT , dca_budget - amount_to_sell - fee) ;
38473847 } ) ;
@@ -4101,7 +4101,7 @@ mod with_onchain_route {
41014101 let fee = Currencies :: free_balance ( DOT , & Treasury :: account_id ( ) ) ;
41024102 assert ! ( fee > 0 , "The treasury did not receive the fee" ) ;
41034103
4104- assert_balance ! ( ALICE . into( ) , HDX , 5268495216206711 ) ;
4104+ assert_balance ! ( ALICE . into( ) , HDX , 5268226594908739 ) ;
41054105 assert_reserved_balance ! ( & ALICE . into( ) , DOT , dca_budget - amount_to_sell - fee) ;
41064106 } ) ;
41074107 }
0 commit comments