Skip to content

x/gamm: Make gas cost per swap a param #2058

@rrrliu

Description

@rrrliu

Background

Follow up to #1903 (comment), make this fixed gas fee into a pool-level param for more customizability.

Right now we use a BalancerGasFeeForSwap fixed constant, we'll need to update that logic when we swap.

Suggested Design

Add a new field to PoolParams for balancer and stableswap pools, use this field to consume gas during applySwap.

Acceptance Criteria

  • PoolParams struct updated, prepare for contract migration
  • Unit tests in pool_test.go and updated tests in swap_test.go

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions