asgardex / asgard-exchange

https://app.asgard.exchange
30 stars 8 forks source link

Pooling doesn't work? #70

Closed nugzta closed 3 years ago

nugzta commented 3 years ago

I tried to test the pooling on the testnet. I swapped 500 tRUNE into 0.01900707 tBTC. Then I added liquidity, it took my tRUNE but not tBTC. Now, I end up with only 0.98 tRUNE and still 0.01900707 tBTC in my wallets.

These are my wallets:

https://testnet-explorer.binance.org/address/tbnb1pvsjrdef7zvher0clg95am5k2q5acnydz8teah

https://blockstream.info/testnet/address/tb1qss5zvwp0w7k4nq9tten3mrqpny2unf6gdgqa27

In the transactions, it clearly shows tRUNE was taken but not tBTC.

stuartwk commented 3 years ago

Hey @nugzta, did the tBTC transaction eventually go through?

One of the issues we're hitting with the UI is that BNB processes very quickly, but it takes a little more time for THORChain to process, and then more time for BTC. The user may think the transaction is done because they see BNB has gone through, but the THORChain / BTC txs are still pending. This is a UI problem, we're working on a better flow for it.

nugzta commented 3 years ago

Hey @nugzta, did the tBTC transaction eventually go through?

One of the issues we're hitting with the UI is that BNB processes very quickly, but it takes a little more time for THORChain to process, and then more time for BTC. The user may think the transaction is done because they see BNB has gone through, but the THORChain / BTC txs are still pending. This is a UI problem, we're working on a better flow for it.

Yes, tBTC transaction went through. Right now, I have 0.98 tRUNE and still 0.01900707 tBTC in my wallets since the pooling failed. So probably just as you said, when I added the liquidity, it took my tRUNE but my tBTC was still transferring to my wallet, so now I lost my tRUNE.

I tried to add liquidity again: https://tinyurl.com/y6xvslao

tRUNE is gone, insufficient balance to provide liquidity.

Edit: I just reread your post. I misread, I thought you were asking about the pooling, not the tBTC transaction.

nugzta commented 3 years ago

Just to be clear, the swap was fine. I started with 1000 tRUNE, I swapped about 500 tRUNE and received 0.01900707 tBTC. After that, the pooling failed. It took tRUNE and now I'm only left with 0.01900707 tBTC.

gchatrian commented 3 years ago

Hi,

I tried Asgard yesterday and I had the same issues:

I don't know where the assets went. No transaction recorded, non liquidity pool provided.

stuartwk commented 3 years ago

@nugzta just to clarify, your balance was 500 tRUNE and 0.01900707 tBTC. You're saying you tried and pool 100% of that balance? And it pooled only the 500 tRUNE but didn't take any of the BTC?

stuartwk commented 3 years ago

@gchatrian just tested pooling BTC + RUNE and it processed. There are some UI changes that need to be made to poll the pool list and refresh automatically on changes. If you check again now, are your funds listed?

nugzta commented 3 years ago

@nugzta just to clarify, your balance was 500 tRUNE and 0.01900707 tBTC. You're saying you tried and pool 100% of that balance? And it pooled only the 500 tRUNE but didn't take any of the BTC?

Yup, I had 500 tRUNE and 0.01900707 tBTC. I wanted to pool all of them. It took 500 tRUNE while probably tBTC was still in the process of swapping/transferring between wallets. Now I only have 0.01900707 tBTC. Nothing is pooled -> No deposited pools found.

https://tinyurl.com/y3apkmgo

gchatrian commented 3 years ago

@gchatrian just tested pooling BTC + RUNE and it processed. There are some UI changes that need to be made to poll the pool list and refresh automatically on changes. If you check again now, are your funds listed?

HI there,

I still see "no deposited pools found". It was 1000 RUNE + 0.041 BTC. Wallet is asgardex-tbnb15p_u86

stuartwk commented 3 years ago

@gchatrian what is the BNB address associated with your keystore?

gchatrian commented 3 years ago

HI,

BTC: tb1qnk9pagmftake9eq4w4rgm3typnlwf8zfusqcsj BNB: tbnb15p9nxwudh8dg8034e6ftg682u0zafhg2229u86

Thanks, Giulio

stuartwk commented 3 years ago

@nugzta @gchatrian thanks for reporting this. it looks like an uncaught error we need to fix. in both cases, the RUNE transactions were successful, but the Bitcoin transaction failed. so the deposit is technically still pending on THORChain, waiting for bitcoin.

would you mind trying another deposit? if it fails again, it'll be helpful cause we'll know something is up with the bitcoin client for you both. if it succeeds, my guess is that your initial RUNE deposit + the new deposit will both show up, and you'll be able to withdraw everything.

gchatrian commented 3 years ago

Hi,

I just swapped 500 RUNE for 0.0XX (sry i did not write down the exact amt) BTC. Everything went ok. When added 408 RUNE + 0.0x BTC to the liquidity pool i got a message the TX was ok BUT https://blockstream.info/testnet/tx/c6f95d10ee5e3d86fd7fecf548afec4ba5edba03a79959a403096395c3170a19 says it could not find the transaction and no liquidity is showing "no deposited pools found". Now I am out of funds

stuartwk commented 3 years ago

@gchatrian it looks like THORChain is recognizing the stake. It takes some time for bitcoin transactions to process. On blockstream now, that transaction is recognized as well.

nugzta commented 3 years ago

@nugzta @gchatrian thanks for reporting this. it looks like an uncaught error we need to fix. in both cases, the RUNE transactions were successful, but the Bitcoin transaction failed. so the deposit is technically still pending on THORChain, waiting for bitcoin.

would you mind trying another deposit? if it fails again, it'll be helpful cause we'll know something is up with the bitcoin client for you both. if it succeeds, my guess is that your initial RUNE deposit + the new deposit will both show up, and you'll be able to withdraw everything.

How do I try another deposit if I don't have any tRUNE?

Is there any way to cancel or refund tRUNE that is already sent?

stuartwk commented 3 years ago

@nugzta created an issue with the midgard API to display a user pool if, for whatever reason, only one half is deposited. that way the UI can recognize the user pool and you can interact with it.

https://gitlab.com/thorchain/midgard/-/issues/319

gchatrian commented 3 years ago

Hi,

I can now see the liquidity I added. It just took a lot of time

stuartwk commented 3 years ago

Closing this, as it's a bit outdated and there have been a ton of updates including changing our BTC API provider from Blockchair to Sochain + BlockStream, plus how we track pending transactions. If it occurs again, feel free to reopen or submit a new issue.