> For the complete documentation index, see [llms.txt](https://docs.bancor.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bancor.network/developer-guides/write-functions/rewards/leave.md).

# leave()

### Function leave()

{% code title="StandardRewards.sol" %}

```solidity
function leave(uint256 id, uint256 poolTokenAmount) external greaterThanZero(poolTokenAmount) nonReentrant
```

{% endcode %}

This function is used to withdraw staked pool tokens from a rewards program.

### Function Arguments

| Name            | Type    | Description                            |
| --------------- | ------- | -------------------------------------- |
| id              | uint256 | The ID of the rewards program.         |
| poolTokenAmount | uint256 | The number of pool tokens to withdraw. |

This function does not return anything.&#x20;
