Send delayed payouts to the correct BurningMan address #6382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sending to the old BM address is seen as problematic by support staff e.g. @refund-agent2. This PR fixes it.
Why some delayed payouts are sent to the old burningman:
processModel.getDaoFacade().getParamValue(Param.RECIPIENT_BTC_ADDRESS);
Scenario 1: Seller DAO enabled, Buyer DAO enabled.
The normal case. Both parties agree that
34VLFgtFKAtwTdZ5rengTT2g2zC99sWQLC
is the appropriate delayed payout address.Scenario 2: Seller DAO enabled, Buyer DAO disabled.
Seller creates the delayed payout tx using the current DAO parameter value
34VLFgtFKAtwTdZ5rengTT2g2zC99sWQLC
. Buyer will accept it because all known BM addresses are explicitly hard coded. See TradeDataValidation.java#L82-L88 and DaoFacade.java#L790-L792Scenario 3: Seller DAO disabled, Buyer DAO enabled.
Seller creates the delayed payout tx using the old parameter value of
1BVxNn3T12veSK6DgqwU4Hdn7QHcDDRag7
. When the buyer validates, it sees that address is known as one of the past valid DAO values and therefore accepts it. If the trade goes to arbitration the delayed payout is sent to the old burningman.Scenario 4: Seller DAO disabled, Buyer DAO disabled.
Seller creates the delayed payout tx using the old parameter value of
1BVxNn3T12veSK6DgqwU4Hdn7QHcDDRag7
. Buyer will accept it because all known BM addresses are explicitly hard coded. See TradeDataValidation.java#L82-L88 and DaoFacade.java#L790-L792The problem (scenario 3&4) can be resolved by calling
DelayedPayoutAddressProvider.getDelayedPayoutAddress()
- which until now is implemented but unused. This PR makes use of it so all scenarios use the most up-to-date BM address.bisq/core/src/main/java/bisq/core/trade/DelayedPayoutAddressProvider.java
Lines 33 to 51 in 0602466