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

Liquidation #1955

Merged
merged 16 commits into from
Mar 30, 2022
Merged

Liquidation #1955

merged 16 commits into from
Mar 30, 2022

Conversation

ukby1234
Copy link
Contributor

No description provided.

@ukby1234 ukby1234 requested review from xlc and wangjj9219 March 13, 2022 00:19
@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1955 (9b57d81) into master (5a8f381) will decrease coverage by 0.04%.
The diff coverage is 87.76%.

@@            Coverage Diff             @@
##           master    #1955      +/-   ##
==========================================
- Coverage   86.09%   86.05%   -0.05%     
==========================================
  Files          99       99              
  Lines       20003    19809     -194     
==========================================
- Hits        17221    17046     -175     
+ Misses       2782     2763      -19     
Impacted Files Coverage Δ
modules/support/src/dex.rs 28.57% <ø> (ø)
modules/support/src/honzon.rs 0.00% <ø> (ø)
modules/support/src/mocks.rs 57.89% <0.00%> (-13.08%) ⬇️
primitives/src/unchecked_extrinsic.rs 0.00% <ø> (ø)
modules/auction-manager/src/lib.rs 76.49% <50.00%> (-0.38%) ⬇️
modules/cdp-engine/src/lib.rs 74.76% <66.66%> (-0.20%) ⬇️
modules/cdp-treasury/src/lib.rs 85.92% <88.23%> (+0.20%) ⬆️
modules/cdp-engine/src/tests.rs 100.00% <100.00%> (+0.18%) ⬆️
modules/cdp-treasury/src/tests.rs 100.00% <100.00%> (ø)
modules/dex/src/tests.rs 100.00% <100.00%> (+0.36%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a8f381...9b57d81. Read the comment docs.

@wangjj9219
Copy link
Member

wangjj9219 commented Mar 14, 2022

For StableAsset, no matter what the para limit is, swap always on ExactSupply. There may be excess overswap amount, and next it needs to be processed or not. I add a commit to handle it.

Some test cases are missing and need to be filled

@ukby1234
Copy link
Contributor Author

For StableAsset, no matter what the para limit is, swap always on ExactSupply. There may be excess overswap amount, and next it needs to be processed or not. I add a commit to handle it.

Some test cases are missing and need to be filled

Tests are in cdp-treasury and I think I covered most cases. However, still not sure what's going in with the evm tests.

@ukby1234
Copy link
Contributor Author

Tests fixed.

@xlc
Copy link
Member

xlc commented Mar 24, 2022

Can you merge master and why failed swap_collateral_to_stable will modify storage?

@ukby1234
Copy link
Contributor Author

ukby1234 commented Mar 25, 2022

swap_collateral_to_stable

I didn't test on the pallet calls but the module function, which doesn't use the transactional macro.

@ukby1234
Copy link
Contributor Author

master merged

@wangjj9219
Copy link
Member

wangjj9219 commented Mar 25, 2022

swap_collateral_to_stable

I didn't test on the pallet calls but the module function, which doesn't use the transactional macro.

Because swap_collateral_to_stable may be called by ended auction, it's not pallet calls, need to add macro transactional for swap_collateral_to_stable if failed will modify storage

@wangjj9219
Copy link
Member

LGTM

@ukby1234 ukby1234 enabled auto-merge (squash) March 30, 2022 00:52
@ukby1234 ukby1234 merged commit 1916c15 into master Mar 30, 2022
@ukby1234 ukby1234 deleted the liquidation branch March 30, 2022 00:52
syan095 pushed a commit that referenced this pull request Apr 8, 2022
…ts-for-currencies

* origin/master: (362 commits)
  Skip idle_scheduler Calls When Not Producing blocks  (#1721)
  config more homa subaccounts for Karura (#2004)
  rm wt storage (#1984)
  Update construct_runtime's syntax (#2000)
  polkadot v0.9.18 (#1988)
  be srtool compatible (#2021)
  Update README.md (#2022)
  update precompile weights (#2020)
  Mandala supports PricingPegged for taiKSM (#2015)
  remove unneeded param (#2014)
  fix srtool (#2013)
  update precompile gas_limit (#2007)
  fix verify bootnodes script
  Bump minimist from 1.2.5 to 1.2.6 in /ts-tests (#2008)
  Bump (#2005)
  add NativeAssetId to asset registry (#1993)
  connect earning and incentives (#1995)
  Liquidation (#1955)
  Improvement/orml oracle (#1998)
  Mock xcm (#1977)
  ...

# Conflicts:
#	modules/currencies/src/lib.rs
#	predeploy-contracts
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.

4 participants