You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When charging gas pessimistically, we currently do not take into consideration that there is a cap for how expensive gas can be. At the moment, the cap is at 20x minimum gas price.
For examples, say we are at the highest gas price due to congestion. In this case, there is no possible way that gas price will go up more. But we still apply the pessimistic factor, charging at a higher price than possible.
The extra tokens spent are still refunded later, so there is no loss to the user. But it seems odd that the user has to pay unreasonably high gas costs.
In transaction HChUL7NjF5xwZEHULexnymy99BdYPHnsUyKktmiXHxWE in shardnet, we observe that 2.4N are paid for 120Tgas, at the configured cap for shardnet of 0.02 NEAR / Tgas. The refund for the remaining 180Tgas was 35.45 NEAR. That means the user had to pay upfront almost 38 NEAR, even though it could really only cost 6 NEAR in the absolute worst case.
It's not clear to me if we should fix this. Doing so would be a protocol change.
The text was updated successfully, but these errors were encountered:
When charging gas pessimistically, we currently do not take into consideration that there is a cap for how expensive gas can be. At the moment, the cap is at 20x minimum gas price.
For examples, say we are at the highest gas price due to congestion. In this case, there is no possible way that gas price will go up more. But we still apply the pessimistic factor, charging at a higher price than possible.
The extra tokens spent are still refunded later, so there is no loss to the user. But it seems odd that the user has to pay unreasonably high gas costs.
In transaction HChUL7NjF5xwZEHULexnymy99BdYPHnsUyKktmiXHxWE in shardnet, we observe that 2.4N are paid for 120Tgas, at the configured cap for shardnet of 0.02 NEAR / Tgas. The refund for the remaining 180Tgas was 35.45 NEAR. That means the user had to pay upfront almost 38 NEAR, even though it could really only cost 6 NEAR in the absolute worst case.
It's not clear to me if we should fix this. Doing so would be a protocol change.
The text was updated successfully, but these errors were encountered: