Closed iboss-ptk closed 1 year ago
First, we need at least 2 swaps to create historical index.
Second, With current implementation every execution creates new block and block timestamp will +5 secs from last block.
working example can be found here. From genesis to latest, every execution +5 secs on block time, so the twap query needs to compensate them to be right in the range.
For more sophisticated block time control will be separated to another issue.
@iboss-ptk I modified your example to show a problem with custom twap module. The price is not deserialized correctly. Please take a look on this commit https://github.com/piobab/osmosis-rust/commit/3e10178038f6d2da2e997e65e837fe6a220f99f0
left: "0.944009649029192124"
right: "944009649029192124"
created new issue to track this https://github.com/osmosis-labs/osmosis-rust/issues/59
With the following code:
This error can occur
This might be caused by block time issue. To know for sure check