> 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/adding-liquidity/depositandjoin.md).

# depositAndJoin()

This function is in the StandardRewards.sol contract.

### Function depositAndJoin()

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

```solidity
function depositAndJoin(uint256 id, uint256 tokenAmount)
        external
        payable
```

{% endcode %}

This function is used to deposit tokens into a liquidity pool and simultaneously join the rewards program.&#x20;

The function accepts the ID of the rewards program and the number of tokens to deposit as arguments.&#x20;

### Function Arguments

| Name        | Type    | Description                              |
| ----------- | ------- | ---------------------------------------- |
| id          | uint256 | This is the ID of the rewards program.   |
| tokenAmount | uint256 | This is the number of tokens to deposit. |

This function does not return anything.
