galacticcouncil / galacticcouncil/hydration-node

Remove optimization in multipayment pallet and get price based on last block oracle

Open
#683 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
208
Forks
109
Avg merge
6d 3h
Merged PRs (30d)
3

Description

### Description

Soon we will have the best routes stored for each asset pairs. So it would mean we can cheaply get the price between two assets based on oracle data.

In transaction-multi-payment pallet, in `on_initialize` we calculate the prices with the help of spot price provider in every new block. This is expensive and won't need it anymore, so we can get rid of it.

Where the calculated price is used in the pallet logic, we will use oracle price provider. If no price present, then we use the default price

We would also need to change `NativePriceOracle` to use the stored routes and oracle prices

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.