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: Add DirectLiquidationFee and uToken liquidation option #1222

Merged
merged 42 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4f23a58
draft
toteki Aug 7, 2022
0d4cbdf
cl++
toteki Aug 7, 2022
4eb78ba
--
toteki Aug 7, 2022
9f124b4
--
toteki Aug 7, 2022
abade2b
++
toteki Aug 7, 2022
fdaec95
--
toteki Aug 7, 2022
29309af
--
toteki Aug 7, 2022
32ae949
--
toteki Aug 7, 2022
9df396e
test++
toteki Aug 7, 2022
2257744
++
toteki Aug 7, 2022
84c4aac
stricter ToTokenDenom
toteki Aug 8, 2022
1858416
--
toteki Aug 8, 2022
1723306
--
toteki Aug 8, 2022
5362356
++
toteki Aug 8, 2022
8444aab
--
toteki Aug 8, 2022
1b79c63
++
toteki Aug 8, 2022
c15e4d6
--
toteki Aug 8, 2022
f3b6d78
--
toteki Aug 8, 2022
b3964eb
++
toteki Aug 8, 2022
93ed184
++
toteki Aug 8, 2022
1879395
GetSupply blacklisted behavior
toteki Aug 8, 2022
6460bbb
--
toteki Aug 8, 2022
5e406d9
--
toteki Aug 8, 2022
886f6ee
Withdraw blacklisted behavior
toteki Aug 8, 2022
b969fd0
remaining todos
toteki Aug 8, 2022
64cc8f1
improve error message
toteki Aug 8, 2022
743f0b1
fix ops tests
toteki Aug 8, 2022
012208c
++
toteki Aug 8, 2022
f693c13
TODO++
toteki Aug 8, 2022
ad8b3a6
Merge branch 'main' into adam/directliquidation
toteki Aug 9, 2022
8f97a11
Merge branch 'main' into adam/directliquidation
toteki Aug 10, 2022
87f6468
lint++
toteki Aug 10, 2022
3dc56cc
Merge branch 'main' into adam/directliquidation
adamewozniak Aug 10, 2022
6dcf6fc
suggestion++
toteki Aug 10, 2022
fa86182
suggestion++
toteki Aug 10, 2022
4d4ee85
suggestion++
toteki Aug 10, 2022
65a25e4
suggestion++
toteki Aug 10, 2022
5262362
suggestion++
toteki Aug 10, 2022
39d7565
lint++
toteki Aug 10, 2022
9298521
clarify error message
toteki Aug 10, 2022
53b8099
Merge branch 'main' into adam/directliquidation
toteki Aug 10, 2022
88d2947
make proto-gen and make proto-swagger-gen
toteki Aug 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- [1140](https://github.com/umee-network/umee/pull/1140) Rename MarketSize query to TotalSuppliedValue, and TokenMarketSize to TotalSupplied.
- [1188](https://github.com/umee-network/umee/pull/1188) Remove all individual queries which duplicate market_summary fields.
- [1199](https://github.com/umee-network/umee/pull/1199) Move all queries which require address input (e.g. `supplied`, `collateral_value`, `borrow_limit`) into aggregate queries `acccount_summary` or `account_balances`.
- [1222](https://github.com/umee-network/umee/pull/1222) Add leverage parameter DirectLiquidationFee.

### Features

Expand All @@ -79,6 +80,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- [1203](https://github.com/umee-network/umee/pull/1203) Add Swagger docs.
- [1212](https://github.com/umee-network/umee/pull/1212) Add `util/checkers` utility package providing common check / validation functions.
- [1220](https://github.com/umee-network/umee/pull/1220) Submit oracle prevotes / vote txs via the CLI.
- [1222](https://github.com/umee-network/umee/pull/1222) Liquidation reward_denom can now be either token or uToken
toteki marked this conversation as resolved.
Show resolved Hide resolved

### Improvements

Expand Down
8 changes: 8 additions & 0 deletions proto/umee/leverage/v1/leverage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ message Params {
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"small_liquidation_size\""
];
// Direct Liquidation Fee is the reduction in liquidation incentive experienced
// by liquidators who choose to receive base assets instead of uTokens as
// liquidation rewards.
string direct_liquidation_fee = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"direct_liquidation_fee\""
];
}

// Token defines a token, along with its metadata and parameters, in the Umee
Expand Down
7 changes: 4 additions & 3 deletions proto/umee/leverage/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ message MsgLiquidate {
// Repayment is the maximum amount of base tokens that the liquidator is willing
// to repay.
cosmos.base.v1beta1.Coin repayment = 3 [(gogoproto.nullable) = false];
// RewardDenom is the base token denom that the liquidator is willing to accept
// as a liquidation reward. The uToken equivalent of any base token rewards
// will be taken from the borrower's collateral.
// RewardDenom is the denom that the liquidator will receive as a liquidation reward.
// If it is a uToken, the liquidator will receive uTokens from the borrower's
// collateral. If it is a base token, the uTokens will be redeemed directly at
// a reduced Liquidation Incentive, and the liquidator will receive base tokens.
string reward_denom = 4;
}

Expand Down
Loading