Skip to content

Lending Pool Contract #25

Description

@OlufunbiIK

Complexity: High

Problem: DAOs and investors need a shared pool to collectively fund invoices and earn proportional yield.

Scope: Build the LendingPool contract that accepts USDC deposits, tracks shares per depositor, allocates funds to escrows, and distributes yield on repayment.

Key methods: deposit(investor, amount), withdraw(investor, amount), allocate(escrow_id, amount), distribute_yield(escrow_id, yield_amount), get_share(investor)

Acceptance criteria: Depositors receive shares proportional to their deposit. Yield is distributed pro-rata. Withdrawal respects available (undeployed) liquidity.

Files to create:
contracts/lending-pool/src/lib.rs
contracts/lending-pool/src/types.rs
contracts/lending-pool/src/storage.rs
contracts/lending-pool/src/math.rs
contracts/lending-pool/src/errors.rs
contracts/lending-pool/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