Diversifier
Diversifier is a smart contract that automatically diversifies an income stream into specific tokens of various ratios. This is particularly useful for tax withholdings, for example when you want to automatically swap 40% of your income into a stablecoin and set aside for taxes. This template simply stacks a Pass-Through Wallet on top of a Split on top of a number of Swappers.
- Creation form (opens in a new tab)
- Github (opens in a new tab)
- Contracts & Natspec (opens in a new tab)
- Related: Split, Swapper, Pass-Through Wallet
How it works
- Each Diversifier is a payable smart contract that uses a Split to automatically split incoming tokens according to pre-set percentages. Recipients of the Split may be Swappers to automatically swap tokens into a specified output tokens. A Pass-Through Wallet sits on top and owns / controls all of the underlying modules, allowing the Diversifier to function as a full wallet. That's all there is to it, so if that sounds complicated we recommend you review the Split, Swapper, and Pass-Through Wallet contracts.
- Each Diversifier can be owned, which means the owner has full control of the deployment. The owner may modify the Split, change the oracles and discounts, pause the Swappers, and execute arbitrary transactions at their will. We recommend removing the owner or making it a multisig if this contract is being used in any trustless setting.
Addresses
Ethereum – 1
Base – 8453
Optimism – 10
Polygon – 137
Arbitrum – 42161