> For the complete documentation index, see [llms.txt](https://docs.mellow.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mellow.finance/resources/mellow-lrt-depreciated/modules/delegatemodules/defaultbondmodule.md).

# DefaultBondModule

### Overview

`DefaultBondModule` contract handles deposits and withdrawals for bonds in the symbiotic module system.

### Key Features

* **Bond Deposits**: Facilitates deposits into bonds, managing token allowances securely.
* **Bond Withdrawals**: Enables secure withdrawals from bonds.
* **Allowance Management**: Uses `safeIncreaseAllowance` to ensure the appropriate token allowances are set.

### Methods

1. **Bond Deposit**
   * `deposit(address, uint256)`: Deposits tokens into a specified bond.
     * **bond**: The address of the bond.
     * **amount**: The amount of tokens to deposit.
     * **Returns**: The deposited amount.
     * **Errors**: Returns 0 if the amount is zero.
     * **Event**:
       * `DefaultBondModuleDeposit(address, uint256, uint256)`: Emitted after a successful deposit.
         * **bond**: Address of the bond.
         * **amount**: Amount deposited.
         * **timestamp**: Timestamp of the deposit.
2. **Bond Withdrawal**
   * `withdraw(address, uint256)`: Withdraws tokens from a specified bond.
     * **bond**: The address of the bond.
     * **amount**: The amount of tokens to withdraw.
     * **Returns**: The amount withdrawn.
     * **Errors**:
       * Returns 0 if the amount is zero or the bond balance is insufficient.
     * **Event**:
       * `DefaultBondModuleWithdraw(address, uint256)`: Emitted after a successful withdrawal.
         * **bond**: Address of the bond.
         * **amount**: Amount withdrawn.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mellow.finance/resources/mellow-lrt-depreciated/modules/delegatemodules/defaultbondmodule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
