-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide suggestions for upper and lower bounds for max priority fee #17037
Comments
@saledjenic can we call that from any provider or only infura offers it? |
My opinion: If it's not possible/practical, or as a short term solution until we decide we want to work on the first approach, we can just add the custom Infura API to the proxy. If these results are block-based, make sure we cache them (like I wish we did with prices obtained from CryptoCompare). |
I was also searching a bit, and yes, the link you shared is a good one to implement. Initially, I was thinking about https://github.com/zsfelfoldi/feehistory/blob/main/docs/feeOracle.md ( https://github.com/zsfelfoldi/feehistory/blob/main/js/feeOracle.js ) but that's not what we need. Maybe we can use that oracle and map the time factor to some real times (to 30 secs period for example, factor 1, less than 30 secs, factor 2 less than 1 min, factor 4 less than 1.5 min, factor 8 less than 2 mins, since we have factors as a power of 2 up to 128) and use that for calculating estimated time if we're not confident enough in our estimated time algorithm. |
…se fee to the path v2 dto The following properties added to the path v2 dto: - suggestedMinPriorityFee - suggestedMaxPriorityFee - currentBaseFee Path model of the new send modal updated with those properties. Closes #17037
…se fee to the path v2 dto The following properties added to the path v2 dto: - suggestedMinPriorityFee - suggestedMaxPriorityFee - currentBaseFee Path model of the new send modal updated with those properties. Closes #17037
For the time being, we're estimating low/medium/high fees as well as the tx time on our side using
SuggestedFees
andTransactionEstimatedTime
functions of theFeeManager
.According to the new Send modal design we need base fee and priority fee ranges, that's something we don't have yet. So we need to think about how to calculate those ranges, while for estimated fees and time, we have some discrepancies comparing those values with Metamask.
Maybe it's a good time to start using
suggestedGasFees
call that provides all those details instead of calculating them on our side.https://docs.metamask.io/services/reference/gas-api/api-reference/gasprices-type2
This is what the response looks like:
Since it's a GET call to Infura that is using API key, what's the best way to integrate it into the app?
Do we want to add it to StatusProxy?
Do we need a similar logic we have for rpc providers?
@alaibe @shivekkhurana @friofry @dlipicar @alexjba
The text was updated successfully, but these errors were encountered: