Skip to content

the order in swap #161

@LongShao007

Description

@LongShao007

https://github.com/raydium-io/raydium-clmm/blob/master/programs/amm/src/instructions/swap.rs#L653

original order:

  1. transfer token from user to pool
  2. check vault amount, freeze pool
  3. transfer token from pool to user

I think the correct order:

  1. check vault amount, freeze pool
  2. transfer token from user to pool
  3. transfer token from pool to user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions