> For the complete documentation index, see [llms.txt](https://docs.teller.org/v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teller.org/v2/personas/borrowers/repay-loan/withdraw-collateral.md).

# Withdraw Collateral

Once a loan has been fully repaid, it will transition to a status of 'paid'. Once this happens, the borrower is allowed to withdraw any collateral that was deposited during `acceptBid()` by calling the `withdraw()` function of `CollateralManager.sol`.

```solidity
/**
* @notice Withdraws deposited collateral from the created escrow of a bid that has been successfully repaid.
* @param _bidId The id of the bid to withdraw collateral for.
*/
function withdraw(uint256 _bidId)
```

Any account is allowed to call this method.  If the loan status is 'paid' then the collateral will be transferred to the lender address for the loan.
