protocol-monorepo icon indicating copy to clipboard operation
protocol-monorepo copied to clipboard

[ETHEREUM-CONTRACTS] Completness of the upgrade/downgrade flows of Super Tokens

Open hellwolf opened this issue 1 year ago • 0 comments

(... per community input ...)

Notes

Extend SuperToken upgrade/downgrade with more overloaded versions of them.

  • upgrade(amount)
  • upgradeTo(to, amount) # *
  • upgradeTo(to, amount, userData)
  • upgradeFrom(from, to, amount) # *
  • upgradeFrom(from, to, amount, userData) # *
  • downgrade(amount)
  • downgradeTo(to, amount)
  • downgradeTo(to, amount, userData) #*
  • downgradeFrom(from, to, amount) # *
  • downgradeFrom(from, to, amount, userData) # *
  • expose the underlyingAmount <-> supertoken amount arithematic to the user for easier integration. Using the example from TOREX BLM for reference.

We do not add these, in favor of the macro versions:

  • downgradeAllTo(to)
  • downgradeAllFrom(from, to)

hellwolf avatar Mar 17 '23 10:03 hellwolf