JSPM

@gooddollar/goodprotocol

2.0.33-beta.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3704
  • Score
    100M100P100Q99439F
  • License MIT

GoodDollar Protocol

Package Exports

  • @gooddollar/goodprotocol
  • @gooddollar/goodprotocol/artifacts/abis/Faucet.min.json
  • @gooddollar/goodprotocol/artifacts/abis/GReputation.min.json
  • @gooddollar/goodprotocol/artifacts/abis/GoodDollarStaking.min.json
  • @gooddollar/goodprotocol/artifacts/abis/GoodReserveCDai.min.json
  • @gooddollar/goodprotocol/artifacts/abis/IGoodDollar.min.json
  • @gooddollar/goodprotocol/artifacts/abis/IIdentity.min.json
  • @gooddollar/goodprotocol/artifacts/abis/IdentityV2.min.json
  • @gooddollar/goodprotocol/artifacts/abis/UBIScheme.min.json
  • @gooddollar/goodprotocol/artifacts/contracts/Interfaces.sol/IIdentity.json
  • @gooddollar/goodprotocol/dist/test-sdk/index.js
  • @gooddollar/goodprotocol/releases/deployment.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gooddollar/goodprotocol) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GoodProtocol

Actions Status Coverage Status npm version

Versions 2+ of GoodDollar smart contracts

Submit bug bounties via Hats.Finance

SuperGoodDollar

SuperGoodDollar is an implementation of the GoodDollar token which adds functionality implemented by the Superfluid protocol, making it a Super Token.

SuperGoodDollar is implemented as a Pure Super Token - it has no underlying ERC20.
This is possible because Super Tokens are themselves ERC20 tokens.

The SuperGoodDollar contract is composed like this: GoodDollarProxy is a minimal base contract. It's responsible for state storage and for dispatching calls to the appropriate logic contract via delegatecall. Its initialize method connects the proxy to 2 logic contracts:

  1. the canonical SuperToken logic of the Superfluid framework
  2. the logic specific for the GoodDollar token (GoodDollarCustom) The proxy's initialize then invokes the initializer methods of both connected logic contracts. The contract GoodDollarCustom overrides some of the method already implemented by the SuperToken contract. Such overriding across different logic contracts can be done by making external calls to the base implementation. For convenience, this is handled by the base contract SuperTokenBase which wraps SuperToken methods to be overrided.

Dual upgradeability of the 2 connected logic contracts is achieved this way:

  1. upgrades of the SuperToken logic are handled by Superfluid governance, as is the case for other SuperTokens
  2. upgrades of the GoodDollar logic is handled by the configured owner(s). The interface is the same (UUPSProxy), but with changed method names in order to avoid naming clashes. See example test case.

The tests in SuperGoodDollar.ts aren't comprehensive (not ready for production), but sufficient to prove that the mechanism with 2 logic contracts works.