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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions