EIP: 7265 - Circuit Breaker Standard

In onTokenOutflow it says:

Before calling this method, the protected contract MUST transfer the EIP-20 tokens to the circuit breaker contract.

Have you considered instead having the protected contract approve the tokens and the circuit breaker using transferFrom? This would be more efficient if there’s no rate limit because the circuit breaker can transfer directly from the protected contract to the recipient.

Edit: It turns out this doesn’t really improve net gas costs, and it relies on a larger refund which might be better to avoid, so I think two transfers is good.

1 Like