-
Notifications
You must be signed in to change notification settings - Fork 70
Audit Diff #494
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
Draft
tonylee08
wants to merge
277
commits into
deepbook3.1
Choose a base branch
from
main
base: deepbook3.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Audit Diff #494
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
…pgraded package (#380) * improve env handling to support struct tag for upgraded package * rename handlers * update Sui deps * update docker * update deps after rebase
* add snapshot tests * add test * update deps after rebase
* update move-binding deps * fixup after rebase
* bugfix + logging * fix fmt
* start metrics server * fix fmt
* v2 * add tag
* work * margin_pool skeleton * fix unit tests * add borrow_index * add supply entry optimization * format
* suins mvr updates * fix path
* margin pool helpers * margin pool cleanup * margin pool cleanup * update assert
* margin registry * formatting * risk ratio limit * default risk params * update risk params function fixes
* pool proxy * updated to trading manager * proxy functions * manager check * cleanup * limit deep managers from staking * pool proxy * clenaup * cleanup
* margin registry with deepbook pool * rm * lock * address comments
* Margin pool into temp branch (#414) * margin pool helpers * margin pool cleanup * margin pool cleanup * Margin registry into temp branch (#415) * margin registry * formatting * margin manager * cleanup * formatting and cleanup * basic liquidation rewards, wip * formatting * liquidation reward working concept * cleanup * draft version * helper function restructure * loan default * liquidation rewards * use more accurate calculation of loan repaid * liquidation and pool rewards added * account for liquidation reward when calculating usd amount to repay * margin * basic default functionality * LiquidationEvent update * formatting * rebase updates * refactor based on comments * latest changes * abort liquidation functions * refactor, add events for margin pool * pool liquidation reward event * reformat oracles and functions * same asset repay proportionally * canceling all orders and withdrawing must be done regardless * cleanup * default loop * add constants * update formula * cleanup * move to constants file * increase swap percent * margin registry tests * limit isolated margin * fix max risk ratio formula * new liquidation logic * bug fix * update return to manager info * cleanup * cleanup * refined default logic * test * implement max slippage parameter * cleanup * update tests for risk param changes * update function name * Flexible Liquidation (#424) * working liquidation concept * option updates * flexible liquidation * cleanup * liquidation events * comments * rebase with main * cleanup * move to constants
* enable and disable logic * cleanup * pool configs * basic registration * simplify registry * cleanup * reduce-only * cleanup * update supply cap * cleanup * address comments and cleanup
* basic interest rate model * state update before interest params * protocol spread added * complete protocol spread * cleanup * same index * address comments * checks for max borrow percent
* update margin events for indexer * fix server * update snapshot for loan borrowed * add checkpoint * add packages * new snapshot
* update margin events for indexer * fix server * update snapshot for loan borrowed * add checkpoint * add margin manager endpoint
* authorize margin * tests * lockfile * formatting * margin * cleanup * cleanup * cleanup * cleanup * update comment * tests and cleanup
* add margin manager states endpoint
* Add 7 missing margin events to indexer - Add MaintainerFeesWithdrawn, ProtocolFeesWithdrawn, SupplierCapMinted, SupplyReferralMinted (margin_pool) - Add PauseCapUpdated (margin_registry) - Add ProtocolFeesIncreasedEvent, ReferralFeesClaimedEvent (protocol_fees) - Add event models, handlers, database schemas, and server endpoints - Add database indexes for all new tables - Add tests with checkpoint data for events that exist on testnet - Add script to check event existence across all package versions
* initial liquidation * share liquidation vault * cleanup and formatting * cleanup * cleanup * formatter test for liquidation * read only function fix * protection
* oracle protection * oracle tests * additional protection * oracle * fix tests * cleanup
* deprecated functions * register manager * lockfile * use new function * cleanup * update test name * test
* add margin to default indexer packages * cargo fmt
* github action for testnet deploy * use pin-github-action
* new margin package * read only functions * upgrade
* Add events for P&L calculation Add DepositCollateralEvent. Move deposit logic into deposit_int public package function. Use deposit_int in borrow functions. Update public deposit function to: 1. Receive base and quote oracles; 2. Emit DepositCollateralEvent when either base or quote asset is deposited. Add WithdrawCollateralEvent. Emit WithdrawCollateralEvent on user's base or quote asset withdrawal. Enrich LiquidationEvent with assets, debts and oracle prices data. * Add comments --------- Co-authored-by: bathord <[email protected]>
* tests * tests * cleanup * cleanup * working * formatting * deprecation warning * core tests deprecation warning
* transfer funds * update
* unregister margin manager * test * better tests
* add deepbook_pool_id to server * Refactor deepbook_pool_id handling in margin_manager_created function
* Add config support to DeepbookPoolRegistered - Introduced a new `config` field in the `DeepbookPoolRegistered` struct to store pool configuration. - Updated the event handler to serialize the `config` field into JSON format for database storage. - Modified database schema to include a `config_json` column in the `deepbook_pool_registered` table. - Added migration scripts for adding and removing the `config_json` column. - Updated tests to reflect changes in the data structure and ensure proper functionality. * cargo fmt for reader
* fix deploy action
* Add health and status endpoints to DeepBook Server - Introduced a health check endpoint (`/`) that returns HTTP 200 if the server is running. - Added a status endpoint (`/status`) that provides detailed information about the indexer's health, including checkpoint lag and synchronization status. - Updated the OpenAPI specification to include the new endpoints and their responses. - Enhanced the README with usage examples for the new health and status endpoints. - Implemented a method to fetch watermarks and calculate health metrics for indexer pipelines. * Enhance indexer health status endpoint with customizable thresholds - Added support for custom health thresholds via query parameters (`max_checkpoint_lag` and `max_time_lag_seconds`) in the `/status` endpoint. - Updated OpenAPI specification to reflect new parameters and response fields. - Modified server logic to compute health status based on client-provided thresholds. - Enhanced README with examples for using the new query parameters and updated response structure.
* rate limiter * token bucket approach
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.
No description provided.