liquity / ChickenBond

GNU General Public License v3.0
31 stars 5 forks source link

test: Add test for impact of LUSD deposit into LUSD/3CRV pool #258

Closed bingen closed 1 year ago

bingen commented 1 year ago

Run with:

forge test -vvv --match-contract DepositLUSD --fork-url ${ETH_RPC_URL}
danielattilasimon commented 1 year ago

Cool! This is what it's showing currently:

Running 1 test for src/test/DepositLUSDIntoCurveTest.t.sol:DepositLUSDIntoCurveTest
[PASS] testDepositIntoCurve() (gas: 1737084)
Logs:
  Current LUSD price: 1.036264775845368577

  Depositing (M):: 0.300
  Final LUSD price: 1.032478537131693584
  LUSD price reduction %: 0.366713551663113630

  Depositing (M):: 1.000
  Final LUSD price: 1.025713772857544340
  LUSD price reduction %: 1.028649830686207126

  Depositing (M):: 2.000
  Final LUSD price: 1.019277757432964781
  LUSD price reduction %: 1.666574031320504661

  Depositing (M):: 3.000
  Final LUSD price: 1.015045728523683302
  LUSD price reduction %: 2.090452353565092299

  Depositing (M):: 4.000
  Final LUSD price: 1.012103376502838421
  LUSD price reduction %: 2.387246194752952284

  Depositing (M):: 5.000
  Final LUSD price: 1.009967588446681722
  LUSD price reduction %: 2.603765477180472699

  Depositing (M):: 10.000
  Final LUSD price: 1.004703024038735923
  LUSD price reduction %: 3.141401095794432812

Test result: ok. 1 passed; 0 failed; finished in 18.43s
bingen commented 1 year ago

Good idea to paste result here, thanks!