Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

Console: Problems related to receiving and sending payments #515

@heueristik

Description

@heueristik

Status Quo: withdraw & deposit

In Govern, the intended use is to deposit and withdraw tokens via the finance menu. This uses the deposit and withdraw function in Govern.sol that emit Deposited(msg.sender, _token, _amount, _reference) and Withdrawn(_token, _to, _from, _amount, _reference) events for the subgraph. This updates the balances in the UI.

Problems with the deposit functionality:

  • using deposit is counterintuitive compared to directly sending funds to the DAO o

    • users might not know about it because this is not clearly communicated or send funds accidentally to the wrong address (e.g., GovernQueue.sol) so that funds are lost irretrievably
  • money transfers requiring an external contract call usually don't allow interaction with the deposit function such as

Problems with the withdraw functionality:

  • batch payments to multiple addresses are not possible in the Govern UI, only via workarounds
    • scheduling multiple withdraws as an external contract call, but this is tedious
    • scheduling an external contract call using a batch payment solution (e.g., disperse.app)
  • streams are not possible via the Govern UI, only via workarounds
    • scheduling an external contract call using a streaming service (e.g., Sablier)

External contract calls have the problem that

  • they do not emit the Depositied and Withdrawn event
  • users have to deal with the token decimals so that critical errors can easily happen
  • they require unnecessary waiting for the execution delay and more gas in the case of deposits

Because of the optimistic scheduling, the UX can become worse if ERC-20 allowances are not set correctly (see #514).

Possible Solutions

  • add an adapter contract receiving payments for the DAO that forwards them using deposit
  • add batch payment and streaming functionalities to Govern and its UI that emit the Withdrawn event

Alternatively, deprecate withdraw and deposit and rely on external APIs (e.g., Zapper.fi) to display balances correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions