- (Optional) Recover BLND rewards. If your users have accrued BLND emissions on Blend and you want to sweep them into a wallet before migrating, call
POST /migration/claim-blndfirst. If you do not care about the BLND rewards, skip this step. - Migrate the USDC position. Call
POST /migration/blend-to-defindexto atomically withdraw the user’s full Blend USDC position and deposit it into a DeFindex vault.
POST /migration/claim-blnd
Claims the user’s first available BLND claimable balance (the standard place Blend leaves emission rewards) and forwards the BLND to a destination wallet. The returned transaction wraps the claim and payment between an open-trustline and a close-trustline operation, so the user does not need to keep a permanent BLND trustline on their account.
Response:
amount is the BLND being forwarded, formatted with 7 decimal places. Surface it to the user before they sign.
One thing to watch: this XDR is a classic Stellar transaction, not a Soroban one. Submit it directly to Horizon; the POST /send endpoint will not accept it.
Errors: 400 when an address is invalid, 404 when the user has no BLND claimable balance or the account does not exist.
POST /migration/blend-to-defindex
Atomically withdraws the user’s full Blend USDC position and deposits the proceeds into a DeFindex vault, in a single signed transaction. The endpoint reads the user’s Blend position on-chain and computes the exact withdrawal amount on the server side, handling the small interest accrual that happens between simulation and submission so the user always receives at least what was simulated. Your client only passes two addresses:
Response:
simulationResponse carries the decoded return values of the simulated transaction, useful for previewing the result to the user before they sign. operationXDR is the raw operation, in case you need to rebuild the transaction with a different fee or timeout. Sign xdr and submit it through your own RPC or POST /send.
Errors: 400 when an address is invalid or the user holds both a supply and a collateral position at once (contact us if you hit this for a real user), 404 when the user has no Blend USDC position to migrate.