-
Notifications
You must be signed in to change notification settings - Fork 49
Console: Problems related to receiving and sending payments #515
Description
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
depositis 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
- users might not know about it because this is not clearly communicated or send funds accidentally to the wrong address (e.g.,
-
money transfers requiring an external contract call usually don't allow interaction with the
depositfunction such as- streams, e.g., Sablier
- claim contracts, e.g., ERC20-redeemable
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
DepositiedandWithdrawnevent - 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
Withdrawnevent
Alternatively, deprecate withdraw and deposit and rely on external APIs (e.g., Zapper.fi) to display balances correctly.