onflow / flips

Flow Improvement Proposals
25 stars 22 forks source link

Pool-Based DEX Swap Standard #177

Open vishalchangrani opened 1 year ago

vishalchangrani commented 1 year ago

https://github.com/onflow/flips/blob/7992e12453be5281fbbee2423e2f579c8306380e/application/20230522-pool-based-dex.md

bluesign commented 12 months ago

I don't think there is a need for Capability version of the functions. What is the use case for them?

pub fun swapExactSourceToTargetTokenUsingPath(
        sourceToTargetTokenPath: Type[],
        sourceVault: @FungibleToken.Vault,
        exactTargetAmount: UFix64,
        expiry: UFix64,
        recipient: Capability<&{FungibleToken.Receiver}>,
        remainingSourceTokenRecipient: Capability<&{FungibleToken.Receiver}>
    )
KshitijChaudhary666 commented 1 month ago

Hi @satyamakgec - were we able to make a decision on this yet?