> For the complete documentation index, see [llms.txt](https://docs.tokensfarm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokensfarm.com/for-developers/tokensfarmsdk/withdraw.md).

# Withdraw

WITHDRAW SYSTEM :

* If yours project wants to take a fee or report unstake from stake of specific user you need to call `ISDK(farmAddress).noticeReducedStakeWithoutStakeId`&#x20;

```solidity
function noticeReducedStakeWithoutStakeId( 
    address _user,   
    uint256 _amount
)
```

* Once the stake was updated to new state there is mapping called&#x20;

  ```solidity
  mapping(address => uint256) public totalPendingAmountForUser;
  ```

that after `noticeReducedStakeWithoutStakeId` was called, contains newly collected rewards that stake that was updated was earning during staking time.

* In order for user to collect those collected rewards from `totalPendingAmountForUser` he can call directly from contract `TokensFarmSDK.withdrawRewards(msg.sender)` or you can execute withdraw from contract admin through `ISDK(farmAddress).withdrawRewards(addressOfUser)`
