Withdraw funds
If a liquidity provider wishes to remove funds from the pool, they must complete a withdrawal.
Before signaling a withdrawal, funds have to have been sent to the pool. If this is the case, a withdrawal can be signaled using the
signal-withdrawal()
function on the supplier-interface
contract:(define-public (signal-withdrawal
(lp-token <lp-token>)
(token-id uint)
(amount uint))
)
Field name | Type | Description |
---|---|---|
lp-token | lp-token | Contract principal using the lp-token-trait trait (current deployment is .lp-token ). |
token-id | uint | Token ID associated to the pool that we're withdrawing from. |
amount | uint | The amount to be withdrawn. |
Last modified 26d ago