Code Monkey home page Code Monkey logo

hop's People

Contributors

alter-eggo avatar cwhinfrey avatar gollyticker avatar gsgalloway avatar jackmpcollins avatar kangarang avatar lukerhoads avatar max-andrew avatar miguelmota avatar nicosampler avatar quazia avatar ramuta avatar robriks avatar sambacha avatar shanefontaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hop's Issues

Inconsistent alignment on recent transactions

The alignment of the text on the "Recent Transactions" modal is inconsistent when different networks (with different name length) are used. I believe this should be left-aligned?

Screen Shot 2021-01-12 at 8 34 00 AM

Our Kovan RPC endpoint goes down if under heavy use

There are times when our Kovan node rejects calls because of the following error:

ProviderError: Too Many Requests error received from kovan.rpc.hop.exchange
at HttpProvider._fetchJsonRpcResponse (/Users/sh/Dev/authereumorg/authereum/hop/contracts/node_modules/hardhat/src/internal/core/providers/http.ts:144:15)
at processTicksAndRejections (internal/process/task_queues.js:86:5)

I have seen this only 1 time when using the app normally. I am only able to recreate it when scripting a bunch of txs and am on the FE (probably around 1 call every 1-2 seconds, maybe).

When too many requests are received, our FE does not display balances correctly. See video. When I saw it happen naturally, it resolved itself in ~ 1 minute.

I am not sure if there is anything to do. I think we are fine in most cases. However, if we send out a popular tweet or get a barrage of traffic, this may be an issue. If this limitation is coming from our server, maybe bump the rate limit up by 2x to be safe. Open for discussion.

Screen Shot 2021-03-20 at 4 38 07 PM

Screen.Recording.2021-03-20.at.4.37.32.PM.mov

Pool page requests network change on refresh

Actual behavior: When on the pool page with MetaMask pointed at the wrong network, refreshing the page will trigger the "change network" prompt.

Expected behavior: No prompt is shown when refreshing the page. When "Add Liquidity" is clicked, the prompt is shown if MetaMask isn't on the right network.

[DISCUSSION] It is unclear what the numbers in "Your position" refer to on the "Pool" page

I believe the numbers in the "Your position" section of the "Pool" page should reflect your pool balances.

With this account, I added 500 of each token, however the numbers don't necessarily reflect that.

One other note, before adding the 500 of each token, the "Share of pool" estimate said I will own ~25% of the pool. I believe this number made sense based on my knowledge of the pool at that time. After adding 500 of each token, my pool share said I only owned 0.52%.

Screen Shot 2021-03-18 at 7 46 47 PM

When exiting the Send confirmation, a browser alert is shown

When you exit a "Send" confirmation, a browser alert is shown. See image below.

I believe it should simply close with no alert.

To reproduce:

  • Try to send on the "Send" page
  • Close the confirmation modal with escape OR clicking the "X" OR clicking off the modal
  • Observe the browser alert

Screen Shot 2021-01-12 at 8 11 49 AM

Pool page does not disable button if the second asset being added does not have enough liquidity

When adding liquidity on the "Pool" page, the "Add liquidity" button gets disabled if the number of canonical tokens (first input field) is greater than the user's balance. The button does not get disabled if the number of h tokens (second input field) is greater than the user's balance.

The "Add liquidity" button should only be enabled if the user has enough liquidity in both tokens.

Screen Shot 2021-03-18 at 7 40 28 PM

No transaction or feedback on "Convert" page when choosing "Via Hop Bridge"

When converting funds "Via Hop Bridge", nothing happens (no feedback) when you confirm the conversion modal. Additionally, no transaction is made.

There is an RPC error in the console, so I believe this is related to #20 .

Note: The transactions works on all the other "Via..." options on the "Convert" page

Note: The approval works on the "Via Hop Bridge" section.

Screen Shot 2021-01-12 at 8 43 05 AM

Send page produces RPC error when trying to send

For some reason the "Send" page is giving an RPC error when trying a simple send from Kovan to Arbitrum.

To reproduce:

  • Send 0.1 DAI from Kovan to Arbitrum
  • Observe error alert and RPC error in the console

Screen Shot 2021-01-12 at 8 02 39 AM

The arbitrage bot is not picking up txs now that large values are in the pools

Significant values have been added to the pools and it looks like the arbitrage bot is either off or is not correctly handling these new values. See attached image.

There are two things to note:

  • Given that this is a swap of 1 and a pool of 2.5 million, I would expect the rate to be 1
  • I would imagine that the pool stats on the right should all be approximately equal

Screen Shot 2021-03-20 at 4 54 18 PM

Sending > 10000 of any token over the canonical xDai bridge fails with an exception error

When sending more than 10,000 tokens over the xDai canonical token bridge, an error is thrown. This is a limitation of the xDai OmniBridge. You can verify that there is a per-token tx limit on the bridge by looking at the code here. Alternatively, you can read the maxPerTx value of the token here. There is no daily limit, so someone can send 10,000 tokens as many times as they want. There is a 1,000,000 token per day daily limit.

This should not matter 99.999% of the time, as users who want DAI on xDai will go through our bridge and swap, thus never hitting the canonical bridge limitation. This is an issue, however, for whales who are trying to add liquidity.

I'd imagine the best way to get around this is to remove the limitation, however this is onlyOwner. Two other options:

  • Show something in the UI that informs the user (and disables the button) for amounts greater than 10,000
  • Spin up our own bridge. This would work great -- it would just be one other moving part (that I'd be totally fine with).

Note:

Add token logos somewhere

Now that we have additional tokens to choose from, I think we should add a token logo somewhere on the page. I'm not totally sure where they should go, but I do think having the visual representation (instead of just the text) is very powerful for something like the Syntethix tokens.

SVG Logos are here:

logos.zip

Maybe @cwhinfrey has a design suggestion. Uniswap simply places the logo the left of the symbol everywhere.

Image 1: Our current page
Image 2: Uniswap reference.

Screen Shot 2021-03-18 at 6 21 05 PM

Screen Shot 2021-03-18 at 6 54 18 PM

Balance shows NaN for a user with 123 canonical L2 tokens

I have an address that has 123 L2 Canonical Dai on Optimism. The address is 0x023fFdC1530468eb8c8EEbC3e38380b5bc19Cc5d.

Their Optimism DAI balance shows NaN. I am not exactly sure why. I am happy to provide the private key if needed.

Other accounts of mine work fine. I can reliably reproduce this, but cannot nail down why this may be the case. I can provide more data if needed.

Screen Shot 2021-03-18 at 6 12 12 PM

No feedback when converting "via Uniswap" when on wrong network.

When converting "via Uniswap", point your MetaMask at Kovan and select "Arbitrum Hop Bridge" as the from bridge. Hit "Convert"

Expected behavior: Prompted to switch networks

Actual behavior: Nothing happens and no errors in the console.

Note: this is only an issue when "Arbitrum Hop Bridge" is the from bridge.

Screen Shot 2021-01-12 at 10 38 17 AM

Copy/paste value within the UI does not work as expected

I believe it will be common for a user to copy/paste values in order to send all of their tokens. If a user does this with a value that has a comma, our UI says NaN because commas are not supported in our inputs.

Action item: format inputs in order to ignore commas

As an aside, maybe a "send max" button would be useful, similar to Uniswap. I believe we will have similar issues we had w/ Authereum WRT gas estimation if we are swapping ETH, so it may not be worth it for now.

Screen Shot 2021-03-20 at 5 35 30 PM

The "Pool" page does not use the MM auto-network switcher

It appears as though the "Pool" page only provides instructions on how to switch MM network and does not offer the native MM switching option.

To reproduce:

  • Go to "Pool" page while on Kovan
  • Try to add liquidity on xDai
  • Observe modal instructions instead of MM popup

"Approve All" checkbox is unclickable.

This may not be an issue. Please close if this is intended.

When approving tokens, the "Approve" modal has an "Approve all" text next to a checkbox. The check box makes it feel like it should be clickable, however it is unable to be clicked.

I think there are three possible solutions:

  1. Remove the checkbox and "Approve all" text completely and just do it anyway
  2. Remove the checkbox and keep the "Approve all"
  3. Make the checkbox clickable (note: this would probably require some extra logic to approve an exact amount instead of all)

I'm good for anything.

Update: I see that this checkbox is not grayed out on the convert page from Kovan -> xDai. Not sure why it is greyed out elsewhere.

Screen Shot 2021-03-18 at 6 15 19 PM

Wallet pill does not show address if you must unlock MM upon "Connect a Wallet" click

When connecting a MM wallet, the pill on the top right of the page will still read "Connect a Wallet" instead of displaying the address when the user must unlock their MM account after the button press. It is important to note that the wallet is actually connected (see the balance in the picture below) even though the address is not read correctly.

To reproduce:

  • Lock MM
  • Go on hop.exchange and click "Connect a Wallet"
  • Unlock MM (and change networks if needed)
  • Observe that the wallet is connected but is not displayed on the top right pill

Screen Shot 2021-01-12 at 7 58 22 AM

Pool page doesn't work for Optimism

(This was reported by a user from a DM to my Twitter).

When pooling liquidity on Optimism, you are greeted with an error that says "No token contract for Network 'Optimism'".

The same behavior happens in the console when swapping from Optimism -> anywhere else.

The error received is this line.

Note: This may be easier to resolve after network switching has been resolved, as that may play a role.

Screen Shot 2021-01-28 at 12 43 33 PM

Instructions for switching to any L2 show Arbitrum steps

When cancelling the automated MM network switcher, our instructions to switch networks are shown.

When switching to either Optimism or xDAI, the last two screenshots show Arbitrum
Screen Shot 2021-03-18 at 6 05 24 PM

Note: I see that the required data is on the top of the modal. If the images are meant to be an example (and not an exact instruction) then maybe that should be more clear

Closing MM should not show alert error

When sending a transaction, if you cancel the MM popup (instead of send), you will be greeted with an alert message. I believe we should do nothing instead of show an alert.

For reference, Uniswap does nothing.

Always up for discussion. If we keep it, my vote would be to use a human-readable error, such as "You closed the Metamask window".

EDIT: Realized this happens on many pages. Added more images, but it would be worth checking all pages.

Screen Shot 2021-01-29 at 2 58 13 PM

Screen Shot 2021-01-31 at 1 01 46 PM

Balances on the "Convert" page flicker for ~5s and display the incorrect balance until then

The balances on the "Convert" page take ~5s to load. Incorrect balances are displayed during this time.

In the video below, you will see the flicker and the incorrect balances. My correct balances should be as follows:

  • Kovan DAI: 9512.82
  • Arbitrum Hop Bridge: 38.30
  • Arbitrum Canonical: 10.06

Note: My MM was connected to Arbitrum during this video.

Screen.Recording.2021-01-12.at.8.27.18.AM.mov

Show transaction pending spinner until funds show up on other chain

Update: Sending sBTC from Kovan -> xDai takes >10s after the spinner is done. Because of this, I think we should implement some solution, as people may get confused if that is the first action they take on Hop.

As it stands, we provide visual feedback about a swap up until the point at which a tx on the source chain is confirmed. There may be ~5 seconds after this time where the user's destination balance remains unchanged. This may confuse a user. See attached video.

I think the ideal solution would be to keep the tx pending spinner going until the funds are received on the destination chain. I believe this might be a pretty big technical task, though.

I think any solution where there is some sort of visual feedback until funds are received would be perfect. Not sure what that looks like and would like to open it up for discussion. If this seems like a non-issue, I'd be happy to close it.

Screen.Recording.2021-03-18.at.6.30.58.PM.mov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.