RoboSats / robosats

A simple and private bitcoin exchange
https://learn.robosats.com
GNU Affero General Public License v3.0
719 stars 141 forks source link

Collaborative trades: To enable DCA like feature #206

Open ghost opened 2 years ago

ghost commented 2 years ago

Is your feature request related to a problem? Please describe. Many of fiat working robots here get their monthly paycheck. Now the robots have to do multiple trades each month to put in the same amount (given robot wants to do DCA). Today robots have to do multiple trades per month to convert that fiat into BTC spread over a month. There exists no way to have that these trades get squeezed into one trade involving multiple robots at once.

Describe the solution you'd like A collaborative trade that can squeeze multiple p2p trades in one and gets executed on a pre-determined date.

For example, Robot A can setup that it wants to buy 1000 usd worth BTC on 5th of September, 2022. Now other robots can come and bid their premium and amount they want to sell. Once all the 1000 usd is filled by maybe 6 Robots on different premiums. We give control to Robot A to setup up a range of premiums it is willing to pay.

After that on 5th of September it does complete all the trades and this collaborative trade is finished.

This feature can create a DCA kind of feature for Robosats and enable robots to plan ahead and squeeze all the trades in one collaborative trade like this and get btc and do that again next month/week.

Reckless-Satoshi commented 2 years ago

It's a cool idea! Would you mind to detail, step by step, how the entire pipeline could look? From "DCA contract formation" to each of the DCA trades? At the moment your definition matches more that of "futures contract" trade, or "order chunking" (many takers fill a single maker) than auto-DCA.

We should be mindful that p2p trades always need user action (pay fiat to peer), so my concern is that we might not be able to add any automation to the DCA process at all.

All trades are "collaborative trades". I wonder whether we can find batter naming for an autoDCA-like feature

Lightning8Count commented 2 years ago

It's a cool idea! Would you mind to detail, step by step, how the entire pipeline could look? From "DCA contract formation" to each of the DCA trades? At the moment your definition matches more that of "futures contract" trade, or "order chunking" (many takers fill a single maker) than auto-DCA.

We should be mindful that p2p trades always need user action (pay fiat to peer), so my concern is that we might not be able to add any automation to the DCA process at all.

All trades are "collaborative trades". I wonder whether we can find batter naming for an autoDCA-like feature

Could it be done by using "keysend" on the seller side to "lock in" or "escrow" the number of sats required for the whole DCA transaction? For example if the buyer wants to buy $50 sats every Friday at 5pm for 1 month (4 Fridays). Then the seller escrows $200 worth of sats to robosats. The only issue as you say is there is the futures contract aspect to this that the seller would need to be compensated for. But leaving that aside for the moment, robosats could then automate the purchases every Friday at 5pm with automated warnings being sent to both the seller and buyer to confirm that the transaction is completed for that Friday. I'll think about the implications of the fluctuating fiat price relative to the sats locked in or escrowed. But I imagine that it would be at value at the time the whole contract was drawn up and agreed ie at the start. So over time the price will fluctuate up or down over that 4 week period. But the sats escrowed will remain the same. One option to deal with this is that the fluctuations in price could be tallied up and on the last day any ups or downs are deducted from seller or buyer plus the premium, which the buyer would also pay the seller. This then helps to remove the fluctuation risk from both seller and buyer.