-
Notifications
You must be signed in to change notification settings - Fork 8
Audit 2 Fixes #160
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
Audit 2 Fixes #160
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update the conditions for quote (mint and redeem) after talking with Soteria todo: add tests to try minting/redeeming beyond the adjusted_unreliazed_pnl (SHOULD FAIL) todo: update tests to verify that the opration should pass or not before running the test (if there isn't enough unrealized PnL to do an operation the test should fail properly) * added test coverage * fixes - add require for minting_disabled in quote_mint - change update_onchain for quote_mint to add redeemable_minted_amount * Update @lamine feedback - Don't double dip on the quote mint amount * Add support + tests for quote_mint_redeem_soft_cap * fix tests Co-authored-by: Max Planck <[email protected]>
* fixed comment about bps * fixed naming * Update mango_depository.rs Eng Co-authored-by: acammm <[email protected]>
alg747
reviewed
Jun 20, 2022
programs/uxd/src/instructions/mango_dex/quote_mint_with_mango_depository.rs
Show resolved
Hide resolved
* Add check for the quote * Update IDL + tests
alg747
approved these changes
Jun 21, 2022
acamill
added a commit
that referenced
this pull request
Jun 30, 2022
* Acammm/anchor 0.22.0 (#126) * - ProgramResult -> Result<()> * Use error! * use error from anchor * Add Check for Unchecked accountsInfo * WIP trying to make it work but seems that devnet is having issues. Pausing for now * feat: accounting suite for accounting tests (#125) * feat: accounting suite for accounting tests * added more checks * working * changed back to test_development * Edit rebase error * Update latest uxd-client * Yarn lock * resynchronise a random dev key to enable the replace script * bump version * Acammm/ppov2 (place_perp_order_v2) (#131) * Use new anchor-comp package for mango CPI * remove old CPI helpers * Safe changes (w/o mint/redeem/rebalance) * Use place_perp_order_v2 and simplify code * Working * Update tests (most logic been offloaded to Mango) * Remove uneeded accounts + explicit ATA checks * allow 100% slippage * Improve computing for tests * Slippage tweaks - Slippage u32 -> u16 - 0 slippage accepted again (was disabled due to previous code but that's been refactored) * Fix comments + mango 3.4.1 * Acam/enforce limit price (#132) * Update mango 3.4.1 * fix comment * Enforce limit price through providing it from front end * Cleanup * Ken comments * idl * json idl * Update latest client (was locally linked) * Add 2.3.1 to changelog * Cleanup post merge * Update yarn lock * Acam/enhancement wo 01 (#144) * Add zo-abi WIP zo Stash pop stash pop WIP Cpi almost there. More updates Currently doesn't work with yarn so kinda annoying, let's wait for them to fix this as discussed in the TG Toward cpi support.. Toward cpi support.. almost there Update reserved padding Update IDL and client version (still using yarn link) Fixes Working Init zo deposiroty + tests Init Control account in the program for simplicity Mint WIP Cargo audit fix Working register with OO account creationg Mint issue with CPI Update client * wip ZO - issue with constraint. Will add anchor latest for more info to debug * Deposit mint * Redeem and mint - Computing issue. Breakpoiint will transit to 0copy * Redeem withdraw and controller as zero_copy Require! * Update PR feedback * Use latest client (private) Use accountLoader for mango depository * Fixing test slowly... * More test updates and fixes * Update latest 01 version * Fixed tests * ZO Cleanup (Make a branc without any ZO change for clarity) * Updated idl * add the mistakenly erased bank keypair * Fix memory layout of accounts * Use the oss version of the client and ditch the private one * simplified assertion (#147) * Chore/fix tests (#149) * Use udx-protocol on NPM instead of private gh version * Misc * Fixed mint * Working integration tests * Offering to Clippy gods + fmt * New program ID + resident program for CI * Update CI * npm ci Co-authored-by: Bamboozelino <memail> * Usdc minting/redeeming of the PnL (#148) * first * instructions (#139) * instructions * comments * api * rename * math * start on tests * wip tests * require * fixes with accounts and merge * quote_redeem (#140) * quote_redeem * comments * fixed comments and mango check * a * poggers * latest * save * nothing * save * math fixes * save * Invalid Blockhash * for remote version * Feature/positive minting and more (#151) * quote_redeem * comments * fixed comments and mango check * a * poggers * latest * save * nothing * save * math fixes * save * Fix memory layout of accounts * Use the oss version of the client and ditch the private one * Invalid Blockhash * for remote version * simplified assertion (#147) * save changes * save * Chore/fix tests (#149) * Use udx-protocol on NPM instead of private gh version * Misc * Fixed mint * Working integration tests * Offering to Clippy gods + fmt * New program ID + resident program for CI * Update CI * npm ci Co-authored-by: Bamboozelino <memail> * committed * save * progress Co-authored-by: Acammm <[email protected]> Co-authored-by: Ken C <[email protected]> Co-authored-by: acammm <[email protected]> * Work with max * misc - added test to ensure user has UXD - formatting - account mutability for mango * Added test quote test to CI * - fix quoteMintAndRedeemSuite switch cases - fix quote mint and redeem test asserts - changed equals to close_to * testing improvements - adding accounting tests for quoteMint and quoteRedeem - incorporate accounting tests into test suite * - small test fix * Test working Co-authored-by: Max Planck <[email protected]> Co-authored-by: Max Planck <[email protected]> Co-authored-by: Ken C <[email protected]> Co-authored-by: Bamboozelino <memail> * Upgrade CI * Cleanup + test fixes * Update package.json and lock * Update client version to beta next * fix import * Update CI * Update CI * Mango explorer replacement * Update CI * Update Readme * Update CI * Use older solana version for more successful deployments * Update CI * added ix to disable minting (#152) * added new ix * minor * updated idl * updated naming * updated idl * added ix to disable minting - integration test (#153) * added integration test * updated naming * Update CI * fmt + ci * Update uxd-client to beta3 * Update CI * Disable MM in CI must be ran from the side now update CI * Add back the program ID to the IDL * Cleanup * Swap program ID in the constants * CI fix + readme * Add missing user ata * fix ci * Fix ci transfers * Fix quote mint redeem * Fixes * Add log for rebalancing lite amount * Fix rebalancing CI * Fix quote mint/redeem * Logs * Fix CI * Audit 2 Fixes (#160) * updated cargo.toml (#158) * fix the accounting for the redeem_from_mango_depository ix (#157) * Update the conditions for quote (mint and redeem) (#162) * Update the conditions for quote (mint and redeem) after talking with Soteria todo: add tests to try minting/redeeming beyond the adjusted_unreliazed_pnl (SHOULD FAIL) todo: update tests to verify that the opration should pass or not before running the test (if there isn't enough unrealized PnL to do an operation the test should fail properly) * added test coverage * fixes - add require for minting_disabled in quote_mint - change update_onchain for quote_mint to add redeemable_minted_amount * Update @lamine feedback - Don't double dip on the quote mint amount * Add support + tests for quote_mint_redeem_soft_cap * fix tests Co-authored-by: Max Planck <[email protected]> * audit 2 fixed: info6 (naming and minor fix) (#163) * fixed comment about bps * fixed naming * Update mango_depository.rs Eng Co-authored-by: acammm <[email protected]> * Fee rounding issue, floor when negative to keep the same behaviour (#164) * Fee rounding issue, floor when negative to keep the same behavior * Update order_delta.rs * Coherent operations for accounting (#166) * Fix/info 5 checks quotemint (#167) * Add check for the quote * Update IDL + tests * updated test naming (#165) Co-authored-by: Ken C <[email protected]> Co-authored-by: Max Planck <[email protected]> Co-authored-by: Max Planck <[email protected]> * Update mango version to use v3.4.6 + use latest anchor-comp (0.2.3) * fixed test (#171) * fix e2e tests * dev state for cargo.toml * FMT Co-authored-by: Max Planck <[email protected]> Co-authored-by: Ken C <[email protected]> Co-authored-by: Max Planck <[email protected]> Co-authored-by: Bamboozelino <memail>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Received audit feedback, here is the discussion https://www.notion.so/uxdprotocol/Audit-Feedback-3ace4fca033440419b202c329223636d