Giter VIP home page Giter VIP logo

hyperdex's People

Contributors

kapiljaveri avatar kevva avatar leto avatar lukechilds avatar metaspartan avatar project-qmc avatar pungotoken avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperdex's Issues

Each portfolio should have it's own swap database

Currently there is just a single database.

This means if you have multiple portfolios you'll see the same swap history in all of them.

We should change this so each portfolio gets it own isolated swap database instance.

Light theme

We want to ship with a dark theme by default, but also have an option to use a light theme for users that prefer that.

Withdraw errors aren't handled

A failed withdrawal will return:

{"txid":"0000000000000000000000000000000000000000000000000000000000000000","complete":false}

Currently this goes unhandled and the withdraw button will be disabled until app restart.

Unfortunately we don't get any information on what went wrong from marketmaker.

Possibly Support Auto Updates

This could be very beneficial for quick security patches, not just for HyperDEX but also any binaries we bundle.

However could also have security implications, if the update process was compromised then an attacker could instantly gain access to all HyperDEX users funds.

We could make an attack like this extremely unfeasible by also requiring the updates to be signed with one (or maybe multiple PGP keys). These could be owned by trusted developers, members of SuperNET etc.

An attacker would have to compromise the update process as well as all of the required PGP keys to successfully push an update.

Handle electrum errors during login

Currently if an electrum server fails for a single currency, the entire login process fails.

We should allow them to login but notify them that the electrum servers are down for that currency.

Allow user to enable/disable currencies

Currently there's no way for the user to enable/disable coins via the UI.

We should enable some popular currencies by default and give the user the option to enable/disable all the currencies we support.

Hot Module Replacement

@sindresorhus Do you have any experience setting up HMR?

I normally use CRA for React dev and it has it configured by default, I think it would be really beneficial if we had HMR for this project. It'd allow us to remove the persistent state code we've got currently in dev mode and means we wouldn't have to do weird hacks like re-instantiate the api instance.

Also means any hooks we run at login and all other component state will persist throughout reloads, and reloads are basically instant.

Alternatively, could we integrate CRA into our build system, you get a huge amount for free; HMR, simple cli build scripts, pretty error/lint HTML output. Also I think electron-builder now detects CRA and does some stuff automatically to make it easier to integrate.

Get `txfee` before withdrawing

Before we do a withdraw we should do a request to:

{
  method: 'getfee',
  coin: 'BTC',
}

And display the txfee to the user in the confirmation dialogue.

We then specify a txfee property in satoshis to the withdraw command.

This is a new method I just got James to add for us. It's probably not in a main build yet. And not important right now. Just documenting it here.

Add credit for API usage

We're using the https://min-api.cryptocompare.com/ API, so we need to give credit:

Our API is under a Creative Commons - Attribution Non-Commercial license. This means that it’s free as long as you attribute it to us and you are not making money from the data. If you are selling a product that uses our data we charge a fee. The idea is that if you start making a lot of money using our data, we would like something in return. If you are just providing a free service, you can use our data freely. Please make sure you credit us with a link if you use our data on your website or app.

We should either give credit on the HyperDEX website or in the about dialog in the app.

Support kickstarting swaps

https://modulelab.slack.com/archives/C8ADPSWTB/p1525328006000031

Sindre Sorhus [1:13 PM]
@Luke Childs https://github.com/jl777/SuperNET/commit/8725909b3c12f8df17de0b075422ad3676cc5195 

Have you thought about how the kickstart thing will work? I assume it's just a temporary workaround until mm does this automatically?

Luke Childs [1:14 PM]
no we’ll need kickstart long term
so if they quit the app with pending trades
or in process trades
then restart
we need to filter all the in progress trades and tell mm to resume them
I think it will be a fair bit of work to integrate
mm will most likely give us no helpful feedback in the event that:
- the trade doesn’t exist 
- exists but can’t be restarted
- was already automatically restarted
- is in the progress of being rolled back (edited)
we need to handle all those cases
and we probably won’t get enough information to
and we also need to re-attach event listeners so we get socket updates on restarted trades
if mm auto restarts them without telling us we’ll miss them
so many things that can go wrong
this is exactly why we shouldn’t have two separate swap DB instances…
😞
For v2 we need to push for a built in swap DB in mm that actually works and scales
so we have no internal copy
we just query mm as the single source of truth
They could use sqlite or LevelDB or something light weight

Swap DB should be encrypted

If someone else gets access to your backup they shouldn't be able to view swap info. It contains TXIDs which someone could easily derive the users addresses and balance from.

Document working with the app

The architecture, how to work with marketmaker, etc. For new maintainers/contributors.

How to update dependencies (We must be careful and review changes).

Handle fiat price API errors

Currently if any of the 3rd party centralised APIs go down you can't login to the app. This is because we're depending on the USD values we get from the API in a lot of places for convenience in showing/calculating balances.

We should handle the case where some of these APIs may be deprecated or go offline, we don't need to go to great lengths to make sure the app looks perfect in this scenario, but it should still be fully usable.

  • Showing empty graphs is fine, or just an error saying no graph data.
  • USD withdraw input should probably be disabled.
  • Dashboard USD balances are probably fine just all being $0.

Maybe show a modal if the APIs are inaccessible saying we can't get USD price data. This should help prepare the user for any strange USD related behaviour.

Tests

We need to write tests.

Especially for the Marketmaker API wrapper and the portfolio utils.

Localization

The app should be localized into some popular languages to be more user-friendly to those users. We have not yet decided which languages.

Async encryption

Drop iocane for our own async encryption lib. iocane is good but it's a bit bloated and isn't async so blocks the thread during encryption/decryption which can take a while.

Race condition in fireEvery

If you call the returned cancel function during the async execution of the callback, the timeoutId will reference the current timeoutId which has already started, not a future id.

We need to not only clear the timeoutId but also flip a local boolean variable and check this before we call setTimeout again.

Show connected peers

It would be nice to have a connection indicator showing how many peers are connected in the title bar.

Maybe a green circle that says Connected to n peers. If there are no connections a red circle that says Not connected.

Or something along those lines.

Test enabling all coins

It would be great if the concept of enabling/disabling coins is completely hidden from the users.

We should test enabling all coins (in Electrum mode) by default and giving the user an option in advanced settings to switch between Electrum or full node.

This may result in excessive memory use and be unfeasible. In that case we might be able to get clever and enable all coins on startup, check the balance and then disable them.

Alternatively we could implement balance checking completely on our end with Electrum and just query marketmaker for the address to check. Although this could lead to inconsistencies between what marketmaker thinks the balance is and what our code thinks the balance is. (e.g if one is connected to a more up to date electrum node than the other)

Remove 0 entries from order book

Some entries in the order book have 0 values. They are confusing and it's unclear whether they can be filled or not. We should remove these so we don't confuse users and they aren't included in price calculations.

Improve text size

Some people have commented some of the text size is too small in some places in the Exchange view. We have a space problem there, but should be able to slightly increase the text size.

Related: lukechilds/hyperdex-bugtracker#4

Format all marketmaker API responses

The API responses we get from marketmaker or often not that well formatted.

Currently, sometimes we are using them as is and pluck out the properties we need, sometimes we format them into a more usable structure.

We should really refactor the API client to format every response in a clean structure and use that structure everywhere.

This will also have the benefit of meaning we can use the API client as an API reference/documentation. The official docs are lacking and sometimes incorrect.

Improve handling of order book state

We should discard any order book responses if the pair doesn't match the current pair. Otherwise if the user changes the pair we can apply the wrong order book or even try and apply the order book for disabled coins.

Also, we should instantly clear the order book state when the trading pair changes. Otherwise it seems quite laggy because the old order book data will stay visible until we get a new response from marketmaker. It's also confusing for users, they may not realise and think it's the correct values for the current pair.

Allow users to cancel a trade

This will only work for pending trades, once they're matched they can't be cancelled.

If marketmaker adds support for cancelling in-progress trades we can support it to.

Set up nightly builds

We can use the Travis cron feature. We have to wait until the repo is public, though.

Better error reporting

We are limited to what we can do at the moment because marketmaker is inconsistent with how it reports errors and when when it does report error we very rarely get an error code to reference.

But we should do as much as we can to make the errors clearer wherever possible.

We're waiting on documentation for failed swap error codes: https://docs.google.com/spreadsheets/d/1blgmrJCZ-SfYaJdTTVdk717kZ43R4yzm9YIW2Bt--EM/edit#gid=0

Related:

Validate addresses

We should validate the currency addresses where we allow users to input them, like in the Withdraw view.

We can't really use a regex as we need to validate the currencies individually to, for example, prevent a user from sending something to a KMD instead of a BTC address.

Resources:

Improve sell order handling

marketmaker doesn't have any concept of sell orders due to the any/any order book combinations.

If you are on the CHIPS/KMD pair and place a sell order, marketmaker will place a KMD/CHIPS buy order.

This works but it's not very clear in the UI. We need to clearly show buy and sell orders.

One potential solution here: lukechilds/hyperdex-bugtracker#15

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Tooltips

We need a tooltip solution that use Portals and doesn't require any state handling or lots of boilerplate. It should be easy to wrap existing content with a tooltip.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.