> For the complete documentation index, see [llms.txt](https://docs.motif.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.motif.finance/specification/contract-architecture.md).

# Contract Architecture

**BitcoinPodManager.sol**

This contract is the entry point for the client for all actions related to BitcoinPod, aka BOD. This contract:&#x20;

1. Deploys the BOD
2. Handles bitcoin deposit/withdrawal requests
3. Interacts with the service manager&#x20;
4. Delegates to Apps

**BitcoinPod.sol**

This is a unique contract deployed everytime for a new bitcoin address created a BOD. This contract:&#x20;

1. Maps a Bitcoin address to an Ethereum address
2. Tracks Bitcoin balances in the BOD
3. Delegates to apps via `BitcoinPodManager.sol`
4. Manages bitcoin transaction storage

**BitDSMRegistry.sol**

1. Handles operator's registration/deregistration
2. Stores a mapping for operator's bitcoin pubkey

**AppRegistry.sol**

This is the entrypoint for Apps to gain access to in-kind Bitcoin. This contract&#x20;

1. Maintains a mapping of the contract address for the app and the BODs delegated to it.

**BitDSMServiceManager.sol**

This is the AVS service manager contract deployed on Eigenlayer's `AVSDirectory.sol`. This contract:

1. Manages Bitcoin pod operations through `IBitcoinPodManager`
2. Handles deposit/withdrawal confirmations from operators
3. Integrates with EigenLayer for staking and delegation
