Swapping between LSTs
The following section details how to swap LST to LST using wispSui's vdAMM.
Required package
LSDfi::lsdfi::swap
Type parameters:
I
: LST to put into poolO
: LST to get back
Parameters:
pool_registry
: mutable reference to LSDFIPoolRegistry objectaggregator
: reference to Aggregator object in WispLSDFIAggregator packagein_coin
: LST coin of type Iclock
: reference to Clock object (address:0x6
)ctx
: mutable reference to TxContext
Use: Swap in_coin
to the desired LST coin type. Returned coin will be transfered to sender
LSDfi::lsdfi::swap_non_entry
Same as swap
but return a Coin of O type for further action instead of transferring to sender
LSDfi::lsdfi::swap_mul_coin
Same as swap
but use multiple Coins, leftovers will be transferred back to sender
Last updated