Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.58 KB

YPP-0050.md

File metadata and controls

37 lines (28 loc) · 1.58 KB

Proposal

Deploy a HealerModule to the Ladle that allows any user to add collateral or repay debt to any vault.

Background

To be used with the Mero Finance integration. The YieldHandler used by Mero allows for collateral top-up actions for vaults approaching liquidation. The HealerModule adds the capacity for this to be accomplished.

Details

The proposal includes two mainnet executions...

  1. Deploying the HealerModule using this script. The HealerModule takes the Cauldron and WETH addresses as constructor arguments.
  2. Add the HealerModule to the Ladle using this script.

Testing

The testing is done on this test contract which uses a mainnet fork

$ forge test -c contracts/test/modules/
[⠊] Compiling...
[⠘] Compiling 28 files with 0.8.15
[⠒] Solc 0.8.15 finished in 1.75s
Compiler run successful

Running 3 tests for contracts/test/modules/HealerModule.t.sol:HealerModuleTest
[PASS] testCannotAddDebt() (gas: 24595)
Logs:
  Cannot add to debt

[PASS] testCannotRemoveCollateral() (gas: 24558)
Logs:
  Cannot remove collateral

[PASS] testHeal() (gas: 606394)
Logs:
  Can add collateral and/or repay debt to a given vault

Test result: ok. 3 passed; 0 failed; finished in 12.16s