osmosis-labs / orderbook

Cosmwasm Orderbook Repo for Osmosis
Apache License 2.0
22 stars 3 forks source link

`MsgSwapExactAmountIn` does not modify tick's quantity in case of a partial fill #207

Closed pysel closed 2 weeks ago

pysel commented 3 weeks ago

Background

I am using poolmanager's MsgSwapExactAmountIn against an orderbook to swap tokens (against orders created by myself, for testing purposes). After I do that and I query the initially created order, I notice that the quantity field of an order is unchanged. Hence, on osmosis's UI, my order is partially filled, but if I query a state of the tick via CLI, it does not reflect that.

This issue affect queries, I have not noticed any critical vulnerabilities.

Suggested Design

swaps made through poolmanager should update partially filled ticks' states

Acceptance Criteria

mentioned query returns an updated quantity

pysel commented 3 weeks ago

cc: @crnbarr93 @AlpinYukseloglu

pysel commented 2 weeks ago

looked into this repository better, now I see the reason for my confusion