I am thinking about possibilities for implementing recurring payments service with as little risk and user-interaction as possible.
Goals:
-> Keep the site's hot wallet balance as low as possible to make it unattractive for robbing
-> Allow the user to "pre-pay" for as long as he wants.
-> Allow the user to always cancel not-yet-paid payments
Scenario:
Let's say user wants to pay 1 BTC each week to an address.
User goes to service website, enters information "pay 1 BTC/week to Address X".
User sends 10 BTC to website.
Website splits these 10 BTC into 10 transactions of 1 BTC, each with a locktime one week further in the future.
=> User is done
=> Receiver gets 1 BTC/week
=> Receiver literally can see in the blockchain that payments to him are really planned (of course this is just for information - unlocked payments could be cancelled anytime)
=> Few days before the last pay date is reached site sends a reminder mail to user if he wants to continue the recurring payment he has to send funds.
=> Happiness
Now let's say the user wants to cancel the not-yet-paid transactions:
-> User goes to site, says to stop all payments
-> Site updates the
unlocked transactions with a new Outpoint (The users address).
=>
Q: Can the user get back his coins immediately? Can the locktime be modified also at this place, so the user gets his coins back right away? Or does he still have to wait for the locktime to be reached? Or could the site generate just a new normal transaction with all unlocked transaction's inputs as inputs that "overrides" the waiting transactions?
Now assume the site gets robbed and an attacker obtains the wallet.dat:
What is the actual balance of the wallet? If all incoming payments from Users are immediately broadcast with according locktime to the recipients - Would the wallet appear to the robber as "empty"? What additional information would he need to change all existing unlocked transactions to point to his address?
In general: Would this approach give any security boost over a classical "pay from hot wallet via cronjob"-approach?