sweep, which wraps ETH, sells it for USDG along the WETH zap route, and routes the USDG. Below $100k of pool assets every dollar is donated to USDGPool. At or above that, 30% is donated, 40% goes to the FeeCollector reserve, and 30% to the treasury. The contract must be the pool’s yieldDistributor and has no withdraw function.
CreatorFeeRouter lets you:
- Convert accumulated ETH and WETH creator fees to USDG
- Donate USDG to sUSDG holders during bootstrap
- Split USDG between pool, reserve, and treasury after the TVL trigger
The source code is
src/token/CreatorFeeRouter.sol on GitHub. The ABI is /abis/CreatorFeeRouter.json.
Write methods
sweep
tvlTrigger everything is donated to the pool. Otherwise 30% is donated, 30% is credited to treasury, and the remainder (40%) to reserve. Permissionless. Reverts with InvalidRoute if WETH has no allowed route to USDG and ZeroAmount if no USDG results.
The TVL check happens before this sweep’s donation, so a pool just under the trigger still receives the full amount.