subdarkdex / subdex-parachain

Apache License 2.0
0 stars 1 forks source link

Research price oracles #15

Open iorveth opened 4 years ago

iorveth commented 4 years ago

Research uniswap price oracles implementation more thoroughly.

https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Pair.sol https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/examples/ExampleOracleSimple.sol https://uniswap.org/blog/uniswap-v2/#price-oracles can be used for reference

Also off-chain worker seems to be a good option for price oracle implementation. Examples can be found here https://github.com/paritytech/substrate/blob/master/frame/example-offchain-worker/src/lib.rs https://github.com/open-web3-stack/open-runtime-module-library/blob/master/oracle/src/lib.rs

KStasi commented 4 years ago

Another option is to use chainlink oracles. There is an example here: https://github.com/smartcontractkit/chainlink-polkadot. We can fork and customize it for our needs