Protocol mechanics
Strategies and auctions
How a strategy sells its USDG for its asset, priced in that asset.
Loading…
Browse documentation
Protocol mechanics
How a strategy sells its USDG for its asset, priced in that asset.
Loading…
Protocol mechanics
How a strategy sells its USDG for its asset, priced in that asset.
A strategy is a Dutch auction that sells the USDG it has received for one specific asset, its payment token. Strategies are how the treasury turns mining revenue into holdings.
Every strategy is created with four immutable numbers:
struct Config {
uint256 initialPrice; // raw payment-token units
uint256 epochDuration; // seconds
uint256 priceMultiplier; // scaled by 1e18
uint256 minimumPrice; // raw payment-token units
}| Field | Bound | Meaning |
|---|---|---|
initialPrice | minimumPrice to 2^192 - 1 | Starting price of the first epoch, in raw units of the payment token. |
epochDuration | 1 hour to 365 days | How long each epoch takes to decay from its starting price to zero. |
priceMultiplier | 1.1× to 3× (1.1e18 to 3e18) | What the next epoch starts at, relative to the clearing payment. |
minimumPrice | 10 to 2^192 - 1 raw units | Floor for every later epoch's starting price. Not a reserve at fill time. |
Prices are in raw units of the payment token regardless of its decimals, so a strategy paid in an 18-decimal token expresses 1.5 tokens as 1.5e18.
elapsed = now - epochStartedAt
price = elapsed >= epochDuration ? 0 : initialPrice - floor(initialPrice * elapsed / epochDuration)Once the price reaches zero anyone can take the whole USDG balance for free.
function buy(
address revenueReceiver,
uint256 expectedEpochId,
uint256 deadline,
uint256 maximumPayment
) external returns (uint256 paymentAmount);A fill is permissionless and atomic:
floor(payment × bribeBps / 10,000) goes to the strategy's BribeRouter and the remainder goes to the treasury, so rounding favors the treasury.revenueReceiver, which need not be the buyer.clamp(payment × multiplier, minimumPrice, 2^192 - 1) with a new epoch id.Protections: expectedEpochId must match the live epoch (a competing fill in the same block reverts), deadline bounds execution time, and maximumPayment caps what the buyer will pay since the price is read at execution. A fill reverts if the USDG balance is empty. A zero-price fill skips payment collection and the split entirely.
The app fills through the Periphery's buy, which collects only the price at execution and refunds any unused funding. Gas permitting, it first tries to route the Resonance's buffered revenue and afterwards the strategy's BribeRouter; those optional steps cannot undo a successful fill.
There is no minimum USDG received argument. Integrators must bind the epoch observed when quoting rather than read the current epoch at execution. Selling the full USDG balance also includes direct donations; Purchased volume must not be treated as earned mining revenue. These are acknowledged findings in the Veridise report.
Every new launch starts with the official LP-token strategy and can add explicitly selected assets in the same transaction. The app and SDK allow four extras; the contract has no count cap beyond transaction gas. More strategies can be added later. The default LP auction uses a 1-day epoch, 1.2× multiplier and its explicit starting price as the floor; the app prices the start near $100 of LP. Base and fund Coin auctions are optional. Coin acquired by the Fund can be burned through Fund.burnCoin.
The controller owner adds strategies with FundController.addStrategy(paymentToken, config). The payment token must be a deployed contract and cannot be sCoin; it is automatically the first reward token of the new strategy's Bribe. A new strategy starts with zero weight and cannot claim historical revenue.
killStrategy(strategy) is irreversible. It checkpoints the strategy under its full prior weight, preserves what it had earned for later distribution, removes its weight from the live total and stops it accepting allocations or revenue. Its auction can still be filled, existing allocations can still be removed and existing rewards can still be claimed. The last live strategy cannot be killed. Guidance on choosing parameters is in Designing strategies.