-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: liquidity mining for xyk pallet #798
Conversation
…used uniuqes compatible traits + fixed tests
…farm that distributes insufficient asset
New crates:
Crate versions that have been updated:
Runtime version has been increased. |
vec, | ||
}; | ||
|
||
const INSSUFFICIENT_ASSET_ED_MULTIPLIER: u8 = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this multiplier
let ed = | ||
T::AssetRegistry::existential_deposit(reward_currency).ok_or(Error::<T>::AssetNotRegistered)?; | ||
|
||
let pot = T::LiquidityMiningHandler::pot_account().ok_or(Error::<T>::FailToGetPotId)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand we need to seed the pot with ED on farm creation. We have two pots though, the first one is seeded on transfer by the farm creator. We could put some comment about this fact.
/// Pallet id. | ||
type PalletId: Get<PalletId>; | ||
|
||
/// NFT collection id for liq. mining deposit nfts. Has to be within the range of reserved NFT class IDs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// NFT collection id for liq. mining deposit nfts. Has to be within the range of reserved NFT class IDs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small stuff otherwise LGTM.
Did we do benchmarks yet?
Yes, committed weights are from new benchmarks with insufficient assets |
Description
This PR adds liquidity mining support for xyk pools.