Skip to content

Mkflow27/issue783#784

Merged
mkflow27 merged 8 commits intomainfrom
mkflow27/issue783
Jan 22, 2026
Merged

Mkflow27/issue783#784
mkflow27 merged 8 commits intomainfrom
mkflow27/issue783

Conversation

@mkflow27
Copy link
Collaborator

Add Liquidity Bootstrapping Fixed Price Pool Support

Summary

Adds support for creating and initializing Fixed Price Liquidity Bootstrapping Pools (Fixed Price LBPs) in the SDK.

Changes

Core Features

  • Added PoolType.LiquidityBootstrappingFixedPrice enum value
  • Created CreatePoolLiquidityBootstrappingFixedPriceInput and FixedPriceLBPParams types
  • Implemented pool creation via FixedPriceLBPoolFactory
  • Added input validation with InputValidatorLiquidityBootstrappingFixedPrice
  • Added initialization validation enforcing seedless pattern (project token only, reserve token = 0)

Key Files

  • src/types.ts - Added new pool type enum
  • src/entities/createPool/types.ts - Added fixed price LBP input types
  • src/entities/createPool/createPoolV3/liquidityBootstrapping/createLiquidityBootstrapping.ts - Added fixed price encoding logic
  • src/entities/inputValidator/liquidityBootstrapping/inputValidatorLiquidityBootstrappingFixedPrice.ts - New validator class
  • src/entities/inputValidator/inputValidator.ts - Registered new validator
  • src/entities/createPool/createPoolV3/index.ts - Registered pool type
  • test/lib/utils/createPoolHelper.ts - Added ABI mapping for event decoding
  • test/v3/createPool/liquidityBootstrapping/liquidityBootstrappingFixedPrice.integration.test.ts - Integration tests

Validation Rules

  • Owner, project token, and reserve token must not be zero address
  • Project token rate must be > 0
  • Swap fee percentage cannot exceed 10%
  • Start time must be before end time and in the future
  • Tokens must be different
  • Initialization: only project tokens allowed (reserve amount must be 0)

Testing

  • Integration tests for pool creation, registration, and initialization
  • Validates seedless initialization pattern

@mkflow27 mkflow27 marked this pull request as ready for review January 19, 2026 10:28
@mkflow27 mkflow27 requested a review from johngrantuk January 19, 2026 10:28
Copy link
Member

@johngrantuk johngrantuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of queries to address and please add a ChangeSet for the release.

We recently updated CI to skip integration tests which have been quite flaky. I added some AI generated unit tests so we have a bit more CI coverage. Would be great if you could double check them to see if they make sense or if you have any suggestions to add more.

];

describe('CreatePoolLiquidityBootstrapping - FixedPrice Unit Tests', () => {
const createPool = new CreatePoolLiquidityBootstrapping();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have replaced it with CreatePool here so that the below edge cases get passed through the inputValidator

Copy link
Member

@johngrantuk johngrantuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkflow27 mkflow27 merged commit 05bc57f into main Jan 22, 2026
5 checks passed
@mkflow27 mkflow27 deleted the mkflow27/issue783 branch January 22, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants