> For the complete documentation index, see [llms.txt](https://pokebets.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pokebets.gitbook.io/docs/pokebetting-contract/withdrawing-contract-fees.md).

# Withdrawing Contract Fees

The withdrawContractFees function allows the owner of the contract to withdraw the accumulated fees. This function simply transfers the fees to the specified recipient.

### Function Breakdown

* The function first saves the current balance of the contract in a local variable and then sets the contract balance to 0.
* The `transfer` function of the PBetsToken contract is then called, which transfers the saved balance from the contract to the recipient.
