How to withdraw funds from EnterDAO’s liquidity pools

Dichou
EnterDAO
Published in
2 min readFeb 28, 2024

Due to inactivity EnterDAO’s liquidity pools need to be reset so funds can be withdrawn from them.

The guide’s goal is to provide the necessary steps to unstuck any of the EnterDAO’s pools.

  1. Open https://etherscan.io/address/0x3f148612315aae2514ac630d6faf0d94b8cd8e33
  2. Select ContractRead Contract
  3. Select 7. getCurrentEpoch which will give you the latest epoch. Remember it.
  4. Select 6. epochIsInitialized

a.token - Paste the token address

b.epochId - Paste the latest epoch from 3.

c. Click Query

d. If the result is true, move to step 7. Withdraw

e. If the result is false, in decrementing order, find the last epochId that has been initialised for the given token.

5. Manually increasing the epoch for the given token. If the result from 4 is false, you will need to execute N transactions for the given token, starting from the first epoch that has not been initialised until the current epoch. TODO: Give an example

a. Connect your wallet.

b. Select Write Contract

c. Select 3. manualEpochInit

d. Paste the token address.

e. Paste the least epoch id that is not initialised for the given token.

f. Click Write, a MetaMask pop-up should appear. Execute the transaction.

g. Once the transaction is successfully executed, proceed with the next epoch and do N transactions until the epoch initialised for the given token is the current epoch.

6. Withdraw

a. First, you need to find your accrued balance

b. Select Contract

c. Select Read Contract

d. Select 9. getEpochUserBalance

i. user - your wallet address

ii. token - the token address

iii. epochId - current epoch id

iv. Click Query

v. This returns an amount, which you will use when withdrawing.

e. Select Write Contract

f. Connect your wallet

g. Select 4. withdraw

i. tokenAddress - the token address

ii. amount the result amount from step d

iii. Click Write

iv. MetaMask pop-up should appear. Execute the transaction

If you don’t want to do everything above and only withdraw your initial deposit, you can use emergencyWithdraw . You will not be able to withdraw your accrued X amount later on.

  1. Select Write Contract
  2. Connect your wallet
  3. Select 2. emergencyWithdraw

a. tokenAddress - the token address

b. Click Write

c. MetaMask pop-up should appear. Execute the transaction.

--

--