balance-io / balance-open

Balance Open: A GPL3-licensed macOS menu bar app for all the world’s currencies.
https://balance.io
GNU General Public License v3.0
288 stars 41 forks source link

Currency Exchanges & Transfers #92

Open reddavis opened 7 years ago

reddavis commented 7 years ago

Generic classes to handle transfers

Determining If Which Transferable Transfers are Permitted

We need a more explicit way for determining what transfers are permitted. A Transferable object could support being the recipient but not being the source.

An example of this is any GDAX account. GDAX supports withdrawing funds so it can be a source however it does not have an API for getting the accounts address so it is unable to be the recipient.

To add another layer on top...ShapeShift supports setting a return address when sending money. We would only be able to set the return address for those source objects that give us access to their address.

Variables that can determine outcome.

Extended Permissions

Balance generally* only asks for read permission. To support transfers, Balance would require more permissions for each account taking part in the transfer.

The permissions required for the institutions we currently support are:

* I say "generally" because for Institutions like GDAX and Poloniex, the user creates a key for Balance, so therefore can select more permissions than Balance really needs.

** We also need to decide whether requesting that 2fa is disabled for Balance transfer API calls is acceptable for the user

Coinbase Withdraw API

Balance's Coinbase accounts do not currently support the ability to withdraw. This needs to be possible for them to take part in transfers. CB has API's for this: https://developers.coinbase.com/api/v2#withdrawals

Poloniex Fetch Account Address API

In order to transfer to a Poloniex account, we need to get the crypto address. Poloniex has API's for this: https://poloniex.com/support/api/.

Coinbase Fetch Account Address API

In order to transfer to a CB account, we need to get the crypto address. CB has API's for this: https://developers.coinbase.com/api/v2#addresses.

UI

The final version of this is TBD but currently building boilerplate UI and building it into the Balance flow.

ricburton commented 7 years ago

This is fantastic @reddavis. I wonder if we could use the popup from Balance Original to highlight the request for new permissions.

screen shot 2017-08-30 at 15 30 17
reddavis commented 7 years ago

Nice! Yer something like that would be perfect. For some institutions, like GDAX, we may need to provide a walkthrough or something updating permissions is a bit more involved than just clicking a button to reauth.