Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement genesis liquidity protocol #545

Merged
merged 25 commits into from
Jul 18, 2024

Conversation

akildemir
Copy link
Contributor

No description provided.

Copy link
Member

@kayabaNerve kayabaNerve left a comment

Choose a reason for hiding this comment

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

Initial review for now. I have yet to read over the test. Mainly concerned about algorithmic complexity for the genesis distribution.

substrate/abi/src/genesis_liquidity.rs Outdated Show resolved Hide resolved
substrate/abi/src/genesis_liquidity.rs Show resolved Hide resolved
substrate/abi/src/liquidity_tokens.rs Show resolved Hide resolved
substrate/abi/src/genesis_liquidity.rs Show resolved Hide resolved
substrate/client/src/serai/dex.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
};
total_sri_distributed += sri_amount;

// we can't add 0 liquidity
Copy link
Member

Choose a reason for hiding this comment

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

Isn't there actually a minimum in the DEX pallet for the initial liq? 10 or 50k atomic units?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea but it is for liquidity tokens that the pallet handles itself. Only 0 check is being done on the actual coins being added.

Copy link
Member

Choose a reason for hiding this comment

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

substrate/genesis-liquidity/pallet/src/lib.rs Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/primitives/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/primitives/src/lib.rs Outdated Show resolved Hide resolved
substrate/genesis-liquidity/primitives/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/tests/genesis_liquidity.rs Outdated Show resolved Hide resolved
substrate/client/tests/genesis_liquidity.rs Outdated Show resolved Hide resolved
substrate/client/tests/genesis_liquidity.rs Show resolved Hide resolved
substrate/client/tests/genesis_liquidity.rs Outdated Show resolved Hide resolved
use primitives::*;

/// LiquidityTokens Pallet as an instance of coins pallet.
pub type LiquidityTokens<T> = coins_pallet::Pallet<T, coins_pallet::Instance1>;
Copy link
Member

Choose a reason for hiding this comment

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

Can we at least add a TODO to revisit this then please? It's not fundamentally unacceptable yet we need to be working towards robust solutions.

};
total_sri_distributed += sri_amount;

// we can't add 0 liquidity
Copy link
Member

Choose a reason for hiding this comment

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

substrate/genesis-liquidity/pallet/src/lib.rs Outdated Show resolved Hide resolved
@kayabaNerve
Copy link
Member

Processor CI hung, unrelated.

@kayabaNerve kayabaNerve merged commit 1493f49 into serai-dex:develop Jul 18, 2024
11 of 12 checks passed
@kayabaNerve kayabaNerve added feature New feature or request runtime labels Jul 19, 2024
@akildemir akildemir deleted the emissions branch July 19, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants