> For the complete documentation index, see [llms.txt](https://swap-docs.dovish.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swap-docs.dovish.finance/technical-reference/smart-contracts/pair-erc-20.md).

# Pair (ERC-20)

This documentation covers ERC-20 functionality for denominating pool tokens. For DoveSwap-specific functionality, see [Pair](/technical-reference/smart-contracts/pair.md).

## Events

### Approval[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#approval) <a href="#approval" id="approval"></a>

```solidity
event Approval(address indexed owner, address indexed spender, uint value);
```

Emitted each time an approval occurs via [approve](#approve) or [permit](#permit).

### Transfer[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#transfer) <a href="#transfer" id="transfer"></a>

```solidity
event Transfer(address indexed from, address indexed to, uint value);
```

Emitted each time a transfer occurs via [transfer](#transfer-1), [transferFrom](#transferfrom), [mint](/technical-reference/smart-contracts/pair.md#mint-1), or [burn](/technical-reference/smart-contracts/pair.md#burn-1).

## Read-Only Functions

### name[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#name) <a href="#name" id="name"></a>

```solidity
function name() external pure returns (string memory);
```

Returns `DoveSwap LP` for all pairs.

### symbol[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#symbol) <a href="#symbol" id="symbol"></a>

```solidity
function symbol() external pure returns (string memory);
```

Returns `DOV-LP` for all pairs.

### decimals[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#decimals) <a href="#decimals" id="decimals"></a>

```solidity
function decimals() external pure returns (uint8);sol
```

Returns `18` for all pairs.

### totalSupply[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#totalsupply) <a href="#totalsupply" id="totalsupply"></a>

```solidity
function totalSupply() external view returns (uint);
```

Returns the total amount of pool tokens for a pair.

### balanceOf[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#balanceof) <a href="#balanceof" id="balanceof"></a>

```solidity
function balanceOf(address owner) external view returns (uint);
```

Returns the amount of pool tokens owned by an address.

### allowance[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#allowance) <a href="#allowance" id="allowance"></a>

```solidity
function allowance(address owner, address spender) external view returns (uint);
```

Returns the amount of liquidity tokens owned by an address that a spender is allowed to transfer via [transferFrom](/technical-reference/smart-contracts/pair-erc-20.md#transferfrom).

### DOMAIN\_SEPARATOR[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#domain_separator) <a href="#domain_separator" id="domain_separator"></a>

```solidity
function DOMAIN_SEPARATOR() external view returns (bytes32);
```

Returns a domain separator for use in [permit](/technical-reference/smart-contracts/pair-erc-20.md#permit).

### PERMIT\_TYPEHASH[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#permit_typehash) <a href="#permit_typehash" id="permit_typehash"></a>

```solidity
function PERMIT_TYPEHASH() external view returns (bytes32);
```

Returns a typehash for use in [permit](/technical-reference/smart-contracts/pair-erc-20.md#permit).

### nonces[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#nonces) <a href="#nonces" id="nonces"></a>

```solidity
function nonces(address owner) external view returns (uint);
```

Returns the current nonce for an address for use in [permit](/technical-reference/smart-contracts/pair-erc-20.md#permit).

## State-Changing Functions

### approve[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#approve) <a href="#approve" id="approve"></a>

```solidity
function approve(address spender, uint value) external returns (bool);
```

Lets `msg.sender` set their allowance for a spender.

* Emits [Approval](#approval).

### transfer[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#transfer-1) <a href="#transfer-1" id="transfer-1"></a>

```solidity
function transfer(address to, uint value) external returns (bool);
```

Lets `msg.sender` send pool tokens to an address.

* Emits [Transfer](#transfer).

### transferFrom[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#transferfrom) <a href="#transferfrom" id="transferfrom"></a>

```solidity
function transferFrom(address from, address to, uint value) external returns (bool);
```

Sends pool tokens from one address to another.

* Requires approval.
* Emits [Transfer](#transfer).

### permit[​](https://docs.uniswap.org/contracts/v2/reference/smart-contracts/Pair-ERC-20#permit) <a href="#permit" id="permit"></a>

```solidity
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
```

Sets the allowance for a spender where approval is granted via a signature.

* Emits [Approval](#approval).
