filecoin-saturn / contracts

contracts
6 stars 0 forks source link

[Milestone 1] Payment Splitter only release funds from message sender. #7

Closed AmeanAsad closed 1 year ago

AmeanAsad commented 1 year ago

Description:

alexander-camuto commented 1 year ago

This would mean having to merge the splitter and factory contracts in an awkward way as msg.sender when calling the splitter from the factory contract is ... the factory contract. Unless we remove the interfaces to claim from the factory and make claiming directly from each individual PaymentSplitter the only way to claim funds (this also saves on Gas for users but is worse UX).

tldr: would involve shifting more work into the JS interface and the user having to sign off on more transactions (maybe not so bad if they consistently claim every month tbh).

AmeanAsad commented 1 year ago

Can we not add a conditional on release to work either with msg.sender or the factory contract address? The factory contract address will always be constant and we'll know it before initializing the PaymentSplitter.

Either way, we can test having to do a release just from the payment splitter.

alexander-camuto commented 1 year ago

@patrickwoodhead also made the astute point that folks may have their rewards being sent to exchange wallets. In which case the claiming wallet in metamask will likely be different to the exchange address. As such we want to enable flexibility whereby a given claimant on the frontend can push funds to another address.