If you opened a borrow position on a Morpho Blue market on Corn (WBTCN/LBTC or USD₮0/WBTCN), check whether you have any remaining collateral and withdraw it before the chain shuts down.
You can also see your positions on the Earn page of the Corn Chain App.
Step 1 — Check your position state
Go to the Morpho Blue contract on Cornscan: 0xc2B1E031540e3F3271C5F3819F0cC7479a8DdD90.
Click Contract → Read Contract.
Find the
position(bytes32 id, address user)function.Enter the market id and your wallet address.
Click Query. The result is
(supplyShares, borrowShares, collateral).
Look at the values:
collateral— the amount of collateral still in the position, in raw units (e.g. 8 decimals for LBTC, 18 decimals for wBTCN).borrowShares— outstanding debt. Must be0for the withdraw to succeed.
Market IDs:
WBTCN/LBTC (94.5%) —
0x2547ba491a7ff9e8cfcaa3e1c0da739f4fdc1be9fe4a37bfcdf570002153a0deUSD₮0/WBTCN (86%) —
0x9039bf8b5c3cd6f2d3f937e8a2e59ef6af0109a0d0f3499e7dbf75be0aef75ec
If collateral is 0, there's nothing to withdraw — you're done.
If collateral is greater than 0 and borrowShares is 0, continue to step 2.
If borrowShares is non-zero, you still have outstanding debt and withdrawCollateral won't succeed until the debt is cleared. Ping us in Discord and we'll help figure out the right next step.
Step 2 — Call withdrawCollateral
Open Morpho Blue Write Contract page on Cornscan: cornscan.io/address/0xc2B1E031540e3F3271C5F3819F0cC7479a8DdD90/contract/writeContract.
Click Connect Wallet.
Find the
withdrawCollateralfunction.Fill in:
-marketParams— the tuple(loanToken, collateralToken, oracle, irm, lltv)for your market. Ping us in Discord if you need the exact tuple — we'll provide it.
-assets— thecollateralamount you read in Step 1.
-onBehalf— your wallet address.
-receiver— your wallet address.Click Write and confirm.
The collateral token (LBTC or wBTCN) appears in your wallet.
Step 3 — Bridge or unwrap
LBTC — bridge via the Corn Bridge app. See Bridging via the Corn Bridge app.
wBTCN — unwrap to native BTCN first, then bridge. See wBTCN: unwrap to BTCN first.
Help
withdrawCollateral reverting with "INSUFFICIENT_COLLATERAL" usually means there's still outstanding debt. Confirm borrowShares == 0 first via the position read. For any other issue, ping us in the Corn Discord with the failing transaction hash.