Skip to content

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

Choose a reason for hiding this comment

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

It seems like this is dead code? The functionality is handled by CreatePoolLiquidityBootstrapping, which checks the pool type and routes to the appropriate encoding method?

'Tokens must be different',
);
}

Copy link
Member

Choose a reason for hiding this comment

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

Were these just some extra validations that were missing before?

validateCreatePool(
input:
| CreatePoolLiquidityBootstrappingInput
| CreatePoolLiquidityBootstrappingWithMigrationInput,
Copy link
Member

Choose a reason for hiding this comment

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

This change is because we were missing CreatePoolLiquidityBootstrappingWithMigrationInput before?

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.

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.

3 participants