-
Notifications
You must be signed in to change notification settings - Fork 170
Set referred user tier to 2 instead of 1, to preserve previous behavior:w #3200
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
Open
jusbar23
wants to merge
20
commits into
main
Choose a base branch
from
fix_upgrade
base: main
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.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
24add24
[CT-1365] Safely Handle Exceptions to TWAP Suborders (backport #3039)…
mergify[bot] e69ea3d
[CT-1361] Add Support for TWAP Events in the Indexer (backport #2815)…
mergify[bot] d1effa6
Create new instance for fee calculation (backport #3051) (#3053)
mergify[bot] 3b0e414
Update err to log (backport #3056) (#3057)
mergify[bot] 0e878fa
upgrade cometbft and v9.1 (backport #3082) (#3084)
mergify[bot] fc042e1
TEMPORARY FIX: SKIP ALL LIQUIDATIONS FOR CLOB PAIR 181 (backport #313…
mergify[bot] eab3f04
upgrade cosmos-sdk and cometbft for security patch GHSA-hrhf-2vcr-ghc…
mergify[bot] 41424eb
Revert "TEMPORARY FIX: SKIP ALL LIQUIDATIONS FOR CLOB PAIR 181 (#3137…
mergify[bot] 03a1625
Transfer Insurance Fund Payment Before Subaccount Update + e2e test (…
mergify[bot] df0f3a2
v9.3 upgrade (backport #3156) (#3157)
mergify[bot] bf7418c
fix v9.3 upgrade handler setup (backport #3159) (#3160)
mergify[bot] 2bca3bc
Create governance messages for sliding affiliate scheme (backport #30…
mergify[bot] fdaa144
Rename proto fields to be a bit more clear (#3112) (#3178)
jusbar23 418ce42
Retroactive pr (backport #3033) (#3034)
mergify[bot] da70b32
Change to warn instead of error for invalid ORRS (backport #3036) (#3…
mergify[bot] 8928b2a
Change `insert *` and `update *` to declaring specific columns (backp…
mergify[bot] 3e9b8ac
Dont attribute new revenue if user exceeds 30d max volume and depreca…
jusbar23 64ca450
Integrate commission and overrides to fee tier calculation (Backport)…
jusbar23 d6fa308
9.4 update (backport #3166) (#3172)
mergify[bot] f69ddbc
Set referree tier to 2 instead of 1
jusbar23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
71 changes: 71 additions & 0 deletions
71
...db/migrations/migration_files/20250423144330_add_twap_fields_to_orders_and_fills_table.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| import * as Knex from 'knex'; | ||
|
|
||
| import { formatAlterTableEnumSql } from '../helpers'; | ||
|
|
||
| export async function up(knex: Knex): Promise<void> { | ||
| await knex.schema.alterTable('orders', (table) => { | ||
| table.string('duration').nullable(); | ||
| table.string('interval').nullable(); | ||
| table.string('priceTolerance').nullable(); | ||
| }); | ||
|
|
||
| await knex.raw(formatAlterTableEnumSql( | ||
| 'orders', | ||
| 'type', | ||
| [ | ||
| 'LIMIT', | ||
| 'MARKET', | ||
| 'STOP_LIMIT', | ||
| 'STOP_MARKET', | ||
| 'TRAILING_STOP', | ||
| 'TAKE_PROFIT', | ||
| 'TAKE_PROFIT_MARKET', | ||
| 'LIQUIDATED', | ||
| 'LIQUIDATION', | ||
| 'HARD_TRADE', | ||
| 'FAILED_HARD_TRADE', | ||
| 'TRANSFER_PLACEHOLDER', | ||
| 'TWAP', | ||
| 'TWAP_SUBORDER', | ||
| ], | ||
| )); | ||
|
|
||
| await knex.raw(formatAlterTableEnumSql( | ||
| 'fills', | ||
| 'type', | ||
| ['LIMIT', 'LIQUIDATED', 'LIQUIDATION', 'DELEVERAGED', 'OFFSETTING', 'TWAP_SUBORDER'], | ||
| )); | ||
| } | ||
|
|
||
| export async function down(knex: Knex): Promise<void> { | ||
| await knex.schema.alterTable('orders', (table) => { | ||
| table.dropColumn('duration'); | ||
| table.dropColumn('interval'); | ||
| table.dropColumn('priceTolerance'); | ||
| }); | ||
|
|
||
| await knex.raw(formatAlterTableEnumSql( | ||
| 'orders', | ||
| 'type', | ||
| [ | ||
| 'LIMIT', | ||
| 'MARKET', | ||
| 'STOP_LIMIT', | ||
| 'STOP_MARKET', | ||
| 'TRAILING_STOP', | ||
| 'TAKE_PROFIT', | ||
| 'TAKE_PROFIT_MARKET', | ||
| 'LIQUIDATED', | ||
| 'LIQUIDATION', | ||
| 'HARD_TRADE', | ||
| 'FAILED_HARD_TRADE', | ||
| 'TRANSFER_PLACEHOLDER', | ||
| ], | ||
| )); | ||
|
|
||
| await knex.raw(formatAlterTableEnumSql( | ||
| 'fills', | ||
| 'type', | ||
| ['LIMIT', 'LIQUIDATED', 'LIQUIDATION', 'DELEVERAGED', 'OFFSETTING'], | ||
| )); | ||
| } |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Make orderFlag explicit; audit call sites.
Defaulting orderFlag to 32 (CONDITIONAL) can misclassify orders if callers forget to pass the flag. Prefer making it required or validating non-conditional flags.
Search for callers that omit the second param:
If any exist, thread through the real orderFlags.
🏁 Script executed:
Length of output: 2804
Let me expand the search to check if production code (non-test files) also has this pattern:Now let me search for production code calls only:
🏁 Script executed:
Length of output: 148
Let me try a broader search approach:
🏁 Script executed:
Length of output: 1488
Let me examine the context around these production call sites to determine if they have access to orderFlag:
🏁 Script executed:
Length of output: 147
Let me find the correct file paths:
🏁 Script executed:
Length of output: 170
Let me fix the search syntax:
🏁 Script executed:
Length of output: 107
Now let me examine the context around these call sites:
🏁 Script executed:
Length of output: 2556
Thread actual orderFlags through call sites; don't rely on default.
Found 2 production call sites that omit the
orderFlagparameter despite having access to the actual orderFlags:indexer/services/vulcan/src/handlers/order-remove-handler.tsline 689: Should passredisOrder.order!.orderId!.orderFlagsindexer/packages/kafka/src/websocket-helper.tsline 75: Should passredisOrder.order!.orderId!.orderFlagsBoth currently use the default 32 (CONDITIONAL), which can misclassify orders. Update these calls to pass the actual orderFlags value as the second argument.
🤖 Prompt for AI Agents