Skip to content

Collateral Escrow Contract #24

Description

@OlufunbiIK

Complexity: High

Problem: When an investor funds an invoice, the RWA token must be locked and USDC released to the borrower automatically.

Scope: Build the CollateralEscrow contract that accepts an RWA token as collateral, holds USDC from the investor, and releases it to the borrower at agreed LTV. Key methods: lock_collateral(token_id, borrower, investor, usdc_amount, ltv, due_date), release_funds(), repay(amount), get_escrow(escrow_id), get_status(escrow_id)

Acceptance criteria: Funds locked correctly. USDC released to borrower on release_funds(). Collateral returned on full repayment.

Files to create:
contracts/collateral-escrow/src/lib.rs
contracts/collateral-escrow/src/types.rs
contracts/collateral-escrow/src/storage.rs
contracts/collateral-escrow/src/errors.rs
contracts/collateral-escrow/Cargo.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions