-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A Mobile and Generic Asset Exchange using Liquidity Pooling [group 1] #5988
Comments
Sprint ToDo ideas.
|
Meeting notes 12-02-2021:
|
TODO for monday 15-02-2020, 09:00:
|
Useful short introduction to Bitcoin blockchain: https://www.youtube.com/watch?v=Lx9zgZCMqXE |
Compilation instructions:
|
To get a feeling for how liquidity pools work, you can play a bit around on the Uniswap website. |
Short detailed paper on Constant Market Maker model implementation: |
Possible solution: modified luxury communism to incorporate an additional wallet on a different blockchain (not BTC) |
Also:
|
Another idea:
|
Work done 17-02-2021:
Questions that came up during work meeting:
Code meeting planned for 18-02-2021 (9:30):
|
Work 18-02-2021:
|
Meeting notes 19-02-2021:
Focus of this sprint: enable universal support for different crypto wallets in the luxury communism app. Prepare the fundamental interfaces for your liquidity pool ideas and give a small code demo next week. |
Progress:
|
Meeting notes 25-02-2021:
Next sprint:
|
Idea for next sprint: get taproot (multi-)signatures operational in Kotlin code (also see #5984). To achieve this, you have to compile the Bitcoin reference implementation for Android. |
Progress update 02/03/2021:
|
Progress update 03/03/2021:
Demo: Note: the demo is run on a single client on BTC REGNET with artificial delays and free funds from a BTC faucet. Next step might be to explore using trustchain for communicating multi-sig wallet addresses, as well as provide/redeem transaction info. That way it can be more easily tested on multiple clients using TESTNET. As requested, we should also be working on getting currencii (Luxury Communism) to perform what is currently implemented, as to avoid code duplication. It was preferable for now to get a hang of programming a bare minimum implemtation of a multi-sig wallet, in order to better understand currencii's implementation. |
Next sprint:
Technical specifications can be found here. |
Taproot implementation idea:
|
Update on geth integration:On branch Instructions:
Work for next weekThe method |
Hey guys, I found a really useful guide for implementing Geth on Android with deploying smart contracts: https://freesoft.dev/program/108526336 It shows how to:
Will try getting this to work, but it looks very promising. |
Meeting notes 06-04-2021:
Deliverables for next week Friday:
|
Progress update yesterday and today (07/04/2021):This is a joint write-up of Daan and @thversfelt Work done:
What problem we have run into now:Locally, transactions and contract deployments are successful. However, they don't seem to be broadcasted to the Etherereum (Rinkeby) network. We have about 4 connected peers at any given time. Locally, we have an instance of our contract, and the geth node also confirms that the contract has been deployed (including hashes). However, because there is no bound contract (to the contract's address), we can't interact with the (multisignature) contract. What we tried:
Possible causes:
Likely no causes (because we debugged):
What may be worth trying:
Perhaps @devos50 would like to look into this problem. Any help would be greatly appreciated. Please see this commit |
@daandeheij That's very unexpected. Are you sure that the light node has fully catched up with the network (also see this SO post)? Also, are you sure that broadcasting is part of the
Is the Windows light node not broadcasting the contract or are you not seeing it on the Android side? As a last resort, please try to run a full node and see if you can issue your transaction successfully. This should be a small configuration change right? |
Also, you might want to join the Ethereum discord/IRC channel and ask their help 👍 |
I just came across an interesting post on stackexchange. The user states that he used to be able to broadcast transactions successfully using a light node previously, but that lately his transactions aren't broadcasted anymore. I will follow that post closely. Hopefully there will be some answers to it. In the meantime, I will first run a full node on my laptop to see whether it works there. That would confirm that our code is working, and would rule out a bug there. Edit: Right now I'm running a Geth node on Windows with |
08-04-2021
Current problem
|
Just now spend some more hours on seeing what's going wrong with Geth. Right now I made a ethereumClient connected to infura. But even then, I cannot manage to send a transaction. I really don't understand what's up. I checked the nonce, checked every parameter, debugged it for hours. |
Nice progress! Has the smart contract been deployed already? |
Hmm ok. Then the transaction seems to have been dropped from the mempool. Your gas price seems rather low though, is this competitive with transactions that actually make it into the blockchain?
I'm not sure if these peers are actively propagating your transactions but at least the Etherscan nodes have received your transaction so I would assume so. |
The gas price for rinkeby is 1 GWEI, take a look at this recently confirmed transaction (by someone else): https://rinkeby.etherscan.io/tx/0x25c8015c6165021d5fadda4c8011c7a91f1e26dc7ba681dceb184a9ae690380e Our gas limit is 1,000,000 so that should be plenty to cover mining. So I don't think it is a mining/gas issue. |
Meeting notes 12-04-2021:
Final E2E demo: BTC-ETH cross-chain liquidity pool. Please upload the APK a day before the final demo! |
I couldn't let go of geth, so I tried a couple more things. Ended up switching between a couple of testnets and finally settled on Goerli. Submitted a contract creation, which at first seemed like the same thing was happening as when we were on Rinkeby. Well... after taking a 15 min break, contemplating life choices, I returned to my computer to see the contract still pending.. then after a couple more minutes it was confirmed!! https://goerli.etherscan.io/tx/0x69cbe46ca555eeaed1842240c85cb2fbaa0579324037d5fd2479957e88c0b60d In other words, we managed to successfully deploy a smart contract on the Goerli ethereum testnet using a Geth light node 😍 Smooth sailing from now on, right? haha.. |
Nice progress! I noticed that this is on another testnet network, could that be a reason why transactions were failing? |
Yes indeed. As a last resort, we tried to use a different testnet. The code we used for this deployment on Goerli is the same as the one for Rinkeby (besides the chain ids of course). So it seems to have been a problem with the combination of Geth and Rinkeby. |
Update (16-04-2021)
|
See https://goerli.etherscan.io/tx/0x987b0312efe42473c2b86c0e524160eeac4aba52929af66c6a619b49b7e5dbd1 for an example of a interaction with the multi-signature Ethereum wallet |
|
|
Tribler/trustchain-superapp#75 PR is merged, closing the issue |
This ticket contains the notes for the liquidity pooling project (#5944)
A Mobile and Generic Asset Exchange using Liquidity Pooling
Ever since the introduction of Bitcoin, there has been a proliferation of blockchain-based currencies and applications. Nowadays, the majority of blockchain-based applications orient around decentralized finance (DeFi), an experimental form of finance that enables value transfer and exchange directly between participants, without intermediaries. The number of different DeFi application is quickly growing. Many of these DeFi applications are deployed using smart contract logic, e.g., on Ethereum.
Currently, decentralized exchanges (DEXes) make up a significant part of the DeFi landscape. DEXes enable the trade between different pairs of digital assets, without risks. Some DEXes facilitate trade by having traders create buy and sell orders and automatically execute orders when a trading opportunity arises. Newer DEXes like Uniswap use a different approach to trade assets. In this approach, there is a pool for every pair of assets, and users can deposit assets in these pools. Such users are called Liquidity Providers and are rewarded with special 'share' tokens. Traders can then exchange asset A for B by depositing asset A in the pool, in exchange for asset B.
Existing DEXes using liquidity pooling only allow the trade of assets that are locked to the ecosystem in which the DEX operates. For example, Uniswap can only exchange Ethereum-based assets, significantly limiting the applicability of this approach. Recently, we have introduced an approach to enable generic asset trading using traditional order books (we will share the paper with you at the start of the project). This approach enables the trade of any asset, managed by any ecosystem. Risks are manageable by splitting up a trade into a series of smaller, intermediate payments.
The goal of this project is to engineer a basic and generic DEX, based on Liquidity Pooling. All operations and asset transfers will be recorded on TrustChain, our lightweight distributed ledger. This approach makes it possible to detect fraudulent behavior, specifically stealing assets. You will integrate this application in our Superapp, which already has several decentralized applications integrated and deployed (e.g., for social networking, music streaming, and federated machine learning). Your final demo will show a simple asset exchange between two real cryptocurrencies, e.g., Bitcoin and Ethereum tokens. For simplicity, you may assume that the liquidity pool will be managed by a trusted identity in the network.
References:
(image source: https://uniswap.org/docs/v2/protocol-overview/how-uniswap-works/)
The text was updated successfully, but these errors were encountered: