L1 Stake DAI Decimal Place Gas Miscalculation
Describe the bug
The gas price has 18 decimal places appended to the Gwei cost when depositing DAI, this results in a very high gas price, but also notable that the UI shows no indication the deposit failed due to insufficient funds.
notable: I tried USDC and was able to stake without such issues so it's not affecting all ERC20
To Reproduce
-
Network: Rinkeby L1
-
Page: Earn
- DAI Deposit
- 300 DAI in possession
- .049 ETH in possession
- 250 DAI deposit attempt
- DAI Deposit
-
Failed to add Liquidity error message produced in UI

- Open the console to see messages such as what follows:
11:01:15.202 MetaMask - RPC Error: err: insufficient funds for gas * price + value: address 0x3529B4E50AbbED0a82371d26049d471280540464
have 49 066 321 516 461 071
want 250 000 000 000 000 000 000 (supplied gas 15010499)
Object { code: -32000, message: "err: insufficient funds for gas * price + value: address 0x3529B4E50AbbED0a82371d26049d471280540464 have 49066321516461071 want 250000000000000000000 (supplied gas 15010499)" }
code: -32000
message: "err: insufficient funds for gas * price + value: address 0x3529B4E50AbbED0a82371d26049d471280540464 have 49066321516461071 want 250000000000000000000 (supplied gas 15010499)"
11:01:15.205 Error: insufficient funds for intrinsic transaction cost (error={"code":-32000,"message":"err: insufficient funds for gas * price + value: address 0x3529B4E50AbbED0a82371d26049d471280540464 have 49066321516461071 want 250000000000000000000 (supplied gas 15010499)"}, method="estimateGas", transaction={"from":"0x3529B4E50AbbED0a82371d26049d471280540464","to":"0x99F5557012b681A51E5FBf39FbAa1469D6DDb390","value":{"type":"BigNumber","hex":"0x0d8d726b7177a80000"},"data":"0xc95f9d0e00000000000000000000000000000000000000000000000d8d726b7177a800000000000000000000000000000000000000000000000000000000000000000000","accessList":null}, code=INSUFFICIENT_FUNDS, version=providers/5.4.5)
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_e https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
r https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
c https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_invoke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
b https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
s https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
promise callback*u https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
ke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
ke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
t https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
c https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_invoke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
b https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
a https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
promise callback*u https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
a https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
promise callback*u https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
re https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
re https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
t https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
c https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_invoke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
b https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
a https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
promise callback*u https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
ke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
ke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
value https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
r https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
c https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_invoke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
b https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
a https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
promise callback*u https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
Ee https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
Ee https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
Pe https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
e https://gateway.boba.network/static/js/main.2cc9c140.chunk.js:1
c https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
_invoke https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
b https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
n https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
s https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
o https://gateway.boba.network/static/js/2.eb185448.chunk.js:2
main.2cc9c140.chunk.js:1:2206853
Expected behavior Produce a gas price of 250 000 000 000 000, in other words, with 3 fewer 0's appended and if insufficient funds lead to a failed transaction, that the info be relayed over the UI.
Looking into it, action soon
I figured out what's happening, I think. I tried staking .01 DAI here, it didn't autofail and instead brought up a confirmation window. Instead of withdrawing from the DAI L1 balance, however, it withdrew from the ETH L1 balance and added it to the ETH L1 LP pool. I confirmed this with a .05 DAI deposit minutes later.
I tested this and tried to debug where the error was coming from, we correctly see the staketoken as DAI, the stakeValue also comes back correctly, but the ETH currency address is being associated instead, I am still unable to see exactly where things go wrong, but essentially when adding DAI LP it instead treats it like adding ETH LP.

Hopefully that helps a bit
Ok, thanks for the extra information - looking into it now.