ilp-connector icon indicating copy to clipboard operation
ilp-connector copied to clipboard

Automatic re-balancing of cryptocurrency

Open ghost opened this issue 7 years ago • 6 comments

Could have an integration to a decentralized exchange such as Shapeshift for automatic re-balancing of funds, once we have some multi-currency connectors. Additionally as a feature, a recipient of a settlement may be owed currency X but prefer to receive currency Z instead; some exchange API can provide your multi-currency rates and pull in their order books so you can trade immediately to re-balance. https://info.shapeshift.io/api

ghost avatar Jan 31 '18 22:01 ghost

I think currently ilp-connector does not have a concept of 'user' that would link that user's multiple accounts?

michielbdejong avatar Feb 02 '18 12:02 michielbdejong

https://github.com/interledgerjs/ilp-connector#extensibility-backends

ghost avatar Feb 06 '18 23:02 ghost

Could have an integration to a decentralized exchange such as Shapeshift for automatic re-balancing of funds

I think this is a great idea. I think it would make sense to implement that as a "connector backend".

Additionally as a feature, a recipient of a settlement may be owed currency X but prefer to receive currency Z instead

I don't think that makes as much sense. If you're sending and receiving your payments through a particular currency, all of your payouts (or payment channel updates) should be in that currency. If you want to start using a different currency, you can send an ILP payment to yourself at the address of your account in the other currency.

emschwartz avatar Feb 06 '18 23:02 emschwartz

If we wanted to implement this, a hurdle for this would be #413; currently, the multi-plugins act as mini-connectors, and only they know about individual accounts and their balances. The ilp-connector only serves to provide the "plugin-plugins" like Store and Logger, and to deal with cross-currency payments. So implementing something like this would probably require changing the ledger plugin interface.

michielbdejong avatar Feb 07 '18 07:02 michielbdejong

Currently no multi-plugins are multicurrency, so I don’t see how that preventa this from being implemented. From your connector’s perspective, having an XRP-asym-server is the same as being peered with another connector over XRP

sharafian avatar Feb 07 '18 13:02 sharafian

ah ok, I was thinking of rebalancing a user's balance, but probably this issue is more about the connector rebalancing its own hot wallets.

michielbdejong avatar Feb 07 '18 14:02 michielbdejong