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 Hybrid AMM-CDA Router #1261

Closed
wants to merge 20 commits into from
Closed

Implement Hybrid AMM-CDA Router #1261

wants to merge 20 commits into from

Conversation

Chralt98
Copy link
Member

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

@Chralt98 Chralt98 added the s:in-progress The pull requests is currently being worked on label Feb 21, 2024
@Chralt98 Chralt98 self-assigned this Feb 21, 2024
@Chralt98 Chralt98 changed the title Implement Hybrid AMM-CDA Implement Hybrid AMM-CDA Router Feb 21, 2024
@@ -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);
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member

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.

@Chralt98 Chralt98 added s:abandoned This pull request is abandoned and removed s:in-progress The pull requests is currently being worked on labels Mar 1, 2024
@Chralt98
Copy link
Member Author

Chralt98 commented Mar 1, 2024

Abandoned in favor of multiple smaller PRs!

@Chralt98 Chralt98 closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:abandoned This pull request is abandoned
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants