Skip to content

Add operation to update liquidity pools#2720

Merged
abitmore merged 4 commits intohardforkfrom
pr-2604-liquidity-pool-update
Jan 29, 2023
Merged

Add operation to update liquidity pools#2720
abitmore merged 4 commits intohardforkfrom
pr-2604-liquidity-pool-update

Conversation

@abitmore
Copy link
Member

@abitmore abitmore commented Jan 27, 2023

PR for #2604.

  • New operation: liquidity_pool_update_operation
    • operation_type = 75
    • default fee 1 BTS
     struct liquidity_pool_update_operation : public base_operation
     {
        asset                    fee;                ///< Operation fee
        account_id_type          account;            ///< The account who owns the liquidity pool
        liquidity_pool_id_type   pool;               ///< ID of the liquidity pool
        optional<uint16_t>       taker_fee_percent;       ///< Taker fee percent
        optional<uint16_t>       withdrawal_fee_percent;  ///< Withdrawal fee percent
        extensions_type extensions;  ///< Unused. Reserved for future use.
     };
    

Note:

  • The withdrawal fee percentage of a liquidity pool can be updated by the owner, but only to zero.
  • The taker fee percentage of a liquidity pool can be updated at any time by the owner if the withdrawal fee percentage is zero.

@abitmore abitmore linked an issue Jan 27, 2023 that may be closed by this pull request
17 tasks
@abitmore abitmore marked this pull request as ready for review January 28, 2023 11:34
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

87.5% 87.5% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow updating liquidity pool fee rates with certain restrictions

1 participant