harmony-one / onebtc

Trustless Bitcoin on Harmony
Apache License 2.0
33 stars 13 forks source link

vault liquidation for under collateralization #91 #100

Open hashmesan opened 2 years ago

gupadhyaya commented 2 years ago

@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 commented 2 years ago

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

hashmesan commented 2 years ago

Merged with main.

gupadhyaya commented 2 years ago

@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?