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 #211

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Liquidation #211

merged 6 commits into from
Nov 17, 2023

Conversation

dulguun-staderlabs
Copy link
Contributor

No description provided.

@dulguun-staderlabs dulguun-staderlabs changed the base branch from mainnet_V0 to feat/SD_Utility_Pool November 7, 2023 12:08
@dulguun-staderlabs dulguun-staderlabs self-assigned this Nov 7, 2023
@dulguun-staderlabs dulguun-staderlabs marked this pull request as ready for review November 17, 2023 12:10
@dulguun-staderlabs dulguun-staderlabs merged commit 28e52c7 into feat/SD_Utility_Pool Nov 17, 2023
0 of 3 checks passed
@dulguun-staderlabs dulguun-staderlabs deleted the feat/liquidation branch November 17, 2023 12:10
sanjay-staderlabs added a commit that referenced this pull request Apr 1, 2024
* basic utility pool structure

* sdCollateral intergration with utilityPool

* Rename SDx.sol to SDX.sol

* terminology change

* SD Incentive Controller (#210)

* Initial code

* Change terminologies

* IncentiveController->SDIncentiveController

* Run prettier

* Use block number and read from staderConfig

* utilize flow

* dwlwgator withdraw flow

* seperate function in node registry to utilze SD

* view function to get latest data

* Liquidation (#211)

* User struct

* mapping

* calculation

* liquidationCall initial

* Add riskconfig

* Add back comments

* include pause functionality

* repay flow changes and comments

* Operator reward integration (#213)

* init

* Introduce owedAmount

* Update OperatorRewardsCollector.sol

* Add PoolUtils

* claimLiquidation

* Fix compile

* Fix claimFor

* Add liquidator data

* review fixes

* deposit SD reward as collateral changes

* Fix compilation

* Change function orders

* Fix review

* Add exit operator

* deposit SD reward as collateral flow changes

* Fix review

* Use operatorUtilizedSDBalance

* custom error message

* deploy script for utility pool

* Updates on incentiveController

* Add docs and checkers

* fix claim function time cool down logic

* Add withdrawable

* rename function and variables

* Add non-existent liquidation check

* fix sdCollateral withdraw function

* Fix claim logic

* refactor slash SD

* whenNotPaused modifier

* Claim rewards during requestWithdraw

* review fixes

* change in request withdraw logic

* Review fix

* Introduce weth

* introducing withdrawOnBehalf in SDCollateral

* Transfer back utilized SD

* add getter in interface

* incentiveController and addValidatorKey fix

* test case for utilze and delegate flow

* referral Id for adding validator keys

* sdCollateral test cases

* SD token decimal adjust

* Multiply by DECIMAL

* Liquidation test

* Only manager role for certain functions

* test fix

* Fix weth issue

* Small fix and unit test

* Minimum reward amount

* Claim available amount

* Lint test

* Add start incentive later test

* SDP-06 fix

* SDP-11 fix

* Fix SDP-03

* SDP-02 fix

* push back SDP-03 fix

* SDP-07 fix

* SDP-17 fix

* Take initial _delegate into consideration

* whenNotPaused test cases

* comment fix

* Expand liquidation call tests

* Update SDIncentiveController.t.sol

* Separate claim and claimLiquidation

* Add test

* Quick fix

* Remove claimFor

* Fix test

* Lint and add tests

* small change claim

* Add emit tests

* Refactor test

* add emit test

* claim after liquidation

* change initial delegate amount to 1 SD

* Initialise risk config at initialize

* Internal function prefix with _

* renaming change

* Collateral in ETH and expose liquidationIndexByOperator

* rounding up interest in ETH

* reward collector test fixed

* foundry deploy script

* minimum withdraw and delegate limits

* rounding up cTokenShare in requestWithdrawWithSD call

* fix utilityPool with min delegate amount

* add clearUtilizedPosition function

* add totalUtilizedSD getter in interface

* clearing utilized position using withdrawOnBehalf

* optimize _transferBackUtilizedSD

* handling of edge cases when nonTerminalKeys are 0

* update interface

* add utilityPool deploy script

* introduce claimWithAmount function in rewardCollector

* fix: only call withdraw if balance of nodeELVault greater than 0

* updating operatorRewardsCollector Interface

* adding third party license file

* fix formatting of README

* add title in License file

* formatting the title of License file

---------

Co-authored-by: Sanjay Yadav <[email protected]>
Co-authored-by: Dulguun <[email protected]>
jac18281828 pushed a commit that referenced this pull request Apr 18, 2024
* basic utility pool structure

* sdCollateral intergration with utilityPool

* Rename SDx.sol to SDX.sol

* terminology change

* SD Incentive Controller (#210)

* Initial code

* Change terminologies

* IncentiveController->SDIncentiveController

* Run prettier

* Use block number and read from staderConfig

* utilize flow

* dwlwgator withdraw flow

* seperate function in node registry to utilze SD

* view function to get latest data

* Liquidation (#211)

* User struct

* mapping

* calculation

* liquidationCall initial

* Add riskconfig

* Add back comments

* include pause functionality

* repay flow changes and comments

* Operator reward integration (#213)

* init

* Introduce owedAmount

* Update OperatorRewardsCollector.sol

* Add PoolUtils

* claimLiquidation

* Fix compile

* Fix claimFor

* Add liquidator data

* review fixes

* deposit SD reward as collateral changes

* Fix compilation

* Change function orders

* Fix review

* Add exit operator

* deposit SD reward as collateral flow changes

* Fix review

* Use operatorUtilizedSDBalance

* custom error message

* deploy script for utility pool

* Updates on incentiveController

* Add docs and checkers

* fix claim function time cool down logic

* Add withdrawable

* rename function and variables

* Add non-existent liquidation check

* fix sdCollateral withdraw function

* Fix claim logic

* refactor slash SD

* whenNotPaused modifier

* Claim rewards during requestWithdraw

* review fixes

* change in request withdraw logic

* Review fix

* Introduce weth

* introducing withdrawOnBehalf in SDCollateral

* Transfer back utilized SD

* add getter in interface

* incentiveController and addValidatorKey fix

* test case for utilze and delegate flow

* referral Id for adding validator keys

* sdCollateral test cases

* SD token decimal adjust

* Multiply by DECIMAL

* Liquidation test

* Only manager role for certain functions

* test fix

* Fix weth issue

* Small fix and unit test

* Minimum reward amount

* Claim available amount

* Lint test

* Add start incentive later test

* SDP-06 fix

* SDP-11 fix

* Fix SDP-03

* SDP-02 fix

* push back SDP-03 fix

* SDP-07 fix

* SDP-17 fix

* Take initial _delegate into consideration

* whenNotPaused test cases

* comment fix

* Expand liquidation call tests

* Update SDIncentiveController.t.sol

* Separate claim and claimLiquidation

* Add test

* Quick fix

* Remove claimFor

* Fix test

* Lint and add tests

* small change claim

* Add emit tests

* Refactor test

* add emit test

* claim after liquidation

* change initial delegate amount to 1 SD

* Initialise risk config at initialize

* Internal function prefix with _

* renaming change

* Collateral in ETH and expose liquidationIndexByOperator

* rounding up interest in ETH

* reward collector test fixed

* foundry deploy script

* minimum withdraw and delegate limits

* rounding up cTokenShare in requestWithdrawWithSD call

* fix utilityPool with min delegate amount

* add clearUtilizedPosition function

* add totalUtilizedSD getter in interface

* clearing utilized position using withdrawOnBehalf

* optimize _transferBackUtilizedSD

* handling of edge cases when nonTerminalKeys are 0

* update interface

* add utilityPool deploy script

* introduce claimWithAmount function in rewardCollector

* fix: only call withdraw if balance of nodeELVault greater than 0

* updating operatorRewardsCollector Interface

* adding third party license file

* fix formatting of README

* add title in License file

* formatting the title of License file

---------

Co-authored-by: Sanjay Yadav <[email protected]>
Co-authored-by: Dulguun <[email protected]>
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.

1 participant