Bitcoin Forum
May 05, 2024, 09:49:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Building An Escrow Wallet On Bitcoin Core  (Read 179 times)
Bitwallet99 (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 3


View Profile
May 29, 2022, 04:08:40 AM
 #1

Hi,

Is it possible to build an escrow wallet on Bitcoin Core, with my own unique interface on top, allowing buyers and sellers to transact?

Will I also be able to charge a personal fee for the users using my escrow wallet? I'm thinking something along the lines of localbitcoins escrow wallet.

Im planning on not having it centralized, that is bitcoins not being stored on company addresses. Just connecting buyers and sellers from their non custodial wallets.

Thank you.
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714945775
Hero Member
*
Offline Offline

Posts: 1714945775

View Profile Personal Message (Offline)

Ignore
1714945775
Reply with quote  #2

1714945775
Report to moderator
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
May 29, 2022, 07:53:51 AM
Merited by pooya87 (2), ABCbits (1)
 #2

If the bitcoin is not stored in your own address, how will you moderate any disputes between the buyer and seller? Do you plan on using a multi-sig setup, in which the buyer and seller must agree to release the coin, and if there is a dispute, you will intervene with the 3rd signing key? If this is your proposed setup, you will not be able to force the various parties to pay you a fee when there is no dispute. To employ this setup, you would simply need to generate multi-sig addresses upon receipt of the public keys from each party involved in the transaction.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
May 29, 2022, 08:28:28 AM
 #3

If it's an escrow, then you get custody of the money. That's the point of escrow. Alice doesn't trust Charlie, but she trusts Bob, and so does Charlie. Alice gives Bob the money, Charlie gives the product to Bob. Bob confirms the trade and does the switch.

This is how it works in theory. Multi-sig makes no sense unless Alice and Charlie use security deposit, which overrides the purpose of the middleman.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
May 29, 2022, 08:32:43 AM
Merited by ABCbits (1)
 #4

This is how it works in theory. Multi-sig makes no sense unless Alice and Charlie use security deposit, which overrides the purpose of the middleman.
A 2-of-3 multi-sig without a security deposit should reduce the risks to all parties involved. If the transaction goes smoothly, both parties sign the release transaction, and if there is a dispute, the escrow agent can mediate the dispute according to the TOS of his services and sign a transaction accordingly.

A 2-of-3 multi-sig escrow agent would not be able to arbitrarily run away with his customer's money, although he would be able to collude with one of the parties involved to steal the money in the escrow address. This setup may work when there is modest amounts of trust among all of those involved.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
May 29, 2022, 08:42:40 AM
 #5

If the transaction goes smoothly, both parties sign the release transaction, and if there is a dispute, the escrow agent can mediate the dispute according to the TOS of his services and sign a transaction accordingly.
And with single-sig, such dispute can't happen, because Alice doesn't have custody (or part of it) to cheat. He's handed out to the escrow agent.

A 2-of-3 multi-sig escrow agent would not be able to arbitrarily run away with his customer's money, although he would be able to collude with one of the parties involved to steal the money in the escrow address. This setup may work when there is modest amounts of trust among all of those involved.
It mitigates trust, but it doesn't eliminates it, or at least, it doesn't discourage enough. The agent can still blackmail or collude with one of the other parties, as you said, to steal the money and split it half etc. And that's just for Alice's money. Charlie can't divide the possession of his product in a multi-sig.

I find it a little contradictory. Don't you use an escrow because you trust the agent?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
May 29, 2022, 08:49:45 AM
Merited by pooya87 (2), ABCbits (2), BlackHatCoiner (2)
 #6

If the transaction goes smoothly, both parties sign the release transaction, and if there is a dispute, the escrow agent can mediate the dispute according to the TOS of his services and sign a transaction accordingly.
And with single-sig, such dispute can't happen, because Alice doesn't have custody (or part of it) to cheat. He's handed out to the escrow agent.

if Alice is trading with Bob, and is using Charlie as an escrow agent:
*If Charlie is taking sole custody of the coin, as his role as escrow agent, he will release the coin upon the agreement of both Alice and Bob
*If Charlie is using a 2-of-3 multisig address, as his role as escrow agent, Alice and Bob will sign a release transaction upon both of their agreement

*If there is a dispute, in both cases, Charlie will decide which party will receive the release coin, and that party will sign the release transaction with a multisig escrow, or Charlie will release the transaction on his own if he is not using multi-sig.

A 2-of-3 multi-sig escrow agent would not be able to arbitrarily run away with his customer's money, although he would be able to collude with one of the parties involved to steal the money in the escrow address. This setup may work when there is modest amounts of trust among all of those involved.
It mitigates trust, but it doesn't eliminates it, or at least, it doesn't discourage enough. The agent can still blackmail or collude with one of the other parties, as you said, to steal the money and split it half etc. And that's just for Alice's money. Charlie can't divide the possession of his product in a multi-sig.
The escrow agent has less ability to steal the coin with a multi-sig setup. This is a net benefit to his customers.
Bitwallet99 (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 3


View Profile
May 30, 2022, 05:08:38 AM
 #7

 
@primenumber7

Quote
if Alice is trading with Bob, and is using Charlie as an escrow agent:
*If Charlie is taking sole custody of the coin, as his role as escrow agent, he will release the coin upon the agreement of both Alice and Bob
*If Charlie is using a 2-of-3 multisig address, as his role as escrow agent, Alice and Bob will sign a release transaction upon both of their agreement


I guess  exchanges like localbitcoins must be taking sole custody of the coin like Charlie and not using multisig addresses. Is this correct? This would enable them, like me to charge fees?

I don't mind my site taking sole custody of the sellers Bitcoin (during the transaction), but when there is a transfer to the buyer, it can go directly to their non custodial wallets right? It does not have to be in my site address.
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6728


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 30, 2022, 05:52:35 AM
 #8

A 2-of-3 multi-sig without a security deposit should reduce the risks to all parties involved. If the transaction goes smoothly, both parties sign the release transaction, and if there is a dispute, the escrow agent can mediate the dispute according to the TOS of his services and sign a transaction accordingly.

Such mediation would only work if the mediator forces both parties to pass a screen that makes them confirm that there are no disputes between them, before signing the transaction.

Otherwise the tx can still be broadcasted while there is a dispute, or before the dispute happens.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
dkbit98
Legendary
*
Offline Offline

Activity: 2226
Merit: 7129



View Profile WWW
May 30, 2022, 02:15:24 PM
 #9

Is it possible to build an escrow wallet on Bitcoin Core, with my own unique interface on top, allowing buyers and sellers to transact?
I know some people ae doing something similar with Electron wallets and users who create multisig wallets, so this can probably be done with Bitcoin Core as well but I am not sure.
Multisig setup be done correctly, but third address needs to be created and controlled by all parties that agree with a deal, and funds are released when exchange is completed.
There is nothing complicated about this but I am not sure how you can charge fees for this, and why would anyone accept to pay you for this when they can do it on their own.

Will I also be able to charge a personal fee for the users using my escrow wallet? I'm thinking something along the lines of localbitcoins escrow wallet.
Localbitcoins is not really decentralized and all accounts have to pass kyc verification, so I would not use this for purpose you described.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Bitwallet99 (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 3


View Profile
May 30, 2022, 10:37:05 PM
 #10

I don't mind my site taking sole custody of the sellers Bitcoin (during the transaction), but when there is a transfer to the buyer, it can go directly to their non custodial wallets right? It does not have to be in my site address.

I'm having hard time understanding what you said. If your site is the only custodian of seller's BTC, then the address used to hold that BTC definitely belong to your site.


What I mean is that I have the temporary custody of the sellers Bitcoin when he wants to sell. When the deal is completed, the Bitcoin goes to an address outside my site, to the buyers own wallet. I'm trying to reduce centralization here. Idea is seller just uses the site address for selling Bitcoin. I hope I'm clear, and I hope it's possible..
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10549



View Profile
May 31, 2022, 02:23:03 AM
Merited by ABCbits (1), Rockstarguy (1)
 #11

What I mean is that I have the temporary custody of the sellers Bitcoin when he wants to sell. When the deal is completed, the Bitcoin goes to an address outside my site, to the buyers own wallet. I'm trying to reduce centralization here. Idea is seller just uses the site address for selling Bitcoin.
If you have full custody of the coins even for a second, that introduces centralization.
Also what you want doesn't need anything special like multi-sig since you have full custody you use the simplest form of address (P2WPKH) to receive the funds. But that is not the best escrow option.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6728


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 31, 2022, 04:10:15 AM
Merited by ABCbits (1)
 #12

I don't mind my site taking sole custody of the sellers Bitcoin (during the transaction), but when there is a transfer to the buyer, it can go directly to their non custodial wallets right? It does not have to be in my site address.

I'm having hard time understanding what you said. If your site is the only custodian of seller's BTC, then the address used to hold that BTC definitely belong to your site.


What I mean is that I have the temporary custody of the sellers Bitcoin when he wants to sell. When the deal is completed, the Bitcoin goes to an address outside my site, to the buyers own wallet. I'm trying to reduce centralization here. Idea is seller just uses the site address for selling Bitcoin. I hope I'm clear, and I hope it's possible..


Instead of all that, just introduce a 3-of-4 multisig as the escrow.

One key for the buyer, one for the seller, and one for your automated fee collector (the seller and buyer will have to pass through an agreement text saying they acknowledge they have to send percentage fee to address "1blablabla...").

Then, the buyer and seller can each chose to sign (which waives their right to start a dispute) or open a dispute with the other party. In which case he 4th key that is controlled by a human (you) will intervene and sign with your key if seller or buyer is trying to bail out, or the tx can be abandoned until the disputing party signs [signifying their acceptance of] it.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1624
Merit: 1899

Amazon Prime Member #7


View Profile
June 01, 2022, 07:53:23 AM
 #13


@primenumber7

Quote
if Alice is trading with Bob, and is using Charlie as an escrow agent:
*If Charlie is taking sole custody of the coin, as his role as escrow agent, he will release the coin upon the agreement of both Alice and Bob
*If Charlie is using a 2-of-3 multisig address, as his role as escrow agent, Alice and Bob will sign a release transaction upon both of their agreement


I guess  exchanges like localbitcoins must be taking sole custody of the coin like Charlie and not using multisig addresses. Is this correct? This would enable them, like me to charge fees?

I don't mind my site taking sole custody of the sellers Bitcoin (during the transaction), but when there is a transfer to the buyer, it can go directly to their non custodial wallets right? It does not have to be in my site address.
My understanding is that LBC does keep sole custody of customer deposits. There is a lot of automation involved, so the seller telling LBC that the coin can be released to the buyer will often have the effect of the buyer instantly receiving the coin, but LBC may delay any withdrawals from the buyer's account for various reasons.

A 2-of-3 multi-sig without a security deposit should reduce the risks to all parties involved. If the transaction goes smoothly, both parties sign the release transaction, and if there is a dispute, the escrow agent can mediate the dispute according to the TOS of his services and sign a transaction accordingly.

Such mediation would only work if the mediator forces both parties to pass a screen that makes them confirm that there are no disputes between them, before signing the transaction.

Otherwise the tx can still be broadcasted while there is a dispute, or before the dispute happens.

As a general rule, it is best to not sign a transaction unless you are okay with the transaction being broadcast and confirmed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!