> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boost.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Learn about how to interact with the Managed Budget using the SDK

<Warning>
  The One-Time Actions docs are under active development and will be subject to changes.
</Warning>

The Managed Budget contract is a flexible budget implementation that allows for the distribution of tokens with role-based access control. A Managed Budget is required to deploy boosts.
In order to deploy boosts from a budget, the budget must be funded with enough ERC-20 tokens to cover the cost of the boost incentives, plus any fees.

<CardGroup cols={3}>
  <Card title="Smart Contract" icon="file-contract" href="https://github.com/boostxyz/boost-protocol/blob/main/packages/evm/contracts/budgets/ManagedBudget.sol">
    Read the smart contracts
  </Card>

  <Card title="Typedoc" icon="file-lines" href="https://sdk.boost.xyz/classes/ManagedBudget.html">
    See technical documentation
  </Card>

  <Card title="SDK Implementation" icon="file-code" href="https://github.com/boostxyz/boost-protocol/blob/main/packages/sdk/src/Budgets/ManagedBudget.ts">
    See the source
  </Card>
</CardGroup>

ManagedBudget is designed to hold and distribute assets while providing fine-grained control over who can perform various operations.

<Frame>
  <img src="https://mintcdn.com/boost-b69a8212/Dehkzir8rkzvihlg/assets/diagrams/protocol-budget-flow.png?fit=max&auto=format&n=Dehkzir8rkzvihlg&q=85&s=53be152084a781bef6199ff1d3b3ef52" alt="Boost Budget Flow" width="2060" height="978" data-path="assets/diagrams/protocol-budget-flow.png" />
</Frame>

## Key Features

* Role-based access control for management and administration
* Flexible allocation and distribution of assets
* Clawback functionality for asset recovery

#### Create a new ManagedBudget

**To initialize a new ManagedBudget contract:**

<CodeGroup>
  ```ts index.ts theme={null}
  import { BoostCore } from '@boostxyz/sdk/BoostCore'
  import { BoostRegistry } from '@boostxyz/sdk/BoostRegistry'
  import { Roles } from '@boostxyz/sdk'
  import { config } from "./config";

  const core = new BoostCore({ config });
  const registry = new BoostRegistry({ config });

  // initialize a new budget contract
  const budget = await registry.initialize(
    "MyBoostBudget",
    core.ManagedBudget({
      owner: account.address,
      authorized: [account.address, core.assertValidAddress()],
      roles: [Roles.ADMIN, Roles.MANAGER],
    })
  );

  const budgetAddress = budget.assertValidAddress();
  ```

  ```ts config.ts theme={null}
  import { http, createConfig } from '@wagmi/core'
  import { mainnet, sepolia } from '@wagmi/core/chains'

  export const config = createConfig({
    chains: [mainnet, sepolia],
    transports: {
      [mainnet.id]: http(),
      [sepolia.id]: http(),
    },
  })
  ```
</CodeGroup>

#### Get an existing ManagedBudget

**To get an existing ManagedBudget contract:**

<CodeGroup>
  ```ts index.ts theme={null}
  const budget = core.ManagedBudget("0xc55F719709bDad022B320E76f9DfF7e6F5680767")

  // or if you want a budget from a specific chain
  const budgetOnBase = core.ManagedBudget(
    "0xc55F719709bDad022B320E76f9DfF7e6F5680767",
    { chainId: 8453 }
  )
  ```
</CodeGroup>

<Tip>
  [Learn more about targeting specific chains](/v2/boost-sdk/quick-start#targeting-specific-chains)
</Tip>

Once a budget is created, it can be [funded](/v2/boost-sdk/budgets/managed/funding) and used to deploy boosts.
