The RIF Multisig - Gnosis Summary

Gnosis Safe solution consists of four main modules. It currently supports Ethereum and other EVM networks (Rinkeby, xDai, EWC, Volta), including RSK.

  • A) The smart contracts
    • The suite of the smart contracts has the following structure:

      • A Gnosis Safe implementation. It implements functionality for:
        • Managing owners(1) and threshold(2)
        • Submitting signatures or transactions pre-signed off-chain
        • Rejecting transactions
        • Allowing gas payments with tokens (relayed transactions)
        • Enhanced for adding modules (3)
      • A proxy factory contract that deploys proxies using Gnosis Safe implementation in two transactions

      Gnosis Safe - Smart contracts interaction

  • B) Transaction service
    • The transaction service exposes a REST API for multisig (and other features used in the UI). It collects all the multisig information using trace_transaction and trace_blocks. Furthermore, it allows collecting off-chain signatures and retrieving multisig pending transactions.

      Gnosis Safe - Transaction Service

  • C) The Core SDK
    • A Javascript SDK that currently implements most of the functionalities required.
    interface Safe {
      connect({ providerOrSigner, safeAddress, contractNetworks }: ConnectEthersSafeConfig): void
      getProvider(): Provider
      getSigner(): Signer | undefined
      getAddress(): string
      getMultiSendAddress(): string
      getContractVersion(): Promise<string>
      getNonce(): Promise<number>
      getOwners(): Promise<string[]>
      getThreshold(): Promise<number>
      getChainId(): Promise<number>
      getBalance(): Promise<BigNumber>
      getModules(): Promise<string[]>
      isModuleEnabled(moduleAddress: string): Promise<boolean>
      isOwner(ownerAddress: string): Promise<boolean>
      createTransaction(...safeTransactions: SafeTransactionDataPartial[]): Promise<SafeTransaction>
      createRejectionTransaction(nonce: number): Promise<SafeTransaction>
      getTransactionHash(safeTransaction: SafeTransaction): Promise<string>
      signTransactionHash(hash: string): Promise<SafeSignature>
      signTransaction(safeTransaction: SafeTransaction): Promise<void>
      approveTransactionHash(hash: string): Promise<ContractTransaction>
      getOwnersWhoApprovedTx(txHash: string): Promise<string[]>
      getEnableModuleTx(moduleAddress: string): Promise<SafeTransaction>
      getDisableModuleTx(moduleAddress: string): Promise<SafeTransaction>
      getAddOwnerTx(ownerAddress: string, threshold?: number): Promise<SafeTransaction>
      getRemoveOwnerTx(ownerAddress: string, threshold?: number): Promise<SafeTransaction>
      getSwapOwnerTx(oldOwnerAddress: string, newOwnerAddress: string): Promise<SafeTransaction>
      getChangeThresholdTx(threshold: number): Promise<SafeTransaction>
      executeTransaction(safeTransaction: SafeTransaction): Promise<ContractTransaction>
      }
    
  • D) The UI
    • Users can log in with an existent Gnosis Safe, or they can create a new one. It allows to view and to send assets, to show the transaction list, and to edit the safe settings properties (owners, threshold)

      Gnosis Safe - UI