# 2. Asset withdrawal over OTC

{% hint style="info" %}
**IMPORTANT:** The information provided in this section can be used for manual asset withdrawal for the cases where automatic withdrawal is not available.&#x20;
{% endhint %}

#### Step 0 - Receiving a withdrawal request from a community member

A withdrawal request for manual procedure is received via a direct communication means used by your DAO (IM Services, e-mail, etc.). The information provided by the member must contain a request for funds withdrawal, the amount requested (full or partial) and the preferred Stable Coins for the procedure (in cases where the entry and exit Stable Coins are different).

#### Step 1 - Calculating the withdrawal amounts

The initial calculations must contain:

* Member's wallet address (ex: 0x705b7D77324be575a8ade697Ddae61e697Ddae61)
* Returning CT Tokens (ex: FLEX)
* CT Token Amount (ex: 1000)
* Preferred Stable Tokens (ex: USDC)
* Withdrawal amount (ex: 3500) *This part is not provided by the member, but calculated by the DAO Manager processing the withdrawal.*

{% hint style="info" %}
**IMPORTANT:** Before proceeding with the withdrawal procedure and if the member requested a full refund for the CT Tokens - start with the carry calculations first, the carry fees are to be withheld before the remaining sum is reported to the member.&#x20;
{% endhint %}

#### Step 2 - Assigning liquidity assets for the procedure

There are two alternatives:

1. If there are enough stable coins requested by the withdrawing member - simply convert this amount to the Preferred stable tokens (if needed) and then transfer the amount to OTC following the steps below.
2. If there are not enough stable coins for withdrawal, such amount should be extracted from liquidity pools managed by your DAO(e.g. Uniswap, Sushiswap...), then converted to the preferred stable tokens, and transferred to OTC following the steps below.

![The assets withdrawn from the strategies are shown as incoming from an unidentified source if viewed at the zerion.io App. Opening the details of the transaction will show the full information and the pool which was the source of the asset.](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2FDvvNOv0h6KE2x19hHRpR%2FScreenshot%202021-11-25%20at%2014.45.49.png?alt=media\&token=2b6c8844-4f30-4922-a245-69f51077f743)

Please note that extracting the assets from Uniswap/Sushiswap and similar strategies leads to getting assets in 2 or more currencies. A screenshot above shows the extraction of Uniswap USDC/ETH asset.

#### Step 3 - OTC token approval

{% hint style="info" %}
If Deversifi OTC smart contract has not been approved for stable coin token transactions proceed to token contract address
{% endhint %}

1. Go to <https://etherscan.io/>
2. Type in the name of the stable token for approval (e.g. USDC)
3. Go to Contract section -> Write as Proxy
4. Click 1.Approve
5. Connect to Web3
6. Insert Defersifi OTC contract address - 0xD924BDd6fA7fd3D0Eb1337853a814a4263dCbfe8
7. Insert infinite approval amount - 0xffffffffffffffffffffffffffffffffffffffff
8. Click Write to confirm the approval.

![](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2FDFdaYRBCosnBcC7WUeKp%2FScreenshot%202021-11-25%20at%2014.57.01.png?alt=media\&token=4ae62e6b-6c24-4a90-8a0b-386824737efa)

#### Step 4 - Connecting to OTC (Deversifi.OTC)

The process of creating a trade contract to exchange the CT Tokens held by the community member(s) for the Stable Coins requested is done in several steps:

* Navigate to <https://etherscan.io/dapp/0xd924bdd6fa7fd3d0eb1337853a814a4263dcbfe8#writeContract>
* Connect your wallet. After logging in to your Frame Wallet with the DAO Agent account press the "Connect Web3" button at the upper right corner as on the screenshot below.

![](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2F0TDDJO1HKkorcpi7uJXA%2Fscr1.PNG?alt=media\&token=718ca868-942a-4726-abab-d579a00081ab)

* Make sure the wallet used has enough Stable Tokens required for the transaction
* Select Option 2 - Initiate Trade
* Fill in the form with the required data

![](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2FbfJmGcd9wQOI02RBEYiK%2Fscr2.PNG?alt=media\&token=77188843-b091-4a51-a852-5965736dbf6d)

All the fields are mandatory. The required data is:

* **payableAmount** - 0000000000000000000000000000000000000000 (by default)
* **\_tokenFrom** - Stable Coin address (check the address via etherscan.io/tokens)
* **\_tokenTo** - DAO CT Token address (check that the address is correct and corresponds with your DAO tokens)
* **\_amountFrom (uint256)** - Write the required amount of the Stable coins to be sent and multiply it by 10 factored by the "Decimals" field at token etherscan profile (see screenshot below) (e.g. 10,000 USDC is equal to 10000000000 as uint256(10000 x 10^6(1000000)))
* **\_amountTo (uint256)** - Write the amount of CT tokens to be returned by the member, multiplied  by 10^n (where n = "decimals" field of etherscan profile of the CT token)
* **\_optionalTaker** - write the wallet address of the member here.

![Every token registered at etherscan.io has a certain Decimals value](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2Fiiuf1iSCCUwSPpT77KJw%2Fscr3.PNG?alt=media\&token=48d7179e-0d76-401e-98ad-1d37b232d1b3)

After the data is filled in - press the "Write" button to proceed.

* Proceed with the transaction and voting procedure explained [HERE](https://1clickdao.gitbook.io/weezi/basics/1.-basic-management-information#4.-guide-to-voting-creation)
* After the voting is complete - open the voting and press the address as shown below to get the vote ID

![](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2F3bypvjBDaKak0UgjBYmF%2Fscr4.PNG?alt=media\&token=5b75a503-d7ec-4428-a53f-8fd8f1795f5d)

* Navigate to "Logs" tab and find the OfferCreated section. Copy the number marked by arrow on the screenshot

![](https://635256300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Me8u5qenSY382AyAmTe%2Fuploads%2FM8hoh9oHHDFOVGDpU7rh%2Fscr5.PNG?alt=media\&token=03171fc2-b3f4-49b3-98bd-c9ff4d51abf7)

* Insert the copied offer number(e.g 364) to the link, replacing the %data% part: [*https://app.deversifi.com/otc/trade/%data%* ](https://app.deversifi.com/otc/trade/%data%)*>>* [*https://app.deversifi.com/otc/trade/*](https://app.deversifi.com/otc/trade/%data%)*364*
* *Send the link to the withdrawing community member. You can check the link before sending to get the trade information  at the Deversifi App webpage.*&#x20;

#### Step 4 - OTC Trade Procedure

After the link is sent to the member, the following steps must be completed by the member:

* Open the link provided
* Check the trade details shown (Token amounts for both CT Tokens and Stable Tokens)
* Connect to OTC via Metamask&#x20;
* Accept the trade (check that the connected wallet has the required amount of CT tokens)
* Sign the transaction with Metamask

{% hint style="info" %}
**IMPORTANT:** Deversifi OTC has a ***transaction fee of 0.02%*** of the total transaction amount. The ratio of CT/Stable is fixed at the point of trade creation, so the shown ratio may not be directly equal to the ratio at the moment of transaction.
{% endhint %}

After the transaction is complete the withdrawing community member receives the Stable Tokens while the DAO receives the CT tokens.

#### Step 5 - Burn the CT tokens returned by the member

Received CT tokens after the withdrawal procedure should be burned by the DAO to avoid miscalculating of DAO's assets, CT market price, etc.

The process of burning CT tokens is explained in the next section.
