GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

Donation: Gas price is too high for regular tx #29

Closed vldkhh closed 7 months ago

vldkhh commented 9 months ago

Is that something that can be configured on an interface level? Why is it this expensive?

sirpy commented 9 months ago

@patpedrosa creating a new stream should cost roughly 0.003 (650k gas * 5gwei gasPrice)

decentralauren commented 9 months ago

Lewis: Base Gwei is being calculated in UI - need to hard code base Gwei being used.

@L03TJ3 to share a link.

benefacto commented 9 months ago

The donation seemed too expensive (not a blocker) and it seems like the base cost is too high; @decentralauren will provide more info

L03TJ3 commented 9 months ago

https://github.com/GoodDollar/GoodWeb3-Mono/blob/master/packages/sdk-v2/src/sdk/base/hooks/useGasFees.ts

Maybe this can be used/is usefull from sdk-v2 package? it enforces the base gwei price defined by celo protocol

sirpy commented 9 months ago

@benefacto in the code where we do TXs it must be hardcoded with 5gwei cast costs. either in each TX, or if a global setting is possible in whatever web3 framework is used. see also lewis comment on how we created a hook that enforces that for the useDapp framework

benefacto commented 9 months ago

Business Description

Issue at Hand

Proposed Change

Implications

Technical Description

The technical issue at hand involves the inconsistency in the gas price configuration between two different sections of code in the GoodDollar project repositories.

Identified Issue

The inconsistency lies between two code snippets from different repositories:

Proposed Change

To maintain consistency and potentially reduce transaction costs, it is proposed that the gas price in the GoodCollective repository be updated to match that of the GoodWeb3-Mono repository. Specifically, the gas price for chain ID 42220 should be changed from 10 Gwei to 5 Gwei.

Implications of the Change

  1. Cost Reduction: Lowering the gas price could make transactions more affordable, which is a critical concern in the discussion.
  2. Consistency Across Repositories: Ensuring uniform gas prices across different parts of the project improves maintainability and reduces confusion.

Estimate

The task of harmonizing transaction costs in the GoodDollar project involves updating the gas price configuration in one repository to align with another, ensuring consistency and cost efficiency.

  1. Review Current Configurations (1-2 hours):

    • Thoroughly reviewing the existing gas price configurations in both the GoodCollective and GoodWeb3-Mono repositories.
    • Understanding the context and implications of the current settings.
  2. Update Gas Price in GoodCollective Repository (1 hour):

    • Modifying the gas price setting for chain ID 42220 in the GoodCollective repository to match the GoodWeb3-Mono repository (from 10e9 to 5e9).
  3. Testing and Validation (2-3 hours):

    • Testing the updated configuration to ensure it behaves as expected.
    • Validating that the change does not introduce any unforeseen issues in transactions on the Celo chain.
  4. Review Implications on Transactions (2-3 hours):

    • Assessing the broader implications of this change on transaction costs and user experience.
    • Ensuring that the update aligns with the goal of cost reduction and consistency.

Adding these up, the total estimated time could be around 6-9 hours. This estimate assumes that the developer has a good understanding of the GoodDollar project's technical infrastructure and the implications of gas price configurations on blockchain transactions.

L03TJ3 commented 7 months ago

@krisbitney This one is still existing. suggested gwei from dapp is 10 gwei where 5 is sufficient

krisbitney commented 7 months ago

@krisbitney This one is still existing. suggested gwei from dapp is 10 gwei where 5 is sufficient

Got it. I had thought you guys wrote the @gooddollar/goodcollective-sdk package. I changed it there, but you may need to publish a new version on npm before the change is available in the app.

L03TJ3 commented 7 months ago

@krisbitney once https://github.com/GoodDollar/GoodCollective/pull/111/files is merged i'll trigger the publish

krisbitney commented 7 months ago

@krisbitney once https://github.com/GoodDollar/GoodCollective/pull/111/files is merged i'll trigger the publish

Awesome. Thanks.

L03TJ3 commented 7 months ago

goodcollective-sdk got released now, didn't really matter from what branch

krisbitney commented 7 months ago

https://github.com/GoodDollar/GoodCollective/pull/111/files

Amazing, thanks. And thank you for updating the branch.

vldkhh commented 7 months ago

verified

image.png