IndigoProtocol/dexter

VyFi DEX always uses API

Sluder opened this issue ยท 15 comments

Sluder commented

No matter what data provider you use, VyFi will always use their API for liquidity pools. This is due to their pools not easily identifiable on-chain. So using Blockfrost or Kupo won't have an effect.

@Sluder - Let's meet about this. I might be able to help you resolve this :)

This VYFI issue, means that when using the dexter.newFetchRequest().forAllDexs(); function all pools returned from other dexs are filtered to the asset you are working on except VYFI, would be great if this could somehow be filtered as I think this could cause confusion / incorrect swap transactions across pools that are out of context to the swap request being created.

hi @dpbeaumont , can you create swap request on VyFI, I got this following error when submitting swap request on it:

reason: 'Failed to build transaction.',
  reasonRaw: Error: No address type matched for: 
      at getAddressDetails 

Works fine on Minswap and WingRider

hi @dpbeaumont , can you create swap request on VyFI, I got this following error when submitting swap request on it:

reason: 'Failed to build transaction.',
  reasonRaw: Error: No address type matched for: 
      at getAddressDetails 

Works fine on Minswap and WingRider

Hey! I haven't tried on VY, I tend to get 0 pools returned, I think its still a WIP, as I can see the getLiquidityPoolState method is not fully implemented yet.

hi @dpbeaumont , can you create swap request on VyFI, I got this following error when submitting swap request on it:

reason: 'Failed to build transaction.',
  reasonRaw: Error: No address type matched for: 
      at getAddressDetails 

Works fine on Minswap and WingRider

Hi @Sluder Does swap request work well on VyFi?

Sluder commented

@ndtr2000 Yes it does. Looking at that error thrown in lucid, it looks like an address isn't set in the pool you provided. Do you happen to be doing any sort of object copying or manipulation on the pool instances? I double checked the VyFi API & nothing has changed, and I am still getting back everything correctly.

@Sluder when I use the code with WingRider, it works fine, then I just changed the WingRider.name to VyFi.name but that error happened. Can I see your piece of code where you create swap request in VyFi?

@Sluder I saw that VyFi need the marketOrderAddress to create swap request, how can I find that address?

Sluder commented

@ndtr2000 That information is available through their API, do you have shouldFallbackToApi enabled?
We are trying figure out their on-chain datas so VyFi pools can be pulled from Blockfrost/Kupo, but the pool addresses are not easily identifiable.

I think now the VYFI public API has been locked down by authentication only. I have also approached VYFI on this in hope it can be integrated and identifiable onchain, as currently every other DEX works very well.

Would love to see VyFi provide more details on how to indentify their pools onchain

Sluder commented

@dpbeaumont What makes you think their API was locked down? I have been using the API this week & everything seems to work fine, and I'm not seeing anything in the requests on their site ๐Ÿค”

@dpbeaumont What makes you think their API was locked down? I have been using the API this week & everything seems to work fine, and I'm not seeing anything in the requests on their site ๐Ÿค”

Over the weekend I was getting 'missing authentication'
image

I seem to get results now though!

I wonder if fetching state using API is faster or using Blockfrost is faster?

Sluder commented

I wonder if fetching state using API is faster or using Blockfrost is faster?

Using the API is more than likely quicker because Dexter has to parse all of the on-chain data from Blockfrost, but really depends on each API. But, you take on the risk the DEX doesn't do anything funky with their API, or you hit API limits. Minswap for example has harder limits than Blockfrost