Skip to content

Commit

Permalink
Explain why not doing todo for pda of market (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
brittcyr authored Aug 26, 2024
1 parent 40ca105 commit f5396fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions programs/manifest/src/program/processor/create_market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,14 @@ pub(crate) fn process_create_market(
}
}

// Do not need to initialize with the system program because it is assumed
// that it is done already and loaded with rent.
// Do not need to initialize with the system program because it is
// assumed that it is done already and loaded with rent. That is not at
// a PDA because we do not want to be restricted to a single market for
// a pair. If there is lock contention and hotspotting for one market,
// it could be useful to have a second where it is easier to land
// transactions. That protection is worth the possibility that users
// would use an inactive market when multiple exist.

// TODO: Make the market be at a PDA to enforce only 1 market per Base/Quote pair.
// Setup the empty market
let empty_market_fixed: MarketFixed =
MarketFixed::new_empty(&base_mint, &quote_mint, market.key);
Expand Down

0 comments on commit f5396fb

Please sign in to comment.