ton-blockchain / bridge Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zavtramen/bridge
TON-EVM Toncoin bridge frontend
Home Page: https://ton.org/bridge
License: GNU General Public License v3.0
This project forked from zavtramen/bridge
TON-EVM Toncoin bridge frontend
Home Page: https://ton.org/bridge
License: GNU General Public License v3.0
Functional
Nothing happens.
In Console the following error is displayed.
Error: Invalid bridge data
041e0a9.js:2:11891
Uncaught TypeError: e.provider is null
22a6ade.js:1:40059
TON tokens should be transferred to Ethereum wallet in Ropsten test network
Medium
Desktop:
No response
Functional
1- open the bridge webpage
2- select "Binance Smart Chain" as the source or destination
BSC gas fee
doesn't get updated and always is the default value defined in the frontend web app.
BSC -> TON : default = 0.0002 BNB
TON -> BSC: default = 0.0008 BNB
The bridge should fetch the current gas fee and show it to the user.
Also,
If the current gas fees are lower than the default values, users would be charged more than necessary in their transactions.
And if the current gas fees are higher than the default Gas fees, users' transactions would fail.
here is the reference to function getPairGasFee: https://github.com/ton-blockchain/bridge/blob/master/pages/index.vue#L339
This function uses bsc.main.getGasUrl
to fetch current fees from the network. it works perfectly for Eth, but it fails for BSC because of Cors policy:
Seems like the header 'Cache-Control': 'no-store, max-age=0'
set inside fetch is not accepted by the backend. This failing will be caught in catch
block and thus this line will be executed:
this.gasPrice = 0
Because of this error local gasPrice variable never gets updated and will be 0 when runtime reaches the line below:
this.gasPrice = gasPrice > 0 ? gasPrice : this.params.defaultGwei;
And this causes the this.gasPrice
to be equal to default values.
I removed the header and everything is working perfectly without it. So I opened a pull request which deletes that specific header.
Critical
Desktop (please complete the following information):
No response
UX
1- Go to https://ton.org/bridge/
2- Scroll to the end of the page
3- Click on How it works.
Get redirected to not found error page.
https://ton.org/how-it-works/bridge
To go to the how it works.
page.
Low
Desktop (please complete the following information):
No response
Functional
1- open the bridge website
2- Input 999 in the input field "Amount of TON"
Shown "Bridge Fees" is 7.484999999999999 TON
According to Documentation "Bridge fees" is calculated as below:
input_amount
= amount of TON which user inputs In the "Amount of TON" field (which is a minimum of 10TON)
Bridge Fees
= (Fixed 5 TON) + ( 0.25% of (input_amount
- 5))
Having 999 as input we have:
Bridge Fees
= (5) + ( 0.25% * (999 - 5)) = 5 + 2.485 = 7.485 TON
999 is not the only case. for example take a look at the cases below:
expected fee
7.4875, shown fee
: 7.487500000000001 TON
expected fee
250004.9875, shown fee
: 250004.98750000002 TON
It's happening due to the nature of storing float numbers. since numbers are stored in their binary representation. Some decimal values cannot be represented accurately in binary format and cause these kinda weird results.
To illuminate this and other potential arithmetic flaws avoid calculating with bare Javascript methods and utilize a battle-tested Math Library.
The demonstrated difference between displayed and expected value may seem insignificant but a malicious user with repetition may harm the bridge and its users significantly.
High
Desktop (please complete the following information):
No response
Functional
Nothing happens: no notification, no loading page.
RPReplay_Final1663432378.MP4.zip
Critical
Smartphone:
The bridge only works with Metamask app included browser. Another WEB3 browsers don't accept the bridge and transferring coins.
Functional
App tell me install MetaMask on phone (but i already got it and it work)
So app cant connect to metamask nothing happen after
Also How it works link faild
Medium
Desktop (please complete the following information):
Smartphone (please complete the following information):
Functional
Nothing happens.
These errors appear in console logs:
Error: Invalid bridge data at 22a6ade.js:1:40432 at v (041e0a9.js:2:93785) at Generator._invoke (041e0a9.js:2:93573) at Generator.next (041e0a9.js:2:94214) at r (041e0a9.js:2:66915) at l (041e0a9.js:2:67118)
A new pop-up window shows and users is able to transfer digital assets
Medium
Desktop:
No response
Functional
The transfer of 189 Toncoins to my ETH wallet in blocked since the 15th of September at that stage:
Please send 189 Toncoins to bridge smart-contract
ton://transfer/Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr?amount=189000000000&text=swapTo%230x37AEc2350De679780078C1855b1493d8877Bf9Af
Send from your personal wallet. Do not send directly from exchanges and bots!
The 189 Toncoins have been sent to the wallet Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr but never reached my ETH wallet
Transfer not completed
Transfer of 189 Toncoins to my ETH wallet
High
Desktop (please complete the following information):
No response
Other
1- open bridge webpage
2- scroll down and select Documentation
the
It is linked to an issue from an archived repository TIPs.
Only contains information about ETH-TON bridge
It's better to open a user-friendly documentation web page with exhaustive and classified details about current bridges.
Medium
Desktop (please complete the following information):
Device is not important in this issue
No response
Functional
Brave opens new tab with no info and dark theme. TON extension doesn't activate for transfer.
TON extension opens with filled form of transaction for confirming: amount of tons, comment and recipient.
Critical
Desktop:
No response
UI
It show's Formula below as the formula for Bridge fee:5 TON + 0.25% of amount
An example:
Assume we have 100 as Ton amount. according to Formula Bridge fee should be:
5 + 0.25% * 100 = 5 + 0.25 = 5.25
But the Fee on the screen is 5.2375
Looking at the codebase and calculated fees on the website it's clear that the correct formula is: 5 TON + 0.25% of (amount - 5 )
Following our example in "Actual Result" we would have:
Ton amount = 100
Bridge Fee = 5 + (0.25% * (100 - 5) = 5 + 0.2375 = 5.2375
High
Desktop (please complete the following information):
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.