If your funds are stuck in OnX, follow these steps to withdraw them from the smart contracts.
Your funds could be in one of several smart contracts. Most likely, they are in the OnX Farm:
You must locate where your funds are before proceeding.
This is the code for an emergency withdrawal on the OnX Farm:
function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.token.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt = 0;
}
- Read the OnX Farm Smart Contract on Etherscan: OnX Farm Smart Contract
- Check
poolInfo
by passing numbers from 0 to 26 as arguments to see the token of each pool. Knowing what token you deposited will make this easier.
- Call the
userInfo
method with your address and the ID of the pool. - If the returned amount is non-zero, you can withdraw your funds. You might need to check all pools if you don't remember the token you deposited.
- Connect your wallet to Etherscan to write to the contract: Write Contract
- Call the
emergencyWithdraw
function, passing the pool ID (_pid
) as an argument. - Carefully execute the transaction.
OnX has multiple pools. Your funds might be stuck in one of these. First, browse all OnX pools and find where your funds are: OnX Pools.
- Visit the pool page, e.g., Example OnX Pool.
- Read the contract and call the
balanceOf
method, passing your address as an argument: Read Contract.
- Go to the write contract page for your pool: Write Contract.
- Call the
withdraw
function, passing the amount of your funds as an argument. - Execute the transaction. If your funds are still in the contract and you correctly passed the amount, your withdrawal transaction should look like this: Example Transaction.
Refer to the OnX Finance documentation for other smart contract addresses: OnX Finance Documentation.
- Ethereum
- ONX token (ONX):
0xe0ad1806fd3e7edf6ff52fdb822432e847411033
- Staked ONX token (sONX):
0xa99f0ad2a539b2867fcfea47f7e71f240940b47c
- onEthereum (onETH):
0xC1330aCBbcE97cb9695B7ee161c0F95B875a8b0F
- onStable (ONS):
0xfC97C0c12438B6E4CF246cD831b02FeF4950DCAD
- OnX.Finance Governance (onONX):
0x424b1ae0af693d4577dde25081e970cb656013c7
- ONX token (ONX):
- Fantom
- ONX Token (ONX):
0x27749e79ad796c4251e0a0564aef45235493a0b6
- Bridge for ONX token: Multichain Cross-Chain Router
- ONX Token (ONX):
- Polygon
- ONX Token (ONX):
0xeb94a5e2c643403e29fa1d7197e7e0708b09ad84
- Bridge for ONX token: Polygon Bridge
- ONX Token (ONX):
- Avalanche
- ONX Token (ONX):
0x3D8f74620857dd8ED6D0dA02ceB13fd0Ed8Ba678
- Bridge for ONX token: Multichain Cross-Chain Router
- ONX Token (ONX):
- Binance Smart Chain
- ONX Token (ONX):
0x50dfd52c9f6961bf94d1d5489ae4b3e37d2f1fe7
- Bridge for ONX token: Multichain Cross-Chain Router (available soon)
- ONX Token (ONX):
- ONX Token Contract:
0xE0aD1806Fd3E7edF6FF52Fdb822432e847411033
- ONX Farm Contract:
0x168F8469Ac17dd39cd9a2c2eAD647f814a488ce9
- Pre-mint Timelock:
0x5716749e23C94c0d03ed03B9AB951D6686d385E1
- onVault (holding collateral backing onETH in circulation):
0x3BdF1977d87EDAD8e0617efCEa958F6d43A4C30E
- OnX Insurance Fund:
0x53d3B757af4d1B897D4A4f24A46769790B0052Ba
If you need any assistance, feel free to reach out to me. I'll try to help you withdraw your funds whenever I have some free time.