> For the complete documentation index, see [llms.txt](https://docs.elara.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elara.fi/protocol-reference/reference/api-reference/token/contract.selusd.md).

# sElUSD

[Git Source](https://github.com/TrueFi-Protocol/elara-contracts-v2/blob/9301de6eec32ceafb4021f4e7da883b507799ebc/contracts/token/sElUSD.sol)

**Inherits:** [ElaraBase](https://github.com/TrueFi-Protocol/elara-contracts-v2/blob/docs/latest/contracts/base/ElaraBase.sol/abstract.ElaraBase.md), IsElUSD, ERC20PermitUpgradeable

**Title:** Staked Elara USD Token Contract

ERC20 token representing shares in the ElUSD staking pool

Implements a simple share token with permit and pause functionality Invariants:

* Only authorized staking contracts can mint or burn tokens
* Token transfers are paused when contract is paused
* Total supply increases only when users stake ElUSD
* Total supply decreases only when users unstake ElUSD Upgradeability:
* Uses ElaraBase for UUPS upgradeability
* Initializer must be called exactly once; preserve storage layout

**Note:** security-contact: <security@elara.finance>

## State Variables

### \_\_gap

Reserved storage gap for future upgrades to prevent storage collisions

```solidity
uint256[50] private __gap
```

## Functions

### initialize

Initializes the sElUSD token contract with core parameters

Security:

* Only callable during initialization via {initializer} modifier
* Sets up ERC20 token with name and symbol via {\_\_ERC20\_init}
* Enables permit functionality via {\_\_ERC20Permit\_init}
* Establishes access control via {\_\_ElaraBase\_init}
* Critical for token initialization; must be called exactly once per proxy

```solidity
function initialize(address _accessManager, string memory _name, string memory _symbol) external initializer;
```

**Parameters**

| Name             | Type      | Description                           |
| ---------------- | --------- | ------------------------------------- |
| `_accessManager` | `address` | Address of the AccessManager contract |
| `_name`          | `string`  | The name of the token                 |
| `_symbol`        | `string`  | The symbol of the token               |

### mint

Reverts if `to` is zero address. Emits {Minted} event on success.

```solidity
function mint(address to, uint256 amount) external override(IsElUSD) restricted;
```

### burn

Reverts if `from` is zero address. Emits {Burned} event on success.

```solidity
function burn(address from, uint256 amount) external override(IsElUSD) restricted;
```

### \_update

Hook called before any token transfer to enforce pause

Security:

* Protected by {whenNotPaused} modifier to prevent transfers when paused
* Overrides [ERC20Upgradeable-\_update](https://github.com/TrueFi-Protocol/elara-contracts-v2/blob/docs/latest/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol/abstract.ERC20Upgradeable.md#_update) to add custom transfer restrictions

```solidity
function _update(address from, address to, uint256 value) internal override whenNotPaused;
```

**Parameters**

| Name    | Type      | Description                                  |
| ------- | --------- | -------------------------------------------- |
| `from`  | `address` | Source address (address(0) for minting)      |
| `to`    | `address` | Destination address (address(0) for burning) |
| `value` | `uint256` | Amount to transfer (18 decimals)             |
