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

program: add-amm-availability-enum #1258

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Oct 14, 2024

No description provided.

@@ -307,6 +316,12 @@ impl PerpMarket {
PerpOperation::is_operation_paused(self.paused_operations, operation)
}

pub fn can_skip_auction_duration(&self) -> DriftResult<bool> {
Ok((self.amm.net_revenue_since_last_funding > 0
&& self.amm.amm_lp_allowed_to_jit_make(true)?)
Copy link
Member

Choose a reason for hiding this comment

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

is this call expensive for cus? should we try to cache it?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah i will leave that as a todo

programs/drift/src/controller/orders.rs Outdated Show resolved Hide resolved
programs/drift/src/state/state.rs Outdated Show resolved Hide resolved
programs/drift/src/math/fulfillment.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants