Code Monkey home page Code Monkey logo

ethhmy-bridge.frontend's People

Contributors

ahiipsa avatar gupadhyaya avatar jhd2best avatar luttyyang avatar potvik 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethhmy-bridge.frontend's Issues

Add 'Horizon by Harmony' name

Let’s put ‘Horizon by Harmony’ where Harmony logo is right now on the upper left corner. Use Nunito font and dark navy color.

Add a welcome pop-up message with following information:

Can you add a welcome pop-up message with following information:

Welcome to Ethereum<>Harmony Bridge 

You can use this bridge to 
    1) send your ethereum BUSD to harmony 
    2) send your ethereum LINK to harmony
    3) send any ERC20 from ethereum to harmony

Each Ethereum to Harmony transfer requires two transactions to be signed by the user: 
    1) approve token lock 
    2) the actual lock

Each of these two ETH transactions may cost you: 0.0001 to 0.0075 Ether (or $1 to $2.6 at $350/ether)

You can also do the reverse transfer, i.e., redeem your tokens back to your ethereum account. The cost is bared by Harmony and you will only pay for Harmony gas (which is a small fraction of a cent).

This is a permissioned bridge and your tokens are never lost. However, use the bridge with caution.

Report any issues to [email protected] with one or more of the following informations:
    1) operation id, e.g., 7fa14f19-219f8220-1f209e61-8911e539 in https://bridge.harmony.one/busd/operations/7fa14f19-219f8220-1f209e61-8911e539. Every bridge operation is associated with a unique operation id, which is available in your webpage URL. If you didn't store the operation id, it is okay, follow 2) or 3)
    2) your transaction hashes on Ethereum or Harmony
    3) your ETH or ONE account address 

Please allow 24-48 hours for your issue resolution. Happy Bridging!!!
```

Also add a Contact Us button that mailsTo: [email protected]

Quick switch error

another problem i noticed is:

  1. do eth to hmy busd flow, sign the two transactions and then quickly
  2. switch and do hmy to eth, that time three times prompted for signing and also funds sometime gets stuck

Show information about token contract address or link

The user need to know the token contract address that the Bridge create for HRC20 tokens, so the user can add the tokens to Onewallet
Also the contracts information should be in the main/front page for:
BUSD in harmony mainnet
LINK in harmony mainnet

image

wait for 13 block confirmation in the harmony to ethereum flow

currently, we do not force the user wait for 13 blocks confirmation of the unlock transaction in the harmony to Ethereum flow. this could lead to security flaw, where assume the unlock tx succeed, but fail to get finalized (due to forking), then on the harmony side burn happened, but on the Ethereum side unlock didn't, leading to loss of funds.

could you change to also wait for 13 block confirmation? if confirmation fails, then call revert burn on harmony side to give back user's token.

throttle the number harmony to ethereum transactions per account

let us limit the number of harmony to ethereum transactions to 5 per account over 24 hours. basically you need to query all harmony managers (BUSD, LINK, ERC20), getTransactionHistory(manager contract) and then filter using user address and transaction timestamp. If there are already 5 transactions within an hour from the user account (harmony) then disable the frontend.

any other ways?

make the assets explorer searchable

make the assets explorer searchable using any of these (case-insensitive prefix search):

  • symbol
  • name
  • erc20 addr
  • hrc20 addr

also make at least the Total Locked column sortable.

Gas used for ETH txs is fixed/low?

It seems the bridge is using a fixed or very low gas price of 20 gwei for transactions. The experience is nott that pleasant because i had to bump the gas on Metamask for the txs to get through.

Is it possible to calculate the best gas price to be used at the time the user tries to send the tx? For example, at the time i write this issue the recommended gas price is 50 Gwei for a tx to be confirmed in less than 5 min accordingly to https://ethgasstation.info/

eth token to hmy token mappings

Can you add a feature that shows all eth token to hmy token mappings

Token Name      Ethereum Address                Harmony Address                 Total Value Locked (TVL)
BUSD            <link to ethereum contract>     <link to harmony contract>      54
LINK            <link to ethereum contract>     <link to harmony contract>      20

also a search bar, where user can input their ethereum token address and it will fetch the above details.

there are two ways to get the mappings

  1. if you know the ethereum address, you can simply do
    tokenManagerContract.methods.mappedTokens(<eth-token-addr>).call(options)

  2. get past event logs of x blocks for the TokenMapAck event (you could keep cache the last queried block)
    event TokenMapAck(address indexed tokenReq, address indexed tokenAck)

total locked value in USD

show total locked value in $ in the top of the https://bridge.harmony.one/tokens page. this could be accomplished by querying etherscan (etherscan api).
for example: https://etherscan.io/address/0x2dCCDB493827E15a5dC8f8b72147E6c4A5620857 shows $521.40 under token:. This is for ETH_ERC20_MANAGER_CONTRACT. You will also need to query for ETH_BUSD_MANAGER_CONTRACT (https://etherscan.io/address/0xfD53b1B4AF84D59B20bF2C20CA89a6BeeAa2c628) and ETH_LINK_MANAGER_CONTRACT (https://etherscan.io/address/0xfE601dE9D4295274b9904D5a9Ad7069F23eE2B32) contracts and add the three values to show TVL.

metamask shows higher tx fee due to gas limit, any better way to show the actual fee?

  1. metamask calculates the amount based on how much user is willing to spend (based on gas limit), and it is not exactly the amount which will be charged for the user. Most users think that bridge is going to cost them $19 in the below picture. Any way to configure metamask to not scare people? (the proficient metamask users may understand this, but not many people understand this).

Screen Shot 2020-10-10 at 8 41 41 AM

  1. for the approve transaction, metamask shows fee in dollars, however for the lock, it shows in ether. can we have this also show in dollars? or make the first one in ether as well.

Screen Shot 2020-10-10 at 8 43 15 AM

basically, figure out a consistent way to show the tx fee (either dollars or ether).

[critical] capture user bumping the transactions

currently, if the approve or lock transaction on ethereum takes too long, metamask provides a way to speedup, which creates another transaction with same nonce, but higher gas to make it succeed faster. however, in our backend, we need to take care of this situation. if the original transaction fails due to dropped & replaced, then follow the replaced transaction status. this logic needs to fully follow the replacement chain, as a transaction may get bumped several times by the user (if the user is not willing to wait, he may just keep on bumping it). see the attached case:

the operation failed:

Screen Shot 2020-10-14 at 10 34 29 PM

the original transaction was dropped and replaced by the tx below by the user:

Screen Shot 2020-10-14 at 10 34 41 PM

the replaced transaction succeeded, however our backend could not capture that.

Screen Shot 2020-10-14 at 10 34 49 PM

the logic needs to accommodate regular checking of the transactions whether they are being replaced by some other transactions due to user bumping.

Resolve problem with 2 operations in 1 block

when we have 2 operations in 1 block, 2 operations are called almost simultaneously in 2 asynchronous threads
it's reason of error: transaction failed:replacement transaction underpriced

image

A personalized explorer showing only users flows (history)

Currently the main bridge explorer will show all users. Can we have a personalized explorer for users flows? This could be shown right below the flow screen (split screen horizontally). This way, user can better track what happened with their operations. Basically, filter operations based on user's ETH and ONE accounts.

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.