-
Notifications
You must be signed in to change notification settings - Fork 41
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 Hybrid AMM-CDA Router #1261
Conversation
@@ -463,7 +464,10 @@ mod pallet { | |||
) -> DispatchResult { | |||
let market = T::MarketCommons::market(&market_id)?; | |||
ensure!(market.status == MarketStatus::Active, Error::<T>::MarketIsNotActive); | |||
ensure!(market.scoring_rule == ScoringRule::Orderbook, Error::<T>::InvalidScoringRule); |
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.
Wouldn't ScoringRule::Orderbook
still be valid?
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.
Good question. I just assumed because of Malte's proposal document that Orderbook scoring rule will be deleted. But now, when I consider your question, it makes total sense to allow users to use the order book scoring rule alone. However, every market will be initialized with ScoringRule::AmmCdaHybrid
, that's why just using the order book pallet without using the HybridRouter will work.
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.
If every market is going to be initialised with ScoringRule::AmmCdaHybrid
what will happen to parimutuel markets?
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.
From https://hackmd.io/NBVKUY1QT--YnotR5KUx2w#Scoring-Rules: "The Lmsr and Orderbook variants are removed from the ScoringRule enum and replaced by AmmCdaHybrid, which allows a market to use both the order book and the AMM."
If every market is going to be initialised with ScoringRule::AmmCdaHybrid what will happen to parimutuel markets?
The ScoringRule::Parimutuel
object will not be deleted, so the parimutuel markets stay as they are.
Abandoned in favor of multiple smaller PRs! |
What does it do?
What important points should reviewers know?
Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues?
References