FilOzone / FilOzone/synapse-sdk

Document multisig FWSS use

Open
#714 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
25
Forks
32
Avg merge
3d 4h
Merged PRs (30d)
22

Description

While this is top of mind for me: if someone wants to use FWSS with a multisig (like Safe), then they have to jump through hoops but it's possible and we should find a place to document this.

https://github.com/FilOzone/dealbot/pull/416 and https://github.com/FilOzone/dealbot/pull/419 is where I bumped against the friction and it has two main forms:

1. **Getting Filecoin Pay set up is not straight forward**. Because of the need to do an EIP-2612 signature for `permit()` you can't call the various methods we have on Filecoin Pay, like `depositWithPermitAndApproveOperator()` to do the one-step setup. Unless the multisig can handle it. So You have to decompose into three separate transactions (batch in Safe is nice, but still a bit of a drama): `USDFC.approve()`, `FilecoinPay.deposit()` and `FilecoinPay.setOperatorApproval()`. None of these have a separate signature verification so they are easy to push through a multisig.
2. **Using a multisig as the owner wallet in Synapse causes Lotus EOA dramas**. This is the problem @nijoe1 has been attempting to solve @ https://github.com/filecoin-project/lotus/pull/13470 and it's still not reviewed and landed (we'll get there!), so for now you get `SysErrSenderInvalid` from eth_calls that Synapse makes because it'll always set the wallet as the `from`. But you can work around this with a custom transport, which is what I did in https://github.com/FilOzone/dealbot/pull/419 which also happens to involve session keys, so it's for the `readClient`, but same principle applies for the `client`. Intercept any `eth_call` or `eth_estimateGas` and remove `from` from the request and pass it on, then Lotus doesn't bother you for what we do (although I don't think we run `eth_estimateGas` in Synapse, mostly, and maybe this trick won't work for that anyway? I haven't checked.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.