> For the complete documentation index, see [llms.txt](https://docs.defisaver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defisaver.com/actions/sky/skystakingengineunstake.md).

# SkyStakingEngineUnstake

### Description

Unstake SKY tokens from previously staked position

### Action ID

`0x51a3f99a`

### SDK Action

```ts
const skyStakingEngineUnstakeAction = new dfs.actions.sky.SkyStakingEngineUnstakeAction(
    stakingContract,
    index,
    amount,
    to
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param stakingContract address of the staking engine contract
    /// @param index index of the urn
    /// @param amount amount of stakingToken to unstake
    /// @param to address to which to send stakingToken
    struct Params {
        address stakingContract;
        uint256 index;
        uint256 amount;
        address to;
    }
```

### Return Value

```solidity
return bytes32(amountUnstaked);
```

### Events and Logs

```solidity
emit ActionEvent("SkyStakingEngineUnstake", logData);
logger.logActionDirectEvent("SkyStakingEngineUnstake", logData);
bytes memory logData = abi.encode(params);
```
