Update OUSD's smart contracts to exclude yield-earning strategies that are unlikely to be used in the near future.
OUSD's rebase function is expensive to run. In our latest funds allocation, this call required 915,531 gas. Nearly all of this is caused by checking the value of stablecoins held in each whitelisted strategy. This is a core feature of the protocol: to check how much its value has increased and adjust the token supply accordingly.
There are currently seven strategy contracts with varying complexity:
| Strategy | Gas usage |
|---|---|
| Compound | 136,658 |
| Aave | 96,581 |
| Convex DAI+USDC+USDT | 53,869 |
| Convex OUSD | 56,290 |
| Morpho Compound | 264,351 |
| Convex LUSD | 56,291 |
| Morpho Aave | 188,038 |
Total: 852,078 gas spent checking values in strategies
As described in the Pause weekly funds allocation votes proposal, several of these strategies are likely to go unused in the coming weeks. If we're not going to be deploying funds to these strategies, it is wasteful to check their values every time rebase is called. By reducing these gas costs, we will save ETH in at least the following scenarios:
rebase every nightAfter discussing this proposal with engineers, I'm proposing that we disable the following strategies:
This will result in an estimated gas savings of approximately 30%.
Note that two strategies will remain active despite being unlikely to see meaningful allocations in the short-term. Convex OUSD will enable us to maintain OUSD's peg using its AMO functionality. Aave will serve as a fallback in the event that concerns arise with Morpho and we're not yet comfortable with allocating 100% of funds to Flux and/or the DSR.