Skip to content

@liquity/lib-base-v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Mar 07:43
· 956 commits to master since this release

@liquity/lib-base-v2.0.0 (2021-03-09)

Bug Fixes

  • calculate fees at the time of the latest block (d012ad4)
  • correct borrowing rate in recovery mode (fb1242a), closes #300
  • exclude temporary files from package (2ba1d9b)
  • round up when unapplying borrowing fee (097e9ba)

Features

  • add maximum acceptable rate param to borrowing and redemption (332f0f6)
  • add new property haveUndercollateralizedTroves to LiquityStoreState (6266649)
  • allow increasing truncated redemptions to next lowest redeemable amount (f15167d)
  • introduce UserTrove class (be15c0f)
  • introduce minimum net debt (93e2e77)
  • verify the parameters of Trove.create() & Trove.adjust() (cf32217)

BREAKING CHANGES

  • getTroves() now returns an array of UserTroves.

It would previously return an array of [string, Trove] tuples, where the
first element of the tuple was the Trove owner's address. After the change,
the owner's address can be found as UserTrove.ownerAddress.

  • the change parameter of Trove.apply() is now of type
    TroveChange<Decimal>.

It used to take a TroveChange<Decimalish>, however the only API function
that returns a TroveChange is Trove.whatChanged(), which has a return
type of TroveChange<Decimal>.

Most users therefore won't notice a change.

  • Troves can no longer be created without borrowing LUSD.

Any transaction that would result in a Trove with less debt than the new
constant LUSD_MINIMUM_DEBT will be reverted.

  • fees has been moved from LiquityStoreBaseState
    to LiquityStoreDerivedState.

Most users won't need to make a code change. However, care should
be taken to upgrade both SDK packages at the same time, to ensure
compatibility.