Skip to content

Buyback and Donate: avKAT ​

Use a recurring buyback to buy KAT with treasury USDC, pay a fee share of the purchased tokens to a fixed recipient and donate the rest to the avKAT staking vault. The donation benefits existing stakers; the DAO.sol contract receives no avKAT shares.

mermaid
flowchart LR
    S[Stream: USDC] --> O[Open Fill: buy KAT] --> W{Weights}
    W --> F[Transfer fee]
    W --> D[Donate to avKAT]

Choose the terms ​

Set the Stream rate and cap, the KAT demand for Open Fill, the vault, and the fee with its recipient. The cap limits the USDC offered per fill. The fee is in basis points: 500 means 5%. The recipe requires a fee above zero and below 10,000, and a nonzero recipient, so this flow always has a fee branch. Choose amounts in raw units: USDC uses six decimals and KAT uses eighteen.

Where the proceeds go ​

A Weight Splitter divides the purchased KAT: the fee share goes to the recipient through Transfer, fee first, and the rest goes to the vault. This recipe enables forwardSurplus, so KAT received above the demand is divided the same way. Pre-existing treasury KAT and unspent USDC stay in the treasury.

The vault must support Vault Donate. If the swap, the fee payment or the donation fails, the whole run rolls back. A paused vault or a fee recipient that cannot receive KAT therefore blocks this flow.

Configure and operate ​

Use Recipes.buybackAndDonate and the configuration example. Review the complete configuration, replace placeholder addresses and choose your auction terms; the example amounts are illustrative.

Follow Setup and permissions to install the flow. Revenue goes to the DAO.sol contract; sync the stream after funding it. The registry must include VaultDonateAction@1 before preparing this recipe.

Deployment and fork reproduction stay in the repository runbook.

Component source: StreamBudget.sol · OpenFillAction.sol · WeightSplitter.sol · TransferAction.sol · VaultDonateAction.sol.

All examples.