Skip to content

Implement withdraw_collateral #92

@0x-r4bbit

Description

@0x-r4bbit

withdraw_collateral(amount) in stablecoin/src/:

  • Accrue any outstanding stability fees on the position first
  • Check that withdrawing amount keeps the collateralization ratio above the minimum
  • Issue a chained Transfer from the vault back to the user's collateral holding account
  • Update Position.collateral_amount

Collateralization check requires price feed and redemption price.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions