Use this file to discover all available pages before exploring further.
A Decentralized Exchange (DEX) is an application that allows users to trade tokens (native and fungible tokens) through smart contracts.DEXs work by having pools of token pairs (e.g., NEAR-USDC) that users can deposit tokens into. The ratio of tokens in the pool determines the exchange rate for a swap. Swapping means adding tokens to one side of the pool while removing tokens from the other side.
This documentation refers to Ref Finance, a community-built DEX on NEAR. Check their official docs for more information.
Do NOT transfer NEAR tokens to Ref Finance. Instead, call near_deposit in the wrap.near contract, attaching the amount of NEAR you want to swap. This will mint wrap.near for you, which you can then transfer to Ref Finance.