-
Notifications
You must be signed in to change notification settings - Fork 337
Open
Description
using node v16.20.2
these 5 tests are failing
1) EthersLiquity
StabilityPool
should have a depleted stability deposit and some collateral gain:
2) EthersLiquity
StabilityPool
the Trove should have received some liquidation shares:
3) EthersLiquity
StabilityPool
total should equal the Trove:
4) EthersLiquity
StabilityPool
should transfer the gains to the Trove:
5) EthersLiquity
StabilityPool
when people overstay
"before all" hook for "should still be able to withdraw remaining deposit":
full execution logs for yarn test
> yarn test
Decimal
.from()
when passing a string
✓ should throw if it's empty
✓ should throw if it's non-numeric
✓ should convert it if it has no decimal point
✓ should convert it if it has decimal point
✓ should convert it if characteristic is missing
✓ should convert it if mantissa is missing
✓ should truncate if mantissa is too long
in scientific notation
✓ should convert it if exponent has no sign
✓ should convert it if exponent has '+' sign
✓ should convert it if exponent has '-' sign
when passing a number
✓ should preserve fractional part
✓ should convert it even if it's very small
✓ should convert it even if it's very large
when passing a Decimal
✓ should return the same Decimal
.toString()
when not passing a parameter
✓ should not include '.' for integers
✓ should include '.' for fractions
✓ should trim trailing zeros from fractions
when passing a precision parameter
✓ should round to the nearest decimal
✓ should include '.' and decimal zeros for integers if precision is >0
✓ should not include '.' if precision is 0
.shorten()
✓ should turn '0.123' into '0.12'
✓ should turn '1.234' into '1.23'
✓ should turn '12.345' into '12.3'
✓ should turn '123.456' into '123'
✓ should turn '1234.567' into '1.23K'
✓ should turn '12345.678' into '12.3K'
✓ should turn '123456.789' into '123K'
✓ should turn '1234567.891' into '1.23M'
✓ should turn '12345678.912' into '12.3M'
✓ should turn '123456789.123' into '123M'
✓ should turn '1234567891.234' into '1.23B'
✓ should turn '12345678912.345' into '12.3B'
✓ should turn '123456789123.456' into '123B'
✓ should turn '1234567891234.567' into '1.23T'
✓ should turn '12345678912345.678' into '12.3T'
✓ should turn '123456789123456.789' into '123T'
✓ should turn '1234567891234567.891' into '1,235T'
✓ should turn '12345678912345678.912' into '12,346T'
✓ should turn '123456789123456789.123' into '123,457T'
✓ should turn '1234567891234567891.234' into '1,234,568T'
.mul()
✓ should multiply
.div()
✓ should divide
.mulDiv()
✓ should multiply then divide
.pow()
✓ should be roughly the same as Math.pow()
.isZero
✓ should be true if Decimal is zero
✓ should be false if Decimal is non-zero
LQTYStake
✓ applying diff of `b` from `a` to `a` should always yield `b`
✓ applying what changed should preserve zeroing
StabilityDeposit
✓ applying diff of `b` from `a` to `a` should always yield `b`
✓ applying what changed should preserve zeroing
Trove
✓ applying undefined diff should yield the same Trove
✓ applying diff of empty from `b` to `a` should yield empty
✓ applying what changed should preserve zeroings
✓ applying diff of `b` from `a` to `a` should yield `b` when borrowing rate is 0
✓ applying diff of `b` from `a` to `a` should roughly yield `b` when borrowing rate is non-0
✓ applying an adjustment should never throw
whatChanged()
✓ should not define zeros on adjustment
✓ should recreate a Trove with minimum debt at any borrowing rate
58 passing (140ms)
EthersLiquity
✔ should get the price
findHintForCollateralRatio
✔ should pick the closest approx hint
Trove
✔ should have no Trove initially
✔ should fail to create an undercollateralized Trove (80ms)
✔ should fail to create a Trove with too little debt
✔ should create a Trove with some borrowing (226ms)
✔ should fail to withdraw all the collateral while the Trove has debt (81ms)
✔ should repay some debt (363ms)
✔ should borrow some more (767ms)
✔ should deposit more collateral (371ms)
✔ should repay some debt and withdraw some collateral at the same time (545ms)
✔ should borrow more and deposit some collateral at the same time (698ms)
✔ should close the Trove with some LUSD from another user (619ms)
SendableEthersLiquity
✔ should parse failed transactions without throwing (126ms)
Frontend
✔ should have no frontend initially
✔ should register a frontend
✔ should have a frontend now
✔ other user's deposit should be tagged with the frontend's address (488ms)
StabilityPool
✔ should make a small stability deposit (264ms)
✔ other user should make a Trove with very low ICR (226ms)
✔ the price should take a dip
✔ should liquidate other user's Trove (634ms)
1) should have a depleted stability deposit and some collateral gain
2) the Trove should have received some liquidation shares
3) total should equal the Trove
4) should transfer the gains to the Trove
when people overstay
5) "before all" hook for "should still be able to withdraw remaining deposit"
Redemption
✔ should fail to redeem during the bootstrap phase (1027ms)
✔ should redeem some LUSD after the bootstrap phase (1006ms)
✔ should claim the collateral surplus after redemption (170ms)
✔ borrowing rate should be maxed out now (900ms)
Redemption (truncation)
✔ should truncate the amount if it would put the last Trove below the min debt (875ms)
✔ should increase the amount to the next lowest redeemable value (1577ms)
✔ should fail to increase the amount if it's not truncated (475ms)
Redemption (gas checks)
✔ should redeem using the maximum iterations and almost all gas (12225ms)
Liquidity mining
✔ should obtain some UNI LP tokens (43ms)
✔ should fail to stake UNI LP before approving the spend
✔ should stake UNI LP after approving the spend (298ms)
✔ should have an LQTY reward after some time has passed (4592ms)
✔ should partially unstake (71ms)
✔ should unstake remaining tokens and withdraw remaining LQTY reward (1413ms)
✔ should have no more rewards after the mining period is over (522ms)
Hints (adjustTrove)
✔ should not use extra gas when a Trove's position doesn't change (1276ms)
✔ should not traverse the whole list when bottom Trove moves (2370ms)
✔ should not traverse the whole list when lowering ICR of bottom Trove (2244ms)
Gas estimation
✔ should include enough gas for updating lastFeeOperationTime (2581ms)
✔ should include enough gas for one extra traversal (3950ms)
✔ should include enough gas for both when borrowing (2812ms)
Gas estimation (LQTY issuance)
✔ should include enough gas for issuing LQTY (9598ms)
Gas estimation (fee decay)
✔ should predict the gas increase due to fee decay (1006ms)
✔ should include enough gas for the TX to succeed after pending (481ms)
46 passing (2m)
5 failing
1) EthersLiquity
StabilityPool
should have a depleted stability deposit and some collateral gain:
AssertionError: expected { Object (initialLUSD, currentLUSD, ...) } to deeply equal { Object (initialLUSD, currentLUSD, ...) }
+ expected - actual
{
"collateralGain": {
"_bigNumber": {
- "_hex": "0xaff4a912acf6ec"
+ "_hex": "0xc3819f6a158426"
"_isBigNumber": true
}
}
"currentLUSD": {
"_bigNumber": {
- "_hex": "0x0de0b6b3a763fff6"
+ "_hex": "0x00"
"_isBigNumber": true
}
}
"frontendTag": "0x0000000000000000000000000000000000000000"
at Context.<anonymous> (test/Liquity.test.ts:542:40)
2) EthersLiquity
StabilityPool
the Trove should have received some liquidation shares:
AssertionError: expected { Object (collateral, debt, ...) } to deeply equal { Object (ownerAddress, status, ...) }
+ expected - actual
{
"collateral": {
"_bigNumber": {
- "_hex": "0x01ae4b8a93f49f41e8"
+ "_hex": "0x01ae37fd9d9d36b4b8"
"_isBigNumber": true
}
}
"debt": {
"_bigNumber": {
- "_hex": "0xd9540d23685d040000"
+ "_hex": "0xd9462c6cb4b5a00000"
"_isBigNumber": true
}
}
"ownerAddress": "0x2E7108e381e9ACab03aA1B4819aaCB50D2964532"
at Context.<anonymous> (test/Liquity.test.ts:559:29)
3) EthersLiquity
StabilityPool
total should equal the Trove:
AssertionError: expected { Object (collateral, debt) } to deeply equal { Object (collateral, debt) }
+ expected - actual
{
"collateral": {
"_bigNumber": {
- "_hex": "0x01ae4b8a93f49f41f1"
+ "_hex": "0x01ae4b8a93f49f41e9"
"_isBigNumber": true
}
}
"debt": {
at Context.<anonymous> (test/Liquity.test.ts:581:29)
4) EthersLiquity
StabilityPool
should transfer the gains to the Trove:
AssertionError: expected { Object (lusdLoss, newLUSDDeposit, ...) } to deeply equal { Object (lusdLoss, newLUSDDeposit, ...) }
+ expected - actual
{
"collateralGain": {
"_bigNumber": {
- "_hex": "0xaff4a912acf6ec"
+ "_hex": "0xc3819f6a158426"
"_isBigNumber": true
}
}
"lqtyReward": {
--
}
}
"lusdLoss": {
"_bigNumber": {
- "_hex": "0x7ce66c50e284000a"
+ "_hex": "0x8ac7230489e80000"
"_isBigNumber": true
}
}
"newLUSDDeposit": {
"_bigNumber": {
- "_hex": "0x0de0b6b3a763fff6"
+ "_hex": "0x00"
"_isBigNumber": true
}
}
"newTrove": {
"collateral": {
"_bigNumber": {
- "_hex": "0x01aefb7f3d074c38d4"
+ "_hex": "0x01aefb7f3d074c38de"
"_isBigNumber": true
}
}
"debt": {
"_bigNumber": {
- "_hex": "0xd9540d23685d040000"
+ "_hex": "0xd9462c6cb4b5a00000"
"_isBigNumber": true
}
}
}
at Context.<anonymous> (test/Liquity.test.ts:589:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
5) EthersLiquity
StabilityPool
when people overstay
"before all" hook for "should still be able to withdraw remaining deposit":
AssertionError: expected '1' to equal '0'
+ expected - actual
-1
+0
at Context.<anonymous> (test/Liquity.test.ts:661:64)
Failed to generate 5 stack traces. Run Hardhat with --verbose to learn more.
ERROR: "test:lib-ethers" exited with 1.
Metadata
Metadata
Assignees
Labels
No labels