Skip to content

[sei] Governance proposal for new token pair on the dex#61

Merged
Kbhat1 merged 7 commits intomasterfrom
kartik/dex-token-pairs-governance
Jun 29, 2022
Merged

[sei] Governance proposal for new token pair on the dex#61
Kbhat1 merged 7 commits intomasterfrom
kartik/dex-token-pairs-governance

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Jun 27, 2022

https://linear.app/passportlabs/issue/PAS-812/[sei]-require-governance-proposal-for-new-token-pair-on-the-dex

  • removes ability to submit transaction to create a dex whitelisted token pairs
  • Adds governance proposal type to add dex whirelisted token pairs
  • Does not add ability to arbitrarily add any denom - only restricted to current enum set

Sample Register Pair proposal.json

{
  "title": "Add usdc,sei + usdc,atom pair to contract 1 and usdc,btc pair to contract 2",
  "description": "gov proposal to update contract 1 and contract 2 registered pairs",
  "batch_contract_pair": [
    {
      "contract_addr":  "contract_1_address",
      "pairs": [
        {
          "price_denom": "usdc",
          "asset_denom": "sei"
        },
        {
          "price_denom": "usdc",
          "asset_denom": "atom"
        }
      ],
    },
    {
      "contract_addr": "contract_2_address",
      "pairs": [
        {
          "price_denom": "usdc",
          "asset_denom": "btc"
        }
      ],
    },
  ],
  "deposit": "10000000usei"
}

@Kbhat1 Kbhat1 changed the title [sei] Require governance proposal for new token pair on the dex [sei] Governance proposal for new token pair on the dex Jun 27, 2022
@Kbhat1 Kbhat1 requested a review from udpatil June 28, 2022 00:06
@Kbhat1 Kbhat1 force-pushed the kartik/dex-token-pairs-governance branch from f1ea906 to 8a9db90 Compare June 28, 2022 00:22
@Kbhat1 Kbhat1 requested a review from codchen June 28, 2022 17:03
Copy link
Collaborator

@codchen codchen left a comment

Choose a reason for hiding this comment

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

maybe add an example proposal json file somewhere? either under x/dex/examples or part of this PR description is fine

@Kbhat1 Kbhat1 force-pushed the kartik/dex-token-pairs-governance branch from fcc4edd to 7de6735 Compare June 29, 2022 17:28
@Kbhat1 Kbhat1 merged commit e0a6601 into master Jun 29, 2022
masih pushed a commit that referenced this pull request Sep 26, 2025
masih pushed a commit that referenced this pull request Sep 29, 2025
## Describe your changes and provide context
Refactors the code a bit and add necessary helpers for Tokenfactory mint
and burn message types.
* They both will deposit and withdraw from module accounts as they're
used as intermediaries for storage

For context, module accounts are a single source of the bottom neck when
it comes to concurrency, so to remove this bottle neck, we avoid
declaring them in the access ops, instead, we store an in-memory value
protected by mutex locks and flush it to the AVL tree at the very end.
This will ensure deterministic updates

Follow-up PRs, still need to test concurrency:
#331 
sei-protocol/sei-cosmos#63

## Testing performed to validate your change
Mainly unit tests - will need to do some E2E testing once it's
integrated with the sei-chain level chains. Will follow up with two more
PRs

Sanity check that bank sends aren't affected with the follow up PRs:

![image](https://user-images.githubusercontent.com/18161326/197229251-0afe0517-c930-4745-993a-10aad7c1c038.png)
masih pushed a commit that referenced this pull request Sep 30, 2025
## Describe your changes and provide context
Refactors the code a bit and add necessary helpers for Tokenfactory mint
and burn message types.
* They both will deposit and withdraw from module accounts as they're
used as intermediaries for storage

For context, module accounts are a single source of the bottom neck when
it comes to concurrency, so to remove this bottle neck, we avoid
declaring them in the access ops, instead, we store an in-memory value
protected by mutex locks and flush it to the AVL tree at the very end.
This will ensure deterministic updates

Follow-up PRs, still need to test concurrency:
#331 
sei-protocol/sei-cosmos#63

## Testing performed to validate your change
Mainly unit tests - will need to do some E2E testing once it's
integrated with the sei-chain level chains. Will follow up with two more
PRs

Sanity check that bank sends aren't affected with the follow up PRs:

![image](https://user-images.githubusercontent.com/18161326/197229251-0afe0517-c930-4745-993a-10aad7c1c038.png)
masih pushed a commit that referenced this pull request Oct 1, 2025
masih pushed a commit that referenced this pull request Oct 9, 2025
LoadVersion should open DB with read only
@masih masih deleted the kartik/dex-token-pairs-governance branch October 31, 2025 15:50
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