Withdraw funds
After payments have been done to a loan, all liquidity providers earn a share of the BTC rewards. This is how to complete withdrawal.

(define-public (signal-withdrawal
(lp-token <lp-token>)
(token-id uint)
(amount uint))

lp-token: Contract principal using the lp-token-trait trait (current deployment is .lp-token).
token-id: token ID associated to the pool that we're withdrawing from
amount: the amount of
Copy link
On this page
1. Funds have to have been sent to the pool before doing this. Before being able to withdraw funds, a withdrawal has to be signaled.