Skip to content
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

feat: toggle limit orders on in production #8452

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

woodenfurniture
Copy link
Member

@woodenfurniture woodenfurniture commented Jan 3, 2025

Description

Toggles limit orders on in production. See here for preliminary ops testing:
https://discord.com/channels/554694662431178782/1324596242394644571/1324596246949924944

Issue (if applicable)

closes NA

Risk

High Risk PRs Require 2 approvals

None - this is a placeholder PR.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

Signed off by ops, ops to test in release. See here for preliminary ops testing:
https://discord.com/channels/554694662431178782/1324596242394644571/1324596246949924944

NOTE - this is a completely new feature with minimal eng testing. Although this looks visually similar to spot trades, almost none of the actual logic is shared between this and trades, so treat everything like it's never been tested before and assume everything is broken and full of bugs.

Also note there's likely more surface area to test not listed here.

Input

  • Cant sell native assets (ETH, DAI)
  • Only ETH, Gnosis, Arbitrum chains available
  • Expiry works
  • Asset selection works
  • Account selection works
  • Crypto <> Fiat value toggling works for sell asset amount input
  • Switching assets works (except with native buy asset is selected)
  • Preset limit price % selection works and calcs update
  • Custom limit price % input works and calcs update
  • Toggling limit price asset (buy/sell asset) works and calcs update
  • Shapeshift fee calcs work (i.e >$1000 affiliate fee)
  • Custom receive address input works
  • Gas fee always 0 (CoW swap)
  • Rounding errors when clicking everything like a madman are minimal

Allowance approval

  • Unable to approve allowance for USDT warning when USDT allowance >0 but insufficient for current order
  • Allowance approval doesnt appear when allowance is already sufficient
  • Allowance approval appears when allowance is not sufficient
  • Allowance gas fee correct (ish?)
  • Transaction link for allowance approval ("view transaction on chain") works

Confirmation

  • (IMPORTANT! ⚠️ ) Amounts, limit price, expir correct per user input
  • Clicking "place order" actually places the order and it appears in the "open orders" list when you click "view orders"

Orders (IMPORTANT! ⚠️ )

  • Placed orders actually have the correct values per the confirmed values when order placed in our app
  • Orders placed at market price fill quickly
  • Orders placed at insane limit dont fill
  • Orders placed with specific limit fill when limit reached
  • Orders placed to custom receive address actually fill to that address
  • Orders placed from/to a specific account # actually fill from/to those specific accounts

Open Orders list

  • Empty list shows "no open orders yet"
  • Values on orders are correct
  • Open orders appear with "open" tag with correct details
  • Clicking "cancel" on an order and confirming actually cancels the order and moves it into the "order history"

Order History List

  • Empty list shows "no order history yet"
  • Values on orders are correct
  • Canceled orders have "canceled" tag
  • Expired orders have "expired" tag
  • Fulfilled orders have "fulfilled" tag
  • Fulfilled orders have correct % filled bar

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

@twblack88
Copy link
Contributor

treat everything like it's never been tested before and assume everything is broken and full of bugs.

Humility is the key to greatness.

@woodenfurniture woodenfurniture changed the title feat: limit orders feat: toggle limit orders on in production Jan 10, 2025
@woodenfurniture woodenfurniture marked this pull request as ready for review January 10, 2025 01:11
@woodenfurniture woodenfurniture requested a review from a team as a code owner January 10, 2025 01:11
Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

Let's go!

@0xApotheosis 0xApotheosis merged commit 231689b into develop Jan 10, 2025
3 checks passed
@0xApotheosis 0xApotheosis deleted the limit-orders-release-2 branch January 10, 2025 01:21
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