Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Binance International #58

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Add Binance International #58

merged 2 commits into from
Nov 19, 2020

Conversation

lthiery
Copy link
Member

@lthiery lthiery commented Oct 22, 2020

A new method of single-shot reporting by weighted average. It looks like this:

./helium-wallet oracle report-weighted-average --binance-us 1 --binance-int 2
Binance US                reports price of $1.1491
Binance International     reports price of $1.14958000
Report price 1.149419885058000 @ block height 553939?
Enter password to confirm.
Password: 

In addition, the user can set the helium-wallet up to report every N minutes, requiring only an unlock of the wallet at startup.

@lthiery lthiery added the WIP Work-in-progress, do not merge label Oct 22, 2020
@lthiery
Copy link
Member Author

lthiery commented Oct 22, 2020

This is what the automated interface looks like

./helium-wallet oracle automate --delay 20 --binance-int 1 --binance-us 1`
Starting oracle report automation with the following weights: 
Weights { binance_us: 1.0, binance_int: 1.0, bilaxy: 0.0, coingecko: 0.0 }
Enter password to start utility. 
Password: [hidden]
Binance US                reports price of $1.14
Binance International     reports price of $1.15
+--------------+---------------------------------------------+
| Key          | Value                                       |
+--------------+---------------------------------------------+
| Block Height | 553970                                      |
+--------------+---------------------------------------------+
| Price        | 1.145                                       |
+--------------+---------------------------------------------+
| Hash         |  HASH HERE                                  |
+--------------+---------------------------------------------+

After that, it will sleep for $delay minutes before starting back at the Binance US line.

@lthiery lthiery requested a review from madninja October 22, 2020 17:47
@lthiery
Copy link
Member Author

lthiery commented Oct 23, 2020

To make further arbitrage more challenging, I've also made it easy to create random delay between reports. This uncertainty should increase risk of any strategies that monitor and anticipate oracle behavior.

@lthiery lthiery force-pushed the lthiery/oracle-improvements branch 2 times, most recently from adfea50 to 244d1ce Compare October 26, 2020 18:47
@lthiery lthiery removed the WIP Work-in-progress, do not merge label Oct 26, 2020
@lthiery lthiery changed the title Oracle Improvements: Weighted Averages and Automated Submissions [WIP] Oracle Improvements: Weighted Averages and Automated Submissions Oct 26, 2020
@lthiery
Copy link
Member Author

lthiery commented Oct 28, 2020

One final feature of this PR is that the automated submission can specify a percentage difference that would trigger a quick submission. This will decrease on-chain latency in the event of an arbitrage opportunity.

@lthiery lthiery changed the title Oracle Improvements: Weighted Averages and Automated Submissions Add Binance International Nov 19, 2020
@lthiery
Copy link
Member Author

lthiery commented Nov 19, 2020

Any higher level features are being deferred until a longer-term oracle app strategy is figured out. This PR only adds Binance International as a price source.

@madninja madninja merged commit 7a40d99 into master Nov 19, 2020
@madninja madninja deleted the lthiery/oracle-improvements branch November 19, 2020 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants