Mendifinance withdrawals after sunset and redemption limits
UpdatedMendifinance withdrawals from legacy lending returned supplied assets through lending-token redemptions, limited by available market cash and the collateral needed for remaining debt. The protocol announced its sunset, retaining the withdrawal interface for a limited period and describing smart-contract access afterward. A displayed supply balance did not establish the amount immediately withdrawable. A legacy exit could require a smaller redemption or a debt repayment, with success depending on the selected market and the account's remaining position.
Market cash and collateral headroom
A cash shortage limited the assets a market could pay out, while a collateral shortfall limited the supplied position an account could release.
Cash in the selected market
The legacy lending contract rejected a redemption when market cash fell below the underlying amount it needed to transfer. The cash test concerned the selected market's underlying asset. A supply balance could represent assets borrowers had already taken from that market. Those recorded loans contributed to lending accounting without providing tokens immediately available for withdrawal.
A smaller redemption could fit the remaining cash when a full withdrawal could not. An earlier cash read did not reserve liquidity for a later request. Other successful withdrawals could reduce it before a later transaction executed. A shortage alone did not establish how long replenishment would take.
Collateral committed to borrowing
Collateral restrictions followed the account's debt and entered markets. Removing supplied tokens could reduce the collateral supporting borrowing elsewhere in the account. A market with enough cash could therefore reject a redemption because the remaining collateral would fall short. Repayment could change this account limit without necessarily replenishing the market selected for redemption.
Lending-token amounts and underlying asset amounts
The legacy ERC-20 market accepted redemption requests expressed either as cToken quantities or as quantities of its underlying asset. cTokens represented the supplied lending position. The
redeem
function took a cToken amount and calculated the underlying payout using the market exchange rate. The
redeemUnderlying
function took an underlying amount and calculated the cTokens needed for that payout. Both paths accrued market interest before redemption and then applied the relevant controller and cash checks. Their different input units did not create different liquidity sources.
The cToken exchange rate expressed the asset amount a holding represented, while cash availability constrained immediate payment. Choosing an underlying amount therefore did not override the account's lending-token balance or its collateral obligations. A full-position redemption and a partial redemption used the same governing checks.
Can I withdraw collateral while a loan remains outstanding?
A partial collateral redemption could pass the account check while borrowing remained, provided the remaining adjusted collateral covered the debt. The legacy controller rejected an entered-market redemption if the projected account state had a shortfall. The calculation considered the account's entered markets, collateral factors, exchange rates, and underlying asset prices. It valued borrowing alongside collateral in a common denomination. The asset amount shown as supplied therefore differed from the borrowing capacity that position contributed. Account headroom could change with prices or collateral factors even when the cToken quantity stayed unchanged.
Market membership also changed which check applied. When the account had not entered the selected market, the controller skipped that redemption's account-liquidity calculation. The market still needed enough cash and the account still needed the cTokens it sought to redeem.
Repayment in the debt market
Debt repayment could increase collateral headroom and return cash to a lending market, with each effect depending on the position and market receiving repayment. The loan's underlying asset determined the repayment asset. Supplied lending tokens and outstanding borrowing remained separate balances.
Interest before repayment
The legacy repayment path accrued interest before calculating the amount owed. It reduced debt by the underlying tokens the market actually received. A previously read borrowing balance could therefore differ from the balance used during execution. The legacy repayment path treated
type(uint256).max
as the full debt after interest accrual.
A successful repayment changed the debt later collateral calculations needed to cover. If borrowing remained in another market, that debt continued to enter the account's collateral calculation.
Cash restored to one market
The repayment transfer increased cash in the market receiving the loan asset. If the desired collateral withdrawal concerned another market, that repayment did not transfer cash into the collateral market. It could remove a collateral restriction while leaving the withdrawal cash-limited. Repayments by other borrowers could replenish the selected market, although competing withdrawals could consume that liquidity.
Deprecated borrowing and liquidation exposure
The legacy controller permitted liquidation of a loan in a deprecated market without requiring an account shortfall. Its deprecation test required a zero collateral factor, paused borrowing, and a reserve factor of 100%. Ordinary liquidation required a shortfall and applied the configured close factor. The deprecated branch allowed repayment up to outstanding debt. The sunset announcement alone did not establish whether a particular market met that contract test. Ordinary collateral headroom therefore did not settle liquidation eligibility under every market state.
Lending redemptions, staking exits, and reward claims
A lending redemption concerned cTokens and the selected market's underlying asset. The staking interface concerned MENDI and sMendi, with Stake, Unstake, and Withdraw controls.
The claims display separately listed pending MENDI allocations under LGE and LGE Bonus, plus LINEA claims for MLP/MLP-L. Those amounts had different meanings from a supplied lending balance or market cash. Redeeming a lending position alone did not establish whether the account had completed a staking withdrawal or a separate allocation claim.
Contract actions and their exit constraints
The legacy code separated asset redemptions from operations for repaying debt, removing collateral membership, and transferring lending-token ownership to another account.
| Legacy action | Position change | Main exit constraint |
|---|---|---|
| Redeem a cToken amount | Exchanged the chosen lending-token quantity for underlying assets | Enough cTokens and market cash; required collateral check passed |
| Redeem an underlying amount | Returned the chosen underlying quantity against cTokens | Enough cTokens and cash; required collateral check passed |
| Repay the caller's loan | Reduced the caller's debt by tokens the market received | Payer supplied the debt market's underlying asset |
| Repay another account's loan | Reduced the selected borrower's debt | Payer funded that account's repayment in its debt market |
| Exit collateral membership | Removed the market from the account's collateral calculation | No debt in that market; full removal passed the collateral check |
| Transfer cTokens | Moved lending-token ownership to the recipient | Transfers unpaused; sender passed the controller's checks |
The
exitMarket
operation removed collateral membership without returning underlying assets. Its same-market debt check and full-removal test made its boundary different from a partial redemption. A cToken transfer likewise left the underlying assets inside lending-market accounting; the recipient held the transferred lending claim.
Temporary interface access and redemption records
The sunset notice described smart-contract access after a limited withdrawal-interface window, without specifying a calendar cutoff for that window. Interface access affected how a transaction could be prepared. Direct interaction still required the relevant legacy market on Linea and its matching contract interface. Changing the access method did not remove the market's redemption constraints.
A successful redemption reduced the redeemer's cToken balance and transferred underlying assets to that account. The market's
Redeem
event recorded the redeemer, underlying redemption amount, and cTokens exchanged. Those records distinguished an asset redemption from a collateral-membership change or a reward claim. A transaction submission identified an attempted action; the completed transfer and corresponding balance changes established the lending payout. Market cash and account state at execution determined whether a request could succeed, even when an earlier read had shown room to withdraw.
What to know about Mendifinance withdrawals
Did a deposit pause also block legacy Mendifinance withdrawals?
A deposit pause did not, by itself, block the legacy redemption path. The controller checked the deposit pause when authorizing supply through minting. Redemption used a different authorization path, followed by freshness and cash checks. It could still reject a withdrawal because of insufficient cash, a collateral shortfall, or another redemption requirement.
What happened to cTokens when a redemption transaction reverted?
A reverted legacy redemption left no committed reduction in the account's cToken balance. Although the contract reduced balances before transferring underlying assets, a revert rolled back the redemption's contract-state changes. This included a failed transfer-out after the balance update. A successful partial redemption instead committed the reduction corresponding to the lending tokens exchanged.
Would a zero oracle price prevent a collateral withdrawal?
A zero oracle price in a relevant entered market caused the legacy account-liquidity calculation to return a price error. Redemption rejected that error when the account had entered the selected market. Enough market cash alone could not authorize the withdrawal. For an account outside the selected market, the controller skipped this liquidity calculation, so the price-error condition belonged to the collateral-check path.
Was an underlying-token spending approval necessary for ERC-20 redemption?
The direct legacy ERC-20 redemption path did not require an underlying-token spending approval from the redeemer. It transferred the market's underlying assets outward and reduced the caller's cToken balance internally. Repayment differed because its transfer-in logic took underlying tokens from the payer and depended on sufficient balance and allowance.
Where did assets arrive after a direct legacy lending redemption?
A direct legacy lending redemption returned the selected market's underlying assets to the redeemer on Linea. The redemption call transferred assets from the market to the caller without a bridge operation. Historical cross-chain deposits did not establish a cross-chain withdrawal route. Moving received assets to another network required its own supported transfer mechanism.
Could an approved spender redeem cTokens directly from my wallet?
The direct legacy redemption call used the caller's own cToken balance, even when another wallet had granted a transfer allowance. An allowance permitted transferFrom to move lending tokens subject to controller checks. It did not change the account the redemption path treated as the redeemer.