Vulcan Forge
  1. Loans
Vulcan Forge
  • Introduction
  • Getting Started
  • Authentication & Authorization
  • Core Concepts
    • Terminology
    • Regulated Assets
    • Tenants
    • Mapping & Labelling
    • Solana Networks
    • Transaction Processing
    • Key Management
    • Read Layer
  • API Reference
    • Blockchain Accounts
      • Create Account
      • Fetch Account Details
      • Fetch Account Balance
      • Fetch Account Private Key
      • Fetch Accounts
      • Update Account
      • Inactivate Account
    • Financial Instruments
      • Create Financial Instrument
      • Update Financial Instrument
      • Fetch Financial Instrument Details
      • Fetch Financial Instruments
      • Token Extensions Calculator
    • Positions
      • State
        • Initialize Position
        • Close Position
        • Freeze Position
        • Unfreeze Position
      • Movements
        • Mint
        • Burn
        • Transfer Financial Instrument
        • Transfer SOL
      • Trades
        • Trade
      • History
        • Fetch Positions
        • Fetch Position Details
        • Fetch Position Balance
    • Loans
      • Create Loan
        POST
      • Fetch Loan Details
        POST
      • Fetch Loans
        POST
      • Swap Collateral
        PATCH
      • Repay Loan
        PATCH
      • Close Loan
        PATCH
      • Refinance Loan
        PATCH
    • Blockchain Transactions
      • Processing
        • Fetch Transaction Status
        • Sign Transaction
        • Submit Transaction
      • Durable Nonces
        • Create Durable Nonce Accounts
        • Fetch Durable Nonce Account Details
        • Fetch Durable Nonce Accounts
      • Address Lookup Tables
        • Create Address Lookup Table
        • Fetch Address Lookup Table Details
        • Fetch Address Lookup Tables
        • Extend Address Lookup Table
        • Update Address Lookup Table
      • History
        • Fetch Transactions
        • Fetch Transaction Details
    • Market Data
      • Update Feed
  • Schemas
    • Accounts
      • DKG
        • DKG Key Setup
      • Offchain References
      • Account Lookup
      • New Account
      • Tenancy Config
      • Account Balance
      • Offchain File
    • Transactions
      • Solana Transaction Config
      • Commitment Config
      • Transaction Lookup
    • Query
      • Query Components
        • Sort Model
        • Field Value Filter
        • Filter Model
      • Items Query
    • Reponses
      • Errors
        • Individual Error
        • Error Response
      • Accounts
        • Private Keys
          • Private Key Details
          • Database Private Key Details
          • Cloud Provider Resource Location
          • DKG Private Key Details
        • Account Response Detailed
        • Account Onchain Detailed
        • Account Offchain Detailed
        • Account Response Identifiers
        • Account Offchain Compact
        • Account Response Compact
        • Account Onchain Compact
      • Transactions
        • Solana Transaction Result
        • Solana Entity Result
      • Positions
        • Position Offchain Result
    • Positions
      • Position Lookup
      • Transfer Financial Instrument Definition
      • Burn Definition
      • Mint Definition
      • Transfer SOL Definition
      • Position Balance
    • Loans
      • Loan Duration
  1. Loans

Create Loan

Testing
Development
https://vf-solana-api.dev.alphaledger.com
Development
https://vf-solana-api.dev.alphaledger.com
POST
/api/v1/loans
Creates Solana Transaction:Always
OperationId:createLoan
Creates a loan and establishes a new onchain escrow wallet for it. The pledged items are deposited into this escrow and the borrowed items are transferred from the lender to the fee payer.
Defi Lending Protocols supported:
Loopscale
For LOOPSCALE loans:
The account specified in the loopscaleDetails.loanStrategyAddress will become the lender (i.e. the vault that finances the borrowedItems) on the loan. An onchain vault needs to be setup ahead of time and it needs to be configured to accept the pledgedItems in escrow. To have this vault created, the tenant would need to make arrangements with Loopscale for its details and its creation. Alternatively an existing vault could be used as long as Loopscale has configured it to add to the list of items accepted (for escrow) the financial instruments that the VF tenant plans to used in the pledgedItems positions.
the account of the borrower needs to be passed as the lookup in the solanaTransactionConfig.feePayer. Because the feePayer cannot be different than the borrower account set on the loan.
To obtain a loan, collateral has to be posted as a pledge into the loan vault. This endpoint allows for the transfer of:
itemData.itemsToPledge: existing inventory of a financial instruments in a certain wallet/position (the asset can be transferred from another wallet into the borrower wallet) AND/OR a new asset that should be minted (into the borrower wallet) before being transferred for pledging, in the same transaction.
Please note that the owner account across all assets to be borrowed and pledged has to be the same.
If the financial instruments being pledged have a default account state of Frozen, the endpoint automatically adds unfreeze instructions, so these items can be deposited into the escrow pledged positions. In this case, in order to stay within the maximum Solana transaction size, tradeoffs need to be made: i.e. fewer items can be pledged at the time the loan is created and itemData.itemsToPledge.transferFrom and itemData.itemsToPledge.mintAsset cannot be used. Use the swap collateral item endpoint to add more pledged items after loan creation. And before the loan creation, use the position movements endpoints to prefund the necessary positions token balances inventory into the borrower wallet, which will then allow the pledging to occur at loan creation time.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Query Params

Header Params

Body Params application/json

Examples

Responses

🟢201Created
application/json
Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
🔴500Internal Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://vf-solana-api.dev.alphaledger.com/api/v1/loans?solanaClusterId=SOLANA_DEVNET' \
--header 'x-request-id: f9860f73-a466-41f2-a083-34eeb1cc3a3c' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "itemData": {
        "defiProtocol": "LOOPSCALE",
        "loopscaleDetails": {
            "loanStrategyAddress": "6tv6XYnXUFjLSaAeap4T1GQusYeEw3nK6KTcVyyHf3ns",
            "expectedLoanValues": {
                "expectedApy": 80000,
                "expectedLqt": [
                    800000,
                    800000,
                    800000,
                    800000,
                    800000
                ]
            }
        },
        "itemsToBorrow": [
            {
                "positionLookup": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "amount": 100.5,
                "transferTo": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                }
            }
        ],
        "itemsToPledge": [
            {
                "positionLookup": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "amount": 100.5,
                "transferFrom": {
                    "position": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "owner": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "financialInstrument": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "mintAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    },
                    "freezeAuthority": {
                        "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
                        "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
                        "offchainReferences": {
                            "alId": "ALFNDPF000153778",
                            "organizationExternalId": "ALT",
                            "accountNumber": "ALT10000233",
                            "code": "some-authority",
                            "type": "WALLET"
                        },
                        "isOtherTenantSigner": false,
                        "otherTenantOrganizationExternalId": "ALIM",
                        "offPlatform": false
                    }
                },
                "mintAsset": false
            }
        ],
        "duration": {
            "code": "DAYS",
            "unit": 1
        },
        "submitTransaction": true
    },
    "solanaTransactionConfig": {
        "feePayer": {
            "onchainId": "GPjDgRPhSuJSya5GbaCWkYCDqcyL6N3ZBge9XMJsDton",
            "offchainId": "1b03ae9a-348c-4c18-8727-20c7c4ae7a0a",
            "offchainReferences": {
                "alId": "ALFNDPF000153778",
                "organizationExternalId": "ALT",
                "accountNumber": "ALT10000233",
                "code": "some-authority",
                "type": "WALLET"
            },
            "isOtherTenantSigner": false,
            "otherTenantOrganizationExternalId": "ALIM",
            "offPlatform": false
        },
        "computeUnitConfig": {
            "enable": true,
            "limit": 1400000,
            "price": 35000,
            "priceEstimate": {
                "provider": "HELIUS",
                "calculationStrategy": "DEFAULT"
            }
        },
        "commitmentConfig": {
            "commitmentLevel": "processed"
        },
        "messageLifetimeStrategy": "RECENT_BLOCKHASH",
        "transactionVersion": "V0"
    },
    "tenancyConfig": {
        "overrideOrganizationExternalId": "ALIM"
    }
}'
Response Response Example
201 - Example 1
{
    "newEscrow": {
        "onchainId": "ndA7eTfoWqrczXYUq53gNRRjQgEmufqErXbgXUFFUAA",
        "offchainId": "1a1e904d-0d95-4e66-85e1-88a57774e910"
    },
    "lender": {
        "onchainId": "ndA7eTfoWqrczXYUq53gNRRjQgEmufqErXbgXUFFUAA",
        "offchainId": "1a1e904d-0d95-4e66-85e1-88a57774e910"
    },
    "borrowedItemsPositions": [
        {
            "onchainId": "ndA7eTfoWqrczXYUq53gNRRjQgEmufqErXbgXUFFUAA",
            "offchainId": "1a1e904d-0d95-4e66-85e1-88a57774e910"
        }
    ],
    "pledgedItemsPositions": [
        {
            "onchainId": "ndA7eTfoWqrczXYUq53gNRRjQgEmufqErXbgXUFFUAA",
            "offchainId": "1a1e904d-0d95-4e66-85e1-88a57774e910"
        }
    ],
    "solanaTransaction": {
        "success": false,
        "offchainId": "ee36c656-aa74-4d6a-b23c-332c204cb202",
        "status": "SIGNED",
        "onchainId": "5nwo7XvhiVRpJasEzH5r3hGKJqaTxd7qVit3cedFJgESdAPrmawebMJu6fUKRfjXEaivuey7vBsW56xPxX76T1bm",
        "confirmationsCount": 2,
        "serializedMessage": "string",
        "errorMessage": "string",
        "txnTimestamp": "2025-10-21T16:17:45.035372Z"
    }
}
Modified at 2025-12-05 08:59:24
Previous
Loans
Next
Fetch Loan Details
Built with