mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-07 06:32:47 -04:00
update
This commit is contained in:
parent
08d5639a95
commit
ee9205fec9
9 changed files with 23 additions and 31 deletions
13
README.md
13
README.md
|
@ -29,13 +29,13 @@ You can change the network mode in the guice module: BitSquareModule.java
|
||||||
* TomP2P as messaging lib integrated and basic use cases in msg screen implemented: orderbook, add order, remove order, peer interaction
|
* TomP2P as messaging lib integrated and basic use cases in msg screen implemented: orderbook, add order, remove order, peer interaction
|
||||||
* Payment process implemented with messaging for Offerer buy BTC case
|
* Payment process implemented with messaging for Offerer buy BTC case
|
||||||
* Hash of contract data embedded into tx (OP_RETURN)
|
* Hash of contract data embedded into tx (OP_RETURN)
|
||||||
|
* Arbitrator integration concept
|
||||||
|
* Conceptual refinements
|
||||||
|
* Develop funding model
|
||||||
|
|
||||||
### Next steps:
|
### Next steps:
|
||||||
* Conceptual refinements
|
|
||||||
* Arbitrator integration concept
|
|
||||||
* Other trade variants (Buy BTC taker, Sell BTC offerer, Sell BTC offerer)
|
|
||||||
* Develop funding model
|
|
||||||
* Start development of production version
|
* Start development of production version
|
||||||
|
* Other trade variants (Buy BTC taker, Sell BTC offerer, Sell BTC offerer)
|
||||||
|
|
||||||
|
|
||||||
### Screenshots of basic the use cases:
|
### Screenshots of basic the use cases:
|
||||||
|
@ -60,8 +60,9 @@ Deposit tx: https://blockchain.info/de/tx/98c6ae55963022871216a6a124c1e1ed7f6308
|
||||||
Payout tx: https://blockchain.info/tx/498e2c299ca991b27f61b63fb6ee457819ee9e33ee5a1d250fde47eb15199adc
|
Payout tx: https://blockchain.info/tx/498e2c299ca991b27f61b63fb6ee457819ee9e33ee5a1d250fde47eb15199adc
|
||||||
|
|
||||||
|
|
||||||
### Links:
|
### Resources:
|
||||||
* Web: http://bitsquare.io
|
* Web: http://bitsquare.io
|
||||||
* Whitepaper: https://docs.google.com/document/d/1d3EiWZdaM89-P6MVhS53unXv2-pDpSFsN3W4kCGXKgY/edit?pli=1
|
* Whitepaper: https://docs.google.com/document/d/1d3EiWZdaM89-P6MVhS53unXv2-pDpSFsN3W4kCGXKgY/edit?pli=1
|
||||||
* Overview: http://bitsquare.io/images/overview.png
|
* Overview: http://bitsquare.io/images/overview.png
|
||||||
* Discussion: https://bitcointalk.org/index.php?topic=462236
|
* Discussion: https://bitcointalk.org/index.php?topic=647457
|
||||||
|
* Video of POC prototype: https://www.youtube.com/watch?v=ByfnzJzi0bo
|
||||||
|
|
13
TODO.txt
13
TODO.txt
|
@ -1,13 +0,0 @@
|
||||||
- arbitration integration
|
|
||||||
- settings
|
|
||||||
|
|
||||||
low prio:
|
|
||||||
- start with orderbook and open registration when user interacts with orderbook (take offer, create offer)
|
|
||||||
- settings screen
|
|
||||||
- return to setup when unregistered, change/add bank accounts from settings
|
|
||||||
- refactor trade process
|
|
||||||
- formatting
|
|
||||||
- validation
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ public class Fees
|
||||||
{
|
{
|
||||||
// min dust value lead to exception at for non standard to address pay scripts, so we use a value >= 7860 instead
|
// min dust value lead to exception at for non standard to address pay scripts, so we use a value >= 7860 instead
|
||||||
public static BigInteger TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
|
public static BigInteger TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
|
||||||
public static BigInteger ACCOUNT_REGISTRATION_FEE = Utils.toNanoCoins("0.0002");
|
public static BigInteger ACCOUNT_REGISTRATION_FEE = Utils.toNanoCoins("0.01");
|
||||||
public static BigInteger OFFER_CREATION_FEE = Utils.toNanoCoins("0.0002");
|
public static BigInteger OFFER_CREATION_FEE = Utils.toNanoCoins("0.001");
|
||||||
public static BigInteger OFFER_TAKER_FEE = OFFER_CREATION_FEE;
|
public static BigInteger OFFER_TAKER_FEE = OFFER_CREATION_FEE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -508,7 +508,7 @@ public class WalletFacade
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4 step deposit tx: Offerer send deposit tx to taker
|
// 4 step deposit tx: Offerer send deposit tx to taker
|
||||||
public void takerCommitDepositTx(String depositTxAsHex)
|
public String takerCommitDepositTx(String depositTxAsHex)
|
||||||
{
|
{
|
||||||
log.trace("takerCommitDepositTx");
|
log.trace("takerCommitDepositTx");
|
||||||
log.trace("inputs: ");
|
log.trace("inputs: ");
|
||||||
|
@ -528,6 +528,8 @@ public class WalletFacade
|
||||||
throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify()
|
throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return depositTx.getHashAsString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. step payout tx: Offerer creates payout tx and signs it
|
// 5. step payout tx: Offerer creates payout tx and signs it
|
||||||
|
|
|
@ -94,10 +94,10 @@ public class CreateOfferController implements Initializable, ChildController
|
||||||
|
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
amountTextField.setText("0,001");
|
/* amountTextField.setText(""+(int)(new Random().nextDouble()*100/10+1));
|
||||||
minAmountTextField.setText("0,001");
|
priceTextField.setText(""+ (int)(499 - new Random().nextDouble()*1000/100)); */
|
||||||
priceTextField.setText("300");
|
minAmountTextField.setText("0,1");
|
||||||
collateralTextField.setText("50");
|
collateralTextField.setText("10");
|
||||||
updateVolume();
|
updateVolume();
|
||||||
|
|
||||||
amountTextField.textProperty().addListener(new ChangeListener<String>()
|
amountTextField.textProperty().addListener(new ChangeListener<String>()
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class TakerTradeController implements Initializable, ChildController
|
||||||
totalLabel = FormBuilder.addTextField(gridPane, "Total (" + offer.getCurrency() + "):", Formatter.formatVolume(getVolume()), ++row);
|
totalLabel = FormBuilder.addTextField(gridPane, "Total (" + offer.getCurrency() + "):", Formatter.formatVolume(getVolume()), ++row);
|
||||||
collateralTextField = FormBuilder.addTextField(gridPane, "Collateral (BTC):", "", ++row);
|
collateralTextField = FormBuilder.addTextField(gridPane, "Collateral (BTC):", "", ++row);
|
||||||
applyCollateral();
|
applyCollateral();
|
||||||
FormBuilder.addTextField(gridPane, "Offer fee (BTC):", Utils.bitcoinValueToFriendlyString(Fees.OFFER_TAKER_FEE.add(Transaction.MIN_NONDUST_OUTPUT).add(Fees.TX_FEE)), ++row);
|
FormBuilder.addTextField(gridPane, "Offer fee (BTC):", Utils.bitcoinValueToFriendlyString(Fees.OFFER_TAKER_FEE.add(Fees.TX_FEE)), ++row);
|
||||||
totalToPayLabel = FormBuilder.addTextField(gridPane, "Total to pay (BTC):", getTotalToPay(), ++row);
|
totalToPayLabel = FormBuilder.addTextField(gridPane, "Total to pay (BTC):", getTotalToPay(), ++row);
|
||||||
|
|
||||||
isOnlineTextField = FormBuilder.addTextField(gridPane, "Online status:", "Checking offerers online status...", ++row);
|
isOnlineTextField = FormBuilder.addTextField(gridPane, "Online status:", "Checking offerers online status...", ++row);
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class MessageFacade
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
createMyPeerInstance(keyName, port);
|
createMyPeerInstance(keyName, port);
|
||||||
//setupStorage();
|
setupStorage();
|
||||||
//TODO save periodically or get informed if network address changes
|
//TODO save periodically or get informed if network address changes
|
||||||
saveMyAddressToDHT();
|
saveMyAddressToDHT();
|
||||||
setupReplyHandler();
|
setupReplyHandler();
|
||||||
|
@ -160,10 +160,11 @@ public class MessageFacade
|
||||||
public void addOffer(Offer offer) throws IOException
|
public void addOffer(Offer offer) throws IOException
|
||||||
{
|
{
|
||||||
Number160 locationKey = Number160.createHash(offer.getCurrency().getCurrencyCode());
|
Number160 locationKey = Number160.createHash(offer.getCurrency().getCurrencyCode());
|
||||||
Number160 contentKey = Number160.createHash(offer.getUid());
|
final Number160 contentKey = Number160.createHash(offer.getUid());
|
||||||
final Data offerData = new Data(offer);
|
final Data offerData = new Data(offer);
|
||||||
//offerData.setTTLSeconds(5);
|
//offerData.setTTLSeconds(5);
|
||||||
final FutureDHT addFuture = myPeer.put(locationKey).setData(contentKey, offerData).start();
|
final FutureDHT addFuture = myPeer.put(locationKey).setData(contentKey, offerData).start();
|
||||||
|
//final FutureDHT addFuture = myPeer.add(locationKey).setData(offerData).start();
|
||||||
addFuture.addListener(new BaseFutureAdapter<BaseFuture>()
|
addFuture.addListener(new BaseFutureAdapter<BaseFuture>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -197,6 +197,7 @@ public class OrderBook implements OrderBookListener
|
||||||
if (success && dataMap != null)
|
if (success && dataMap != null)
|
||||||
{
|
{
|
||||||
allOffers.clear();
|
allOffers.clear();
|
||||||
|
|
||||||
for (Data offerData : dataMap.values())
|
for (Data offerData : dataMap.values())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -471,9 +471,9 @@ public class TakerPaymentProtocol
|
||||||
{
|
{
|
||||||
log.debug("3.6 DepositTxID received: " + tradeMessage.getDepositTxAsHex());
|
log.debug("3.6 DepositTxID received: " + tradeMessage.getDepositTxAsHex());
|
||||||
|
|
||||||
walletFacade.takerCommitDepositTx(tradeMessage.getDepositTxAsHex());
|
String txID = walletFacade.takerCommitDepositTx(tradeMessage.getDepositTxAsHex());
|
||||||
takerPaymentProtocolListener.onProgress(getProgress());
|
takerPaymentProtocolListener.onProgress(getProgress());
|
||||||
takerPaymentProtocolListener.onDepositTxPublished(tradeMessage.getDepositTxAsHex());
|
takerPaymentProtocolListener.onDepositTxPublished(txID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue