SIP-325: Add Multicall Proxy Function

Author
StatusRejected
TypeGovernance
NetworkEthereum & Optimism
ImplementorTBD
ReleaseTBD
ProposalLoading status...
Created2023-08-02

Simple Summary

This SIP proposes adding a new multicall function which can be used with core system functions such that the value of msg.sender can be preserved.

Abstract

Currently, the multicall module contains a function similar to the standard Multicall3 contract. Batched contract calls recognize the multicall contract’s address as msg.sender when using this function, rather than the calling address. We can avoid this issue by creating a multicall function that stores the calling address to storage and then have the protocol reference this value rather than msg.sender directly in the code.

Motivation

A design principle of the V3 system has been to keep singular concerns for each public function. We assume that complex user actions can be composed with a series of function calls in a multicall. Accordingly, the addition of this function should allow for a wider range of functionality to be composed for end users.

Further, with the implementation of SIP-329, we anticipate the need for all of the protocols’ functionality to be accessible via multicall, such that fresh price data can be prepended to arbitrary calls.

Specification

See here for a preliminary implementation of the function. The system will need to reference the _CONFIG_MESSAGE_SENDER value (rather than msg.sender) throughout the codebase and reset this value when functions are being called without the multicall.

Test Cases

Test cases will be developed during implementation.

SCCP switched to Rejected as per author's request

Configurable Values (Via SCCP)

N/A

Copyright and related rights waived via CC0.