Skip to content

Instantly share code, notes, and snippets.

@erwanor
Created June 2, 2023 15:03
Show Gist options
  • Save erwanor/9186150ea3730e49c72ce8c854dedb54 to your computer and use it in GitHub Desktop.
Save erwanor/9186150ea3730e49c72ce8c854dedb54 to your computer and use it in GitHub Desktop.
2023-06-02T14:14:43.571129Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: searching for path src=pen dst=pen max_hops=5
2023-06-02T14:14:43.571192Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}: beginning path
2023-06-02T14:14:43.571265Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: relaxing active paths active_paths_len=1
2023-06-02T14:14:43.571310Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom, pen, gn]
2023-06-02T14:14:43.571680Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=gn}: no best position, failing to extend path
2023-06-02T14:14:43.571744Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=test_btc}: no best position, failing to extend path
2023-06-02T14:14:43.571915Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=test_osmo}: no best position, failing to extend path
2023-06-02T14:14:43.572092Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=pen}: no best position, failing to extend path
2023-06-02T14:14:43.572192Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=test_usd}: deindexing position
2023-06-02T14:14:43.572303Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=test_usd}: extended path path_price=0.9090909090909091 hop_price=0.9090909090909091 id=plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606
2023-06-02T14:14:43.572379Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}: inserting new path
2023-06-02T14:14:43.572452Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=gm}: no best position, failing to extend path
2023-06-02T14:14:43.572538Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:extend_to{new_end=test_atom}: no best position, failing to extend path
2023-06-02T14:14:43.572612Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: finished relaxing all active paths i=0
2023-06-02T14:14:43.572648Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: relaxing active paths active_paths_len=1
2023-06-02T14:14:43.572737Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom, pen, gn]
2023-06-02T14:14:43.573083Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_osmo}: no best position, failing to extend path
2023-06-02T14:14:43.573166Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_atom}: key=b"dex/position/plpid1q795wxsyr8qy3kjchmvkn9qsua333kwnf6c8ye453t2nce5yejcskg0yqt" key_hash=KeyHash("9f50d09e684d4cfbf924b5484dd702cd333a57eb272f67dfcfab26c619b3c9f4")
2023-06-02T14:14:43.573360Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=pen}: deindexing position
2023-06-02T14:14:43.573434Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=pen}: extended path path_price=1 hop_price=1.1 id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx
2023-06-02T14:14:43.573515Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}: updating path new_price=1 old_price=1
2023-06-02T14:14:43.573596Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=gm}: no best position, failing to extend path
2023-06-02T14:14:43.573719Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_atom}: deindexing position
2023-06-02T14:14:43.573802Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_atom}: extended path path_price=9.542699724517906 hop_price=10.496969696969696 id=plpid1q795wxsyr8qy3kjchmvkn9qsua333kwnf6c8ye453t2nce5yejcskg0yqt
2023-06-02T14:14:43.573917Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}: inserting new path
2023-06-02T14:14:43.573681Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_btc}: key=b"dex/position/plpid1xpyfkc6es6svyajseffscluepe24r8m9cwrv5mu40hp5ga758khs8hky73" key_hash=KeyHash("80986090078de97c861338d21e6c42919c0903c2cd0b93a04eb2187339a1a03e")
2023-06-02T14:14:43.574107Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=gn}: no best position, failing to extend path
2023-06-02T14:14:43.574568Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_btc}: deindexing position
2023-06-02T14:14:43.574630Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_btc}: extended path path_price=246.57359044995408 hop_price=271.23094949494947 id=plpid1xpyfkc6es6svyajseffscluepe24r8m9cwrv5mu40hp5ga758khs8hky73
2023-06-02T14:14:43.575651Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}: inserting new path
2023-06-02T14:14:43.575707Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:extend_to{new_end=test_usd}: no best position, failing to extend path
2023-06-02T14:14:43.575807Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: finished relaxing all active paths i=1
2023-06-02T14:14:43.575867Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: relaxing active paths active_paths_len=3
2023-06-02T14:14:43.575913Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom, pen, gn]
2023-06-02T14:14:43.576091Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom, pen, gn]
2023-06-02T14:14:43.576310Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}: relaxing path degree=7 candidates=[gm, test_btc, test_usd, test_osmo, test_atom, pen, gn]
2023-06-02T14:14:43.576903Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=gn}: no best position, failing to extend path
2023-06-02T14:14:43.577082Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=test_btc}: no best position, failing to extend path
2023-06-02T14:14:43.577286Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=gm}: no best position, failing to extend path
2023-06-02T14:14:43.577465Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=test_osmo}: no best position, failing to extend path
2023-06-02T14:14:43.577600Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=test_usd}: deindexing position
2023-06-02T14:14:43.577675Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=test_usd}: extended path path_price=1.0101010101010102 hop_price=1.0101010101010102 id=plpid1f65rs3acdtl8vz7n4vqnckcyun2s235s3n4aep00gv606zzfujesjs35vt
2023-06-02T14:14:43.577951Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_usd}: no best position, failing to extend path
2023-06-02T14:14:43.578046Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=gm}: no best position, failing to extend path
2023-06-02T14:14:43.578150Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_btc}: no best position, failing to extend path
2023-06-02T14:14:43.578241Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_atom}: key=b"dex/position/plpid1egreudqrqr36nkat5fk39ajel0n3z6apkftr5xucn5rtmgxvqeeq9efxv4" key_hash=KeyHash("25cd51fd6d63096e697f23cb5dc5f2d12e6a9c859ef2e510f3f8a08bb04c0ca3")
2023-06-02T14:14:43.578355Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_osmo}: no best position, failing to extend path
2023-06-02T14:14:43.578456Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=test_atom}: no best position, failing to extend path
2023-06-02T14:14:43.578549Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=gm}: no best position, failing to extend path
2023-06-02T14:14:43.578638Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_usd}: no best position, failing to extend path
2023-06-02T14:14:43.578716Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_btc}: key=b"dex/position/plpid1egreudqrqr36nkat5fk39ajel0n3z6apkftr5xucn5rtmgxvqeeq9efxv4" key_hash=KeyHash("25cd51fd6d63096e697f23cb5dc5f2d12e6a9c859ef2e510f3f8a08bb04c0ca3")
2023-06-02T14:14:43.578807Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_atom}: deindexing position
2023-06-02T14:14:43.578898Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=test_atom}: extended path path_price=9.613879385220432 hop_price=0.03898989898989899 id=plpid1egreudqrqr36nkat5fk39ajel0n3z6apkftr5xucn5rtmgxvqeeq9efxv4
2023-06-02T14:14:43.579041Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=gn}: no best position, failing to extend path
2023-06-02T14:14:43.579094Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_btc}: deindexing position
2023-06-02T14:14:43.579121Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_btc}: extended path path_price=249.71737385560021 hop_price=26.168419950803372 id=plpid1egreudqrqr36nkat5fk39ajel0n3z6apkftr5xucn5rtmgxvqeeq9efxv4
2023-06-02T14:14:43.579134Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_osmo}: no best position, failing to extend path
2023-06-02T14:14:43.579153Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=test_atom}: no best position, failing to extend path
2023-06-02T14:14:43.579157Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_atom}:extend_to{new_end=pen}: no best position, failing to extend path
2023-06-02T14:14:43.579165Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=pen}: no best position, failing to extend path
2023-06-02T14:14:43.579170Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=test_btc}:extend_to{new_end=gn}: no best position, failing to extend path
2023-06-02T14:14:43.579282Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}:path{start=pen}:via{id=test_usd}:via{id=pen}:extend_to{new_end=pen}: no best position, failing to extend path
2023-06-02T14:14:43.579309Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: finished relaxing all active paths i=2
2023-06-02T14:14:43.579316Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: relaxing active paths active_paths_len=0
2023-06-02T14:14:43.579321Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: finished relaxing all active paths i=3
2023-06-02T14:14:43.579337Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: relaxing active paths active_paths_len=0
2023-06-02T14:14:43.579342Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: finished relaxing all active paths i=4
2023-06-02T14:14:43.579348Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: found path price=1 spill_price=1 src=pen nodes=[test_usd, pen]
2023-06-02T14:14:43.579374Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill: found path, starting to fill up to spill price path=[test_usd, pen] delta_1=18446744072650473379
2023-06-02T14:14:43.579390Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: input=18446744072650473379 route=[pen, test_usd, pen] spill_price=Some(U128x128 { integral: 1, fractional: 0 })
2023-06-02T14:14:43.579868Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: assembled initial frontier frontier=Frontier { pairs: [DirectedTradingPair { start: pen, end: test_usd }, DirectedTradingPair { start: test_usd, end: pen }], positions: [Position { state: Opened, reserves: Reserves { r1: 55176, r2: 0 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 1100000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "7cc3fc6166037683cb57cbf0c60a9085cc5a272ffa8d6ed7d673b61a0cfc7d84" }, Position { state: Opened, reserves: Reserves { r1: 499944824, r2: 44686872736 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 1100000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "2c58155f59985ae9027ab195a6d18547a40fd7fbeff129fda51322d03de53613" }], position_ids: {plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606, plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx}, trace: [], .. }
2023-06-02T14:14:43.579965Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650473379}: sensing frontier capacity with test amount
2023-06-02T14:14:43.579999Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650473379}: could not completely fill input amount, marking as constraining i=0 current_input=18446744072650473379 unfilled=18446744072650423219 output=55176 old_reserves=Reserves { r1: 55176, r2: 0 } new_reserves=Reserves { r1: 0, r2: 50160 }
2023-06-02T14:14:43.580034Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650473379}: completely filled i=1 current_input=55176 unfilled=0 output=50160 old_reserves=Reserves { r1: 499944824, r2: 44686872736 } new_reserves=Reserves { r1: 500000000, r2: 44686822576 }
2023-06-02T14:14:43.580076Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: attempting to completely consume reserves of constraining position constraining_index=0 exactly_consumed_reserves=55176
2023-06-02T14:14:43.580103Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=55176}: filling backward along frontier
2023-06-02T14:14:43.580136Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=55176}:fill_output: computed reverse fill reserves=Reserves { r1: 0, r2: 55176 } lambda_2=55176 fillable_delta_1=50160 fillable_delta_1_exact=50160 new_reserves=Reserves { r1: 50160, r2: 0 }
2023-06-02T14:14:43.580180Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=55176}: found previous input for current value i=0 current_value=55176 prev_input=50160 old_reserves=Reserves { r1: 55176, r2: 0 } new_reserves=Reserves { r1: 0, r2: 50160 }
2023-06-02T14:14:43.580210Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_forward{start_index=1 input=55176}: filling forward along frontier
2023-06-02T14:14:43.580246Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: completed fill iteration, updating frontier current_input=50160 current_output=50160 input=18446744072650423219 output=50160
2023-06-02T14:14:43.580259Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}: replacing position replaced_position_id=plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606
2023-06-02T14:14:43.580274Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}:put_position{id=plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606}: position=Position { state: Opened, reserves: Reserves { r1: 0, r2: 50160 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 1100000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "7cc3fc6166037683cb57cbf0c60a9085cc5a272ffa8d6ed7d673b61a0cfc7d84" }
2023-06-02T14:14:43.580289Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}:put_position{id=plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606}: deindexing position
2023-06-02T14:14:43.580318Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}:put_position{id=plpid1qdf8l3x4e9vzwfvuuprnll8yc6pljhkjy5864r0qk9kcugaq50lqhka606}: indexing position for 1=>2 trades
2023-06-02T14:14:43.580333Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}: skipping position already in frontier position_id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx
2023-06-02T14:14:43.580348Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:replace_position{index=0}: replacing constraining position in frontier next_position_id=plpid1f65rs3acdtl8vz7n4vqnckcyun2s235s3n4aep00gv606zzfujesjs35vt next_position=Position { state: Opened, reserves: Reserves { r1: 58200, r2: 0 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 990000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "261df0766a2050efdcfd0b07cb0a81f5f8f236de08d22530a5e6e3360d92d582" }
2023-06-02T14:14:43.580368Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650423219}: sensing frontier capacity with test amount
2023-06-02T14:14:43.580377Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650423219}: could not completely fill input amount, marking as constraining i=0 current_input=18446744072650423219 unfilled=18446744072650364431 output=58200 old_reserves=Reserves { r1: 58200, r2: 0 } new_reserves=Reserves { r1: 0, r2: 58788 }
2023-06-02T14:14:43.580385Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:sense_capacity_constraint{input=18446744072650423219}: completely filled i=1 current_input=58200 unfilled=0 output=52909 old_reserves=Reserves { r1: 500000000, r2: 44686822576 } new_reserves=Reserves { r1: 500058200, r2: 44686769667 }
2023-06-02T14:14:43.580393Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: attempting to completely consume reserves of constraining position constraining_index=0 exactly_consumed_reserves=58200
2023-06-02T14:14:43.580400Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=58200}: filling backward along frontier
2023-06-02T14:14:43.580406Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=58200}:fill_output: computed reverse fill reserves=Reserves { r1: 0, r2: 58200 } lambda_2=58200 fillable_delta_1=58787.878787878784 fillable_delta_1_exact=58788 new_reserves=Reserves { r1: 58788, r2: 0 }
2023-06-02T14:14:43.580417Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_backward{start_index=0 output=58200}: found previous input for current value i=0 current_value=58200 prev_input=58788 old_reserves=Reserves { r1: 58200, r2: 0 } new_reserves=Reserves { r1: 0, r2: 58788 }
2023-06-02T14:14:43.580426Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:fill_forward{start_index=1 input=58200}: filling forward along frontier
2023-06-02T14:14:43.580435Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: exceeded spill price, breaking loop spill_price=Some("1") actual_price=Ok("1.1111153111946928")
2023-06-02T14:14:43.580448Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1f65rs3acdtl8vz7n4vqnckcyun2s235s3n4aep00gv606zzfujesjs35vt}: position=Position { state: Opened, reserves: Reserves { r1: 58200, r2: 0 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 990000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "261df0766a2050efdcfd0b07cb0a81f5f8f236de08d22530a5e6e3360d92d582" }
2023-06-02T14:14:43.580460Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1f65rs3acdtl8vz7n4vqnckcyun2s235s3n4aep00gv606zzfujesjs35vt}: deindexing position
2023-06-02T14:14:43.580477Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1f65rs3acdtl8vz7n4vqnckcyun2s235s3n4aep00gv606zzfujesjs35vt}: indexing position for 2=>1 trades
2023-06-02T14:14:43.580492Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx}: position=Position { state: Opened, reserves: Reserves { r1: 500000000, r2: 44686822576 }, phi: TradingFunction { component: BareTradingFunction { fee: 0, p: 1000000, q: 1100000 }, pair: TradingPair { asset_1: test_usd, asset_2: pen } }, nonce: "2c58155f59985ae9027ab195a6d18547a40fd7fbeff129fda51322d03de53613" }
2023-06-02T14:14:43.580505Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx}: deindexing position
2023-06-02T14:14:43.580515Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx}: indexing position for 1=>2 trades
2023-06-02T14:14:43.580522Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route:put_position{id=plpid1vkrrjqh249g4emy8l76pvcmpepadf7445jamzug44ud2npysvtpsgtlwxx}: indexing position for 2=>1 trades
2023-06-02T14:14:43.580542Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:fill_route: returning swap execution of filled route swap_execution=SwapExecution { traces: [[Value { amount: 50160, asset_id: pen }, Value { amount: 55176, asset_id: test_usd }, Value { amount: 50160, asset_id: pen }]], input: Value { amount: 50160, asset_id: pen }, output: Value { amount: 50160, asset_id: pen } }
2023-06-02T14:14:43.580582Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill: filled along best path lambda_2=50160 unfilled_1=18446744072650423219
2023-06-02T14:14:43.580594Z DEBUG abci:EndBlock{height=3424}:dex:arbitrage:route_and_fill:path_search{max_hops=5}: searching for path src=pen dst=pen max_hops=5
@erwanor
Copy link
Author

erwanor commented Jun 17, 2023

FFR: this was caused by the position's nonce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment