An open API service indexing awesome lists of open source software.

https://github.com/descent-collective/ozi

Ozi is an application run by nodes(Descent price feeds). It broadcasts signed price messages through a network of peer-to-peer nodes over the gossip-sub protocol of libp2p.
https://github.com/descent-collective/ozi

Last synced: 2 months ago
JSON representation

Ozi is an application run by nodes(Descent price feeds). It broadcasts signed price messages through a network of peer-to-peer nodes over the gossip-sub protocol of libp2p.

Awesome Lists containing this project

README

        

POC for using libp2p gossipsub protocol to broadcast signed price messages for relayer clients to pick it up and send to the oracle smart contract.

**TODO:**
- [x] use kademlia for peer discovery. right now we do it by pinging a peer. see https://github.com/libp2p/rust-libp2p/discussions/2447
- [ ] Get price for a particular collateral pair(e.g USDC/NGN) from listed exchanges(e.g. cryptocompare)
- [ ] Sign price data using nodes private keys
- [ ] Use variables from config to make API calls to exchanges.

## usage

In one terminal:

`$ cd ozi && cargo run -- m "hello"`

The following will be printed:

Listening on *< address >*

------

In another terminal:

`$ cd ozi && cargo run --m "hello from 2" -p < address >`