Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

L1 Stake DAI Decimal Place Gas Miscalculation #452

@gamedazed

Description

@gamedazed

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
  • Failed to add Liquidity error message produced in UI

image

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions