This sip proposes to incorporate a reversion into the weekly inflation mint, if the weekly distribution to L2 stakers fails.
RewardsDistribution contract currently ignores errors when it attempts to send out the configured snx distributions. This leads to a situation, where the L2 supply is minted and is not relayed to L2, due to insufficient gas. This SIP incorporates a revert into the
RewardsDistribution contract in case the relay to optimism fails.
In reference to SCCP-2051, as can be seen in the minting transaction the inflation destined for L2 were printed, but were never relayed over to optimism. This is because of a check by the optimism's ResourceMetering.sol that asserts that a transaction's gas limit exceeds a minimum, the latter depends on the length of the contract call.
This SIP proposes to incorporate a revert, that throws the entire minting transaction in case the distribution of rewards to L2 stakers fails. Hence, keeper would be incentivized to boost the gas limit to the point where the transaction doesn't revert in order to earn the subsidized 100 snx per week in keeping fee.
The fix entails reverting the inflation mint transaction, if a programmed distribution fails to sucessfully execute, in the
It is worth mentioning as a consequence of this fix, all future contracts that would receive snx distributions, will need to implement a
notifyReward in the receiving contract, otherwise the distribution and weekly inflation print will fail. Currently, as per the state of the v2X contracts, at the time of writing this sip, no contracts are configured to receive snx inflation on a weekly basis, aside from
In case the distribution of rewards to L2 stakers fails, the entire
Synthetix.mint() should revert.
Copyright and related rights waived via CC0.