naftiko: 1.0.0-alpha2 info: label: Blockdaemon DeFi API — Lend and Borrow description: Deposit, borrow, repay, withdraw, and position lookup against Aave V2/V3 and Compound V2/V3 lending markets via the Blockdaemon DeFi API. tags: - Blockdaemon - DeFi - Lending - Borrowing - Aave - Compound created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: BLOCKDAEMON_API_KEY: BLOCKDAEMON_API_KEY capability: consumes: - type: http namespace: defi-lend-borrow baseUri: https://api.expand.network description: Lending and borrowing endpoints. resources: - name: lend-borrow-pools path: /lendborrow/getpools operations: - name: getpools method: GET description: Returns supply/borrow APYs, liquidity, and reserves across pools. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: protocolId in: query type: string required: true - name: lend-borrow-deposit path: /lendborrow/deposit operations: - name: deposit method: POST description: Build a deposit transaction. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object required: true - name: lend-borrow-borrow path: /lendborrow/borrow operations: - name: borrow method: POST description: Build a borrow transaction. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object required: true - name: lend-borrow-repay path: /lendborrow/repay operations: - name: repay method: POST description: Build a repay transaction. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object required: true - name: lend-borrow-withdraw path: /lendborrow/withdraw operations: - name: withdraw method: POST description: Build a withdraw transaction. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object required: true - name: lend-borrow-positions path: /lendborrow/getuserpositions operations: - name: getuserpositions method: GET description: Snapshot of a user's active lend/borrow positions across markets. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: protocolId in: query type: string required: true - name: address in: query type: string required: true authentication: type: apikey key: X-API-Key value: '{{env.BLOCKDAEMON_API_KEY}}' placement: header exposes: - type: rest namespace: defi-lend-borrow-rest port: 8080 description: REST adapter for lending and borrowing. resources: - path: /v1/defi/lendborrow/deposit name: lend-borrow-deposit description: REST surface for deposits. operations: - method: POST name: deposit description: Create a deposit transaction. call: defi-lend-borrow.deposit with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: defi-lend-borrow-mcp port: 9090 transport: http description: MCP adapter for lending markets. tools: - name: blockdaemon-get-pools description: Returns supply/borrow APYs across lending pools. hints: readOnly: true destructive: false idempotent: true call: defi-lend-borrow.getpools with: protocolId: tools.protocolId outputParameters: - type: object mapping: $. - name: blockdaemon-deposit description: Create a deposit transaction. hints: readOnly: false destructive: false idempotent: false call: defi-lend-borrow.deposit with: body: tools.body outputParameters: - type: object mapping: $. - name: blockdaemon-borrow description: Create a borrow transaction. hints: readOnly: false destructive: false idempotent: false call: defi-lend-borrow.borrow with: body: tools.body outputParameters: - type: object mapping: $. - name: blockdaemon-repay description: Create a repay transaction. hints: readOnly: false destructive: false idempotent: false call: defi-lend-borrow.repay with: body: tools.body outputParameters: - type: object mapping: $. - name: blockdaemon-withdraw description: Create a withdraw transaction. hints: readOnly: false destructive: false idempotent: false call: defi-lend-borrow.withdraw with: body: tools.body outputParameters: - type: object mapping: $. - name: blockdaemon-get-user-positions description: Get a user's lend/borrow position snapshot. hints: readOnly: true destructive: false idempotent: true call: defi-lend-borrow.getuserpositions with: protocolId: tools.protocolId address: tools.address outputParameters: - type: object mapping: $.