0

Im trying to get 0x API fees but I dont understand how matcha.xyz does it. I tried looking at 0x Instant, but the fees are too low and same for me when I use their API this is what Im getting (136000 x 5000..) Image enter image description here but i dont understand how matcha gets it right : enter image description here matchas max fee is usually 50 btw because I would normally specify medium priority and it would give me something like 54 Gwei PS: I do specify a takers address and a skipValidation:false Can anyone please help me on this

1 Answer 1

0

Instant has unfortunately not been updated to support EIP1559 style transactions. It uses https://ethgasstation.info/json/ethgasAPI.json for gas prices which is still providing legacy transaction gas prices.

The way that legacy transactions are handled post EIP1559 is that the priority fee and max gas price are both set to the value of the legacy gas price, this unfortunately leads to the user overpaying for the transaction.

The code for gas price fetching can be found here, if you would like to help fix this issue we welcome contributions to the Instant codebase. In that case please open an issue in the Instant repository and we can help you fix this issue 👍

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.