Skip to content

Portfolio contract #2

@hieronx

Description

@hieronx
  • Stores list of items (fka loans, assets), with
struct Collateral {
  IERC6909 source;
  uint256 id;
}

struct Item {
    address owner;
    Collateral collateral;
    uint128 outstanding_quantity;
    uint128 outstanding_normalized_debt;
    IERC7726 valuation;
}

mapping (uint64 poolId => mapping (uint128 itemId => Item)) items;
  • Write methods to
    • create(uint64 poolId, address collateralSource, uint256 collateralId, address owner)
      • locks ERC-6909 NFT
      • create item in storage
    • increase_debt(uint64 poolId, itemId, amount)
      • only callable by owner
    • decrease_debt(uint64 poolId, itemId, principal, interest, unscheduled)
      • only callable by owner
    • transfer_debt(uint64 poolId, ..)
      • only callable by owner

Metadata

Metadata

Assignees

Labels

✋ on holdIssue/PR currently on hold

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions