---
title: "StakedOverlayerWrap"
description: "Solidity reference for StakedOverlayerWrap, the ERC-4626 public staking interface for OverlayerWrap tokens, including its constructor and compound controls."
keywords:
  - "StakedOverlayerWrap"
  - "Solidity"
  - "ERC-4626"
  - "staking"
  - "compound"
canonical_url: https://docs.overlayer.fi/developer_guide/contracts/StakedOverlayerWrap
md_url: https://docs.overlayer.fi/developer_guide/contracts/StakedOverlayerWrap.md
last_updated: 2026-05-13T01:03:10.000Z
---

# StakedOverlayerWrap

> Solidity reference for StakedOverlayerWrap, the ERC-4626 public staking interface for OverlayerWrap tokens, including its constructor and compound controls.

Public interface for staking OverlayerWrap tokens following the ERC4626 standard

### withdrawAaveDuringCompound

```solidity
bool withdrawAaveDuringCompound
```

Flag to control Aave withdrawal during compound operations

### constructor

```solidity
constructor(contract IERC20 asset_, address initialRewarder_, address admin_) public
```

Constructor for StakedOverlayerWrap

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| asset_ | contract IERC20 | The OverlayerWrap token contract address |
| initialRewarder_ | address | Address authorized to distribute rewards |
| admin_ | address | Contract administrator address |

### mint

```solidity
function mint(uint256 shares_, address receiver_) public virtual returns (uint256)
```

_See `{IERC4626-mint}`._

### deposit

```solidity
function deposit(uint256 assets_, address receiver_) public virtual returns (uint256)
```

_See `{IERC4626-deposit}`._

### withdraw

```solidity
function withdraw(uint256 assets_, address receiver_, address owner_) public virtual returns (uint256)
```

_See `{IERC4626-withdraw}`._

### redeem

```solidity
function redeem(uint256 shares_, address receiver_, address owner_) public virtual returns (uint256)
```

_See `{IERC4626-redeem}`._

### _compound

```solidity
function _compound() internal
```

Compounds yield from the overlayerWrap backing contract, reverting on failures

### setWithdrawAaveDuringCompound

```solidity
function setWithdrawAaveDuringCompound(bool doWithdraw_) external
```

Controls whether Aave tokens should be withdrawn during compound operations

_Can only be called by contract admin_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| doWithdraw_ | bool | True to enable Aave withdrawals, false to disable |
