mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-08-08 02:50:03 +00:00
add comments
This commit is contained in:
12
docs/TapTrade_obs/.obsidian/workspace.json
vendored
12
docs/TapTrade_obs/.obsidian/workspace.json
vendored
@ -15,9 +15,9 @@
|
||||
"state": {
|
||||
"file": "Research/Trade Pipelines/new concepts/concept pipeline 1.canvas",
|
||||
"viewState": {
|
||||
"x": 127.5,
|
||||
"y": 870.3121012187327,
|
||||
"zoom": -0.787814735661959
|
||||
"x": -50.073215095096614,
|
||||
"y": 431.1066731460583,
|
||||
"zoom": -0.5377950532849703
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,7 @@
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
"width": 200
|
||||
},
|
||||
"right": {
|
||||
"id": "218b4a302bff5924",
|
||||
@ -151,10 +151,10 @@
|
||||
},
|
||||
"active": "bdb9fd88a01a8909",
|
||||
"lastOpenFiles": [
|
||||
"Research/Trade Pipelines/current trade flow.canvas",
|
||||
"Research/Trade Pipelines/new concepts/concept locking script 1.canvas",
|
||||
"Research/Bitcoin fundamentals/Knowledge sources.md",
|
||||
"Research/Trade Pipelines/new concepts/concept pipeline 1.canvas",
|
||||
"Research/Trade Pipelines/current trade flow.canvas",
|
||||
"Research/Bitcoin fundamentals/Knowledge sources.md",
|
||||
"Research/Implementation/Libraries.md",
|
||||
"Research/Bitcoin fundamentals/Taproot output structure.canvas",
|
||||
"Research/Bitcoin fundamentals/Spending Taproot UTXOs.md",
|
||||
|
@ -3,7 +3,6 @@
|
||||
{"id":"5b8863761f608702","type":"text","text":"Just going to write some stuff down here while thinking about it. **Don't expect it to make sense yet!**","x":-415,"y":-360,"width":460,"height":80,"color":"1"},
|
||||
{"id":"8b7862709255b800","type":"text","text":"\n***MSTB*** (Maker seller taker buyer)","x":-345,"y":-440,"width":320,"height":60,"color":"3"},
|
||||
{"id":"428c2dc0767db819","type":"text","text":"semi trusted - coordinator could steal/burn bond - but low risk as bonds are small and reputation would be damaged. Also no control on full trade amount.","x":-402,"y":-260,"width":434,"height":118,"color":"5"},
|
||||
{"id":"93c73227c82f1a81","type":"text","text":"**Coordinator**\n\nwatches Mempool and Chain, could publish the bond TX. Essentially just to prevent orderbook spam / for skin in the game.\n\n*SIGHASH_ALL | ANYONECANPAY* could make it possible for the coordinator to add inputs up to the height of the bond to push the TX fees without losing capital itself. \nAlso out of band mining would cause a cost for the Maker so there is always a price to being unreliable. \n\nThe Maker could be required to use Inputs at least the value of the trade amount to proof that he owns enough sats to fulfill the trade. Maybe lock the time to invalidate the bond after a certain amount of time.","x":80,"y":-118,"width":500,"height":418},
|
||||
{"id":"dba9c662192cf5bb","type":"text","text":"**Maker**","x":-600,"y":47,"width":125,"height":58},
|
||||
{"id":"4a633210842ee3c0","type":"text","text":"Taker","x":-665,"y":410,"width":250,"height":60},
|
||||
{"id":"f461d9afa4298d14","type":"text","text":"Coordinator","x":135,"y":410,"width":250,"height":60},
|
||||
@ -14,7 +13,6 @@
|
||||
{"id":"de1642ddfdfed1df","type":"text","text":"Coordinator \npublishes contract TX and waits for confirmation","x":80,"y":1180,"width":250,"height":120,"color":"2"},
|
||||
{"id":"910e5a3ee7688d0b","type":"text","text":"Escrow and Bond locked in contract.\n**Chat can begin**","x":-300,"y":1380,"width":250,"height":120,"color":"6"},
|
||||
{"id":"880c77a2d23f2cec","type":"text","text":"+signed TX\n\n-> Bond to coordinator\n -> change to self\n -> SIGHASH_ALL | ANYONECANPAY\n\n+MuSig2 public nonce\n+taproot public key (for agg. internal key)","x":-390,"y":-39,"width":390,"height":230},
|
||||
{"id":"483fbdbcc5ea8501","type":"text","text":"I think there could be an advanced mode / external wallet mode where this could be done directly from an external Wallet e.g. Hardware wallet with Sparrow. But it would require lot of copy pasting (signed txs, psbts, addresses). Also there is secret state needed to be saved for MuSig2, this could be downloaded as file or stored encrypted on the coordinator. \n\nFor easy use there would need to be a wallet in RoboSats (BDK) but UI wise this would be either a challenge or a privacy reduction (if you use the same wallet but different Robot). It's also possible to limit the Wallet to one robot so the user must withdraw the sats after the trade (can't import wallet into robosats, only export). I think wallet could also be stored encrypted on coordinator or exported as file/seed.","x":80,"y":-480,"width":660,"height":338},
|
||||
{"id":"51e650a981068490","type":"text","text":"see contract definition","x":420,"y":1120,"width":400,"height":60,"color":"2"},
|
||||
{"id":"e3b8669b30d1c80e","type":"text","text":"+ signed psbt\n+ additional signed punishment TX in case the taker tries to spend the input somewhere else before the maker signs, the coordinator can claim or burn the bond (same like the maker bond). In case of out of band mining the maker would not lose money and the taker has a cost associated to doing this act","x":-610,"y":800,"width":815,"height":140},
|
||||
{"id":"90704c232582cd52","type":"text","text":"Coordinator","x":80,"y":950,"width":250,"height":60},
|
||||
@ -22,7 +20,13 @@
|
||||
{"id":"2f645456949ecdb8","type":"text","text":"Addendum: We could just publish a child transaction instead of adding an input to increase the fee.","x":580,"y":186,"width":340,"height":114},
|
||||
{"id":"9a5c83be6a5d2b73","type":"text","text":"[Making Transaction invalid after certain blockheight - Stackexchange](https://bitcoin.stackexchange.com/questions/123021/make-signed-transaction-invalid-after-specified-time/123029#123029)","x":580,"y":91,"width":340,"height":100},
|
||||
{"id":"b500fab6ba26abf1","type":"text","text":"Maker","x":-710,"y":1210,"width":250,"height":60},
|
||||
{"id":"9b054e655a321517","type":"text","text":"PSBT of contract\nMaker adds escrow input sig\n\nMaker only gets PSBT without the Sig of the Taker, so he can't maliciously hold the tx and publish it at a later point in time.","x":-345,"y":980,"width":295,"height":210}
|
||||
{"id":"9b054e655a321517","type":"text","text":"PSBT of contract\nMaker adds escrow input sig\n\nMaker only gets PSBT without the Sig of the Taker, so he can't maliciously hold the tx and publish it at a later point in time.","x":-345,"y":980,"width":295,"height":210},
|
||||
{"id":"345fbda43e40d028","x":580,"y":31,"width":250,"height":60,"color":"2","type":"text","text":"Research/use PTLC"},
|
||||
{"id":"7916e1f2236a38b6","x":5,"y":580,"width":380,"height":60,"color":"4","type":"text","text":"Look into DLC negotiation procedure"},
|
||||
{"id":"5e3c3c0695787e9a","x":-720,"y":-69,"width":305,"height":60,"color":"3","type":"text","text":"User (Tor)Browser (Wasm)"},
|
||||
{"id":"483fbdbcc5ea8501","type":"text","text":"I think there could be an advanced mode / external wallet mode where this could be done directly from an external Wallet e.g. Hardware wallet with Sparrow. But it would require lot of copy pasting (signed txs, psbts, addresses). Also there is secret state needed to be saved for MuSig2, this could be downloaded as file or stored encrypted on the coordinator. \n\nFor easy use there would need to be a wallet in RoboSats (BDK) but UI wise this would be either a challenge or a privacy reduction (if you use the same wallet but different Robot). It's also possible to limit the Wallet to one robot so the user must withdraw the sats after the trade (can't import wallet into robosats, only export). I think wallet could also be stored encrypted on coordinator or exported as file/seed.","x":55,"y":-549,"width":660,"height":338},
|
||||
{"id":"f3b7288289dc8954","x":195,"y":-172,"width":250,"height":60,"color":"3","type":"text","text":"Backend"},
|
||||
{"id":"93c73227c82f1a81","type":"text","text":"**Coordinator**\n\nwatches Mempool and Chain, could publish the bond TX. Essentially just to prevent orderbook spam / for skin in the game.\n\n*SIGHASH_ALL | ANYONECANPAY* could make it possible for the coordinator to add inputs up to the height of the bond to push the TX fees without losing capital itself. \nAlso out of band mining would cause a cost for the Maker so there is always a price to being unreliable. \n\nThe Maker could be required to use Inputs at least the value of the trade amount to proof that he owns enough sats to fulfill the trade. Maybe lock the time to invalidate the bond after a certain amount of time.","x":80,"y":-98,"width":500,"height":418}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"77d1ff9130716b53","fromNode":"dba9c662192cf5bb","fromSide":"right","toNode":"93c73227c82f1a81","toSide":"left"},
|
||||
|
@ -8,4 +8,8 @@ fn index() -> &'static str {
|
||||
#[launch]
|
||||
pub fn webserver() -> Rocket<build> {
|
||||
rocket::build().mount("/", routes![index])
|
||||
}
|
||||
}
|
||||
|
||||
// serde to parse json
|
||||
// https://www.youtube.com/watch?v=md-ecvXBGzI BDK + Webserver video
|
||||
// https://github.com/tokio-rs/axum
|
Reference in New Issue
Block a user