Skip to content

program: trigger price based on oracle and basis #1716

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

Merged
merged 18 commits into from
Jul 30, 2025

Conversation

crispheaney
Copy link
Member

No description provided.

@crispheaney crispheaney changed the title init program: trigger price based on oracle and basis Jul 7, 2025

Ok(median_price
.max(oracle_price.safe_sub(max_oracle_diff)?)
.min(oracle_price.safe_add(max_oracle_diff)?))
Copy link
Member

Choose a reason for hiding this comment

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

can you just use the clamp fcn?

@crispheaney crispheaney merged commit 59a6443 into master Jul 30, 2025
7 of 8 checks passed
LukasDeco pushed a commit that referenced this pull request Jul 31, 2025
* init

* shrink for time since last funding

* add max diff

* use trigger price isntead of oracle

* add event

* more tests

* update for contract tier C

* add ts code

* return early instead of throw error

* sdk: rename oraclePrice to triggerPrice

* feature flag

* styling

* address comments

* parentheses

* casts

* CHANGELOG
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.

3 participants