Skip to content

Conversation

@crispheaney
Copy link
Member

No description provided.

moosecat2 and others added 18 commits July 23, 2025 18:18
* zero unused amm fields

* cargo fmt

* bare bones ix

* minimal anchor mm oracle impl

* update test file

* only do admin validate when not anchor test

* updates

* generalize native entry

* fix weird function name chop off

* make it compile for --feature cpi (#1748)

Co-authored-by: jordy25519 <[email protected]>

* more efficeint clock and state bit flags check

* vamm uses mm oracle (#1747)

* add offset

* working tests

* refactor to use MM oracle as its own type

* remove weird preface

* sdk updates

* bankrun tests all pass

* fix test

* changes and fixes

* widen confidence if mm oracle too diff

* sdk side for confidence adjust

* changelog

* fix lint

* fix cargo tests

* address comments

* add conf check

* remove anchor ix and cache oracle confidence

* only state admin can reenable mm oracle kill switch

* cargo fmt

---------

Co-authored-by: jordy25519 <[email protected]>
* move around ixs

* remove message
})
}

pub fn default_usd() -> Self {
Copy link
Member Author

Choose a reason for hiding this comment

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

if this is only for testing, would put this in an impl wrapped in test flag

Copy link
Member

Choose a reason for hiding this comment

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

this matches the pattern above for oracle price data

Copy link
Member

Choose a reason for hiding this comment

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

the oracle price data one is never used though. i'll remove from there too

* v1 safety improvements

* isolate funding from MM oracle

* add cargo tests for amm availability

* change oracle validity log bool to enum

* address comment
@moosecat2 moosecat2 merged commit 2d158ee into master Jul 28, 2025
11 checks passed
@moosecat2 moosecat2 deleted the nour/mm-oracle-2 branch July 28, 2025 22:21
0xbigz pushed a commit that referenced this pull request Sep 23, 2025
* program: new amm oracle (#1738)

* zero unused amm fields

* cargo fmt

* bare bones ix

* minimal anchor mm oracle impl

* update test file

* only do admin validate when not anchor test

* updates

* generalize native entry

* fix weird function name chop off

* make it compile for --feature cpi (#1748)

Co-authored-by: jordy25519 <[email protected]>

* more efficeint clock and state bit flags check

* vamm uses mm oracle (#1747)

* add offset

* working tests

* refactor to use MM oracle as its own type

* remove weird preface

* sdk updates

* bankrun tests all pass

* fix test

* changes and fixes

* widen confidence if mm oracle too diff

* sdk side for confidence adjust

* changelog

* fix lint

* fix cargo tests

* address comments

* add conf check

* remove anchor ix and cache oracle confidence

* only state admin can reenable mm oracle kill switch

* cargo fmt

---------

Co-authored-by: jordy25519 <[email protected]>

* fix tests (#1764)

* Nour/move ixs around (#1766)

* move around ixs

* remove message

* add devnet oracle crank wallet

* refactored mm oracle

* sdk changes + cargo fmt

* fix tests

* validate price bands with fill fix

* normalize fill within price bands

* add sdk warning

* updated type

* undefined guard so anchor tests pass

* accept vec for update amm and view amm

* adjust test to work with new price bands

* Revert "adjust test to work with new price bands"

This reverts commit ee40ac8.

* remove price bands logic

* add zero ix for mm oracle for reset

* mm oracle improvements (#1771)

* v1 safety improvements

* isolate funding from MM oracle

* add cargo tests for amm availability

* change oracle validity log bool to enum

* address comment

---------

Co-authored-by: moosecat <[email protected]>
Co-authored-by: jordy25519 <[email protected]>
harsh4786 pushed a commit to harsh4786/drift-v2 that referenced this pull request Oct 23, 2025
* program: new amm oracle (drift-labs#1738)

* zero unused amm fields

* cargo fmt

* bare bones ix

* minimal anchor mm oracle impl

* update test file

* only do admin validate when not anchor test

* updates

* generalize native entry

* fix weird function name chop off

* make it compile for --feature cpi (drift-labs#1748)

Co-authored-by: jordy25519 <[email protected]>

* more efficeint clock and state bit flags check

* vamm uses mm oracle (drift-labs#1747)

* add offset

* working tests

* refactor to use MM oracle as its own type

* remove weird preface

* sdk updates

* bankrun tests all pass

* fix test

* changes and fixes

* widen confidence if mm oracle too diff

* sdk side for confidence adjust

* changelog

* fix lint

* fix cargo tests

* address comments

* add conf check

* remove anchor ix and cache oracle confidence

* only state admin can reenable mm oracle kill switch

* cargo fmt

---------

Co-authored-by: jordy25519 <[email protected]>

* fix tests (drift-labs#1764)

* Nour/move ixs around (drift-labs#1766)

* move around ixs

* remove message

* add devnet oracle crank wallet

* refactored mm oracle

* sdk changes + cargo fmt

* fix tests

* validate price bands with fill fix

* normalize fill within price bands

* add sdk warning

* updated type

* undefined guard so anchor tests pass

* accept vec for update amm and view amm

* adjust test to work with new price bands

* Revert "adjust test to work with new price bands"

This reverts commit ee40ac8.

* remove price bands logic

* add zero ix for mm oracle for reset

* mm oracle improvements (drift-labs#1771)

* v1 safety improvements

* isolate funding from MM oracle

* add cargo tests for amm availability

* change oracle validity log bool to enum

* address comment

---------

Co-authored-by: moosecat <[email protected]>
Co-authored-by: jordy25519 <[email protected]>
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