Skip to content

vault liquidation for under collateralization #91#100

Open
hashmesan wants to merge 5 commits intoharmony-one:mainfrom
hashmesan:undercollateral
Open

vault liquidation for under collateralization #91#100
hashmesan wants to merge 5 commits intoharmony-one:mainfrom
hashmesan:undercollateral

Conversation

@hashmesan
Copy link

No description provided.


// require(oldVault.btcPublicKeyX != 0, "Vault does not exist");
// require(newVault.btcPublicKeyX != 0, "Vault does not exist");
// require(oldVault.btcPublicKeyX != 0, "VDNE");
Copy link
Author

Choose a reason for hiding this comment

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

saves a few bytes

@gupadhyaya
Copy link
Contributor

@hashmesan could you resolve the conflict? also, the liquidateVault function fully liquidates, not just 2.5% penalty. may need to add a new function or update the existing to take liquidation percentage as parameter? further, the liquidateVault has could of TODOs and requires some unit testing, if you could add them along the way, it will be nice.

@hashmesan
Copy link
Author

I think i forgot to check in the 2.5% penalty after i switched branch.

hashmesan added 3 commits May 2, 2022 12:30
…perly handle used/and balance change.;

test case validate transfer of collateral and issues
…ealthy collateral levels

close to contract size issue.
@hashmesan
Copy link
Author

Merged with main.

@gupadhyaya
Copy link
Contributor

@hashmesan can you reiterate the design here? i thought the vault that has gone under collateral will be penalized 2.5%. however the code seem to indicate that 2.5% is paid to the reporter and the vault is fully liquidated? could you clarify?

@gupadhyaya gupadhyaya requested review from gupadhyaya and potvik May 30, 2022 18:19
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.

2 participants