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

fix: check if orderer has sufficient offer coin balances #299

Merged
merged 2 commits into from
May 3, 2022

Conversation

hallazzang
Copy link
Contributor

Description

Important note

This fix doesn't indicate that we didn't have such important check before.
This PR just adds another check that prevents orderers to specify more offer coins than they have in order msgs.

Tasks

  • Add check for MsgLimitOrder
  • Add check for MsgMarketOrder
  • Fix inconsistent tx event of MarketOrder.

Note that there already exists such check.
This commit fixes the problem when the orderer has less balances
than the offer coin, but has enough balances to make the order.
Since this fix, orders cannot make an order with too much offer coin.
@hallazzang hallazzang added bug Something isn't working x/liquidity c-sync labels Apr 22, 2022
@hallazzang hallazzang self-assigned this Apr 22, 2022
@dongsam dongsam merged commit 909cf4f into main May 3, 2022
@dongsam dongsam removed the c-sync label May 3, 2022
@dongsam dongsam added this to the v2.0 milestone May 4, 2022
dongsam pushed a commit that referenced this pull request Aug 31, 2022
fix: optimize CancelAllOrders gas usage, fix offer coin checking #296 #299
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working x/liquidity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants