dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

[ticketbuyer] lock vsp fee inputs before ticketbuyer logic runs

Open behindtext opened this issue 4 years ago • 0 comments

preserving privacy by using vspd has some caveats when it comes to buying tickets. even if your ticket purchase account balance suggests you have sufficient funds to buy N tickets, you must also send a vsp fee tx with each ticket purchase, and this may lead to your available funds only allowing for purchase of N-1 tickets.

per prior discussion with @jrick, the utxos used as inputs to the fee txs need to be chosen and locked before running the usual ticketbuyer logic. the condition where floor( balance / sdiff ) = N and floor( (balance - utxos for fees) / sdiff ) = N-1 needs to be handled.

behindtext avatar Jun 15 '20 22:06 behindtext