Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: samdan777712 on July 03, 2019, 10:16:55 PM



Title: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: samdan777712 on July 03, 2019, 10:16:55 PM
I am trying to gain some insight into what people are working on and envisioning for a lot of the coming layer 2 solutions in regard to a broader decentralized ecosystem, notably for DEX and smart contracts.

-How can layer 2 aid and help the concept of something like Ren VM where you have decentralized computing and smart contracts privately interacting with liquidity pools?

-How is layer 2 going to strengthen the feasibility of proliferating full nodes on raspberry pi and phones, and will it help DEX?

I feel like a really big issue like a front and center issue is the reliance of exchanges on a central server for orderbook matching and offchain settlement, margin, colateralization, the data involved. Non custodial wallets aren't enough. The central servers are a vector point for centralization, counter party risk, over reliance upon high capital institutions.

Arguably bitcoin needs something much more decentralized, that could be achieved with layer two solutions that either integrate with or emulate things like namecoin, ethereum smart contracts, and the new Ren VM tools. The biggest issue is of course speed and scalability.

The server function and data of these exchanges should be held inside smart contracts because its more secure, it seems like a virtual machine approach is in fact a better way to go about the challenges of linking liqudity pools and orderbooks.

There's also a project from back in the day called Gridcoin. IT was or is used to link up computer pprocessing power for science applications and scientific engine rendering solutions for modeling things. Richard heart is making a project similar for science applications.

I believe this is a much more secure way to approach DAPP's and layer 2 protocols, to get virtual machines that are not located on central servers to help process a lot of the advanced needs of the network, to slowly make the entire exchange and reliance of these failurepoints of bitcoin to be a part of the bitcoin protocol itself, to remove the ecoystem itself away from the clear net and central servers, and to begin to upload it into satellites and proliferated phone nodes.


Title: Re: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: PrimeNumber7 on July 06, 2019, 08:53:12 PM
-How is layer 2 going to strengthen the feasibility of proliferating full nodes on raspberry pi and phones, and will it help DEX?

I feel like a really big issue like a front and center issue is the reliance of exchanges on a central server for orderbook matching and offchain settlement, margin, colateralization, the data involved. Non custodial wallets aren't enough. The central servers are a vector point for centralization, counter party risk, over reliance upon high capital institutions.

Most DEXs, at least the ones I have seen/used actually rely on smart contracts that handle order settlement and locking/unlocking of tokens prior to their expiration. When a user "deposits" tokens into a DEX, they are actually "locking" the tokens, preventing the tokens from being moved unless certain conditions are met. When a user places an order on a DEX, they are signing a message that agrees to exchange x amount of y tokens for z tokens at a specific exchange rate, and if the DEX matches the order, someone on the other side of the trade will have to have signed a message confirming the opposite trade, and the tokens are moved between addresses. If the order has not been fully executed, you can cancel the order with another signed message, and the DEX will need to also sign a message allowing the order to be cancelled. The tokens are "locked" for a specific period of time that you choose when initially locking your tokens; if you want to unlock your tokens early, you can sign a transaction that must be approved by the DEX, and if the lock is expired, you can unlock the tokens by signing a transaction that does not require the approval of the DEX.

The only counter party risk to trading on a DEX is that the DEX will not allow you to cancel an order, and will not allow your tokens to be unlocked prior to the lock expiring.

Most exchanges are targets of hackers because they hold substantial amounts of customer money, however this does not apply to DEXs, so many DEXs are unlikely to be attacked the same ways that exchanges are the subject of attacks.


A layer 2 solution, such as LN could be used to reduce the cost of using DEXs, and increase the speed at which trades are confirmed. DEXs today have to settle every trade on-chain, which can very quickly get expensive. If LN was used with a DEX, trades could be settle with different LN channel states.


Title: Re: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: Zicadis on July 08, 2019, 08:35:38 PM
I don't think you should be concerened about DEXes because they will not be relevant in a few year's time. However, I have been wrong before and I would love to see a forex market or stocks market implement a DEX approach. Until something like that happens, with each regulatory approval for mainstream crypto products like ETFs, futures and derivatives, DEX is going to be more and more irrelevant.


Title: Re: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: LeGaulois on July 08, 2019, 09:50:41 PM
I don't think you should be concerened about DEXes because they will not be relevant in a few year's time. However, I have been wrong before and I would love to see a forex market or stocks market implement a DEX approach. Until something like that happens, with each regulatory approval for mainstream crypto products like ETFs, futures and derivatives, DEX is going to be more and more irrelevant.

I don't get why do you think DEXs will become irrelevant. I would say the opposite instead, and perhaps for the same reasons you used. Products like ETF, futures aren't going to change anything and are almost unknown for the average Joe. Can you trade your Bitcoin ETF with Dogecoin? Alright. You see, not the same audience to do not the same things.


Title: Re: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: DooMAD on July 08, 2019, 10:02:39 PM
I don't think you should be concerened about DEXes because they will not be relevant in a few year's time. However, I have been wrong before and I would love to see a forex market or stocks market implement a DEX approach. Until something like that happens, with each regulatory approval for mainstream crypto products like ETFs, futures and derivatives, DEX is going to be more and more irrelevant.

Unless you're a hedge fund manager, or something similar, you won't receive any benefit from ETFs.  There's been far too much hype for ETFs when the vast majority of people will never even touch them.  Calling it "mainstream" is somewhat of a misnomer if you only mean the financial elites will be using it. 


Title: Re: Hypothetical layer 2 solutions for DEX's and phone nodes
Post by: PrimeNumber7 on July 09, 2019, 06:05:33 AM
I don't think you should be concerened about DEXes because they will not be relevant in a few year's time. However, I have been wrong before and I would love to see a forex market or stocks market implement a DEX approach. Until something like that happens, with each regulatory approval for mainstream crypto products like ETFs, futures and derivatives, DEX is going to be more and more irrelevant.
If anything DEXs will become more common over time.

The security costs of running exchanges are very high, and does not scale because exchanges become larger targets as they hold greater amounts of customer money. Running a DEX allows for security costs to be nearly zero.

There are also multiple altcoins whose purpose is to serve as a Level 1 layer to settle transactions for tokens that can be used as securities/stocks.