Background
Previously in EIP-2, a new system called trusted borrowing was added to enable wrap / unwrap batcher contracts among other use cases.
The initial batcher contract WrapOnlyBatcher
, as the name suggests, allowed for significantly cheaper USDC-to-DSU wrap transactions, however this batcher could not support DSU-to-USDC unwrap transactions, due to the requirement to hold non-reserve USDC.
TwoWayBatcher
We propose a new batcher implementation that supports the permissionless deposit / withdraw of USDC by interested parties to fund the batcher’s supply of USDC.
By holding non-reserve USDC as well as DSU from the reserve’s trusted borrow system, we can then enable bidirectional batching. This primarily serves to enable significantly cheaper DSU-to-USDC unwraps.
Implementation
- An implementation of the
TwoWayBatcher
can be seen here. - An implementation of the reserve update to enable the
TwoWayBatcher
can be seen here.
This batcher implementation has been created as part of perennial protocol upgrade work, and like the WrapOnlyBatcher
is today, it will be utilized by the protocol in a future update if approved.