Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.64 KB

YPP-0078.md

File metadata and controls

36 lines (27 loc) · 1.64 KB

Proposal

Deploy a RepayFromLadle to the Ladle that allows an an extra argument of an address to be provided for each token transfer.

Background

RepayFromLadle sends the collateral and the remainder to the same address. bugs #1

Details

The proposal includes two mainnet executions...

  1. Deploying the RepayLadleModuleModule using this script. The RepayFromLadleModule takes the Cauldron and WETH addresses as constructor arguments.
  2. Add the RepayFromLadleModule 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/RepayFromLadleModule.t.sol
[⠒] Compiling...
[⠒] Compiling 1 files with 0.8.15
[⠑] Solc 0.8.15 finished in 1.44s
Compiler run successful

Running 1 test for contracts/test/modules/RepayFromLadleModule.t.sol:WithVaultProvisioned
[PASS] testRepayFromLadle() (gas: 160063)
Logs:
  Can repay from ladle

Test result: ok. 1 passed; 0 failed; finished in 2.83s

Running 1 test for contracts/test/modules/RepayFromLadleModule.t.sol:RepayFromLadleModuleTest
[PASS] testOnlyBorrowAndPoolVault() (gas: 436166)
Logs:
  can only be used with Borrow and Pool vaults

Test result: ok. 1 passed; 0 failed; finished in 42.13s