Skip to content

Add cross-contract composability interface for DeFi protocol integration #291

Description

@Chuks-coderr

Overview

External Soroban contracts such as lending protocols or DAOs cannot currently integrate with SoroStream streams programmatically, limiting composability within the Stellar DeFi ecosystem.

Problem

There is no standardized interface that external contracts can call to create, query, or interact with streams, preventing SoroStream from becoming a composable primitive in the Stellar DeFi stack.

Proposed Solution

  • Define a StreamInterface trait exposing create_stream, withdraw, cancel_stream, get_stream, and get_claimable with standardized types
  • Implement the trait on the SoroStream contract
  • Document the interface as the canonical integration target for external contracts
  • Provide a minimal cross-contract call example in the test suite

Acceptance Criteria

  • StreamInterface trait defined in a dedicated module
  • All listed functions exposed through the trait with correct signatures
  • Cross-contract call integration test demonstrates an external contract creating and withdrawing from a stream
  • Interface documented with parameter types and error codes
  • ABI types remain backward compatible

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: highComplex feature, refactor, or new integrationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions