Sirius Finance
  • Welcome to Sirius Finance
  • Get started
    • What is stablecoin AMM?
    • Why Sirius Finance?
    • Why on Astar Network?
    • Sirius Finance pools and algorithm
    • How to gain SRS&veSRS?
    • How does voting right work?
    • Roadmap
  • FAQ
    • Why my $ORU unlock date keep extending?
    • How does the voting mechanism work?
    • Why did my transaction fail?
    • How does unstable crypto pool work?
  • User Guidance
    • Add Astar Network to yourMetamask
    • Add assets to your Metamask
    • Create a Polkadot.js wallet
    • Transfer assets to Astar Network
    • Swap to have the best combo of assets
    • Gain 4SRS LP tokens
    • Earn SRS
    • Join the governance and vote
    • How to withdraw your assets
    • Why is veSRS worth earning
  • Risks
    • Risks of using Sirius Finance
    • Permanent loss of a peg
    • Audits
  • Join Sirius Community
    • OG enrollment program
    • Kickoff rewards program
    • Early adopter program
  • Development
    • Smart Contracts
      • Swap
      • Pool
      • Farming
    • Frontend
Powered by GitBook
On this page
  • Contract info
  • Interfaces
  • Write functions
  • Swap
  1. Development
  2. Smart Contracts

Swap

PreviousSmart ContractsNextPool

Last updated 2 years ago

Swap provides functionalities that are used to exchange a token for another regardless if it's a stable coin or a standard crypto token.

Contract info

Contract name: Swap

Contract address

  • 4Pool: 0x417E9d065ee22DFB7CC6C63C403600E27627F333

  • Starlay 4Pool: 0x0fB8C4eB33A30eBb01588e3110968430E3E69D58

  • BAI Metapool: 0xD18aD1e2992Da974b5A8d69377e6aB3b16e30F29

  • JPYC Metapool: 0x3cd1Fa4EeeFdf6c30E66c66A474e8E4dd509f54c

  • WBTC Metapool: 0xD25Cf814EeE54840A08Db8dfAbFE445B1DE37f0f

  • WETH Metapool: 0x2d5Da7c463B3E8f4CF1AF08a1aA0a5DB9BB644F7

  • WBNB Metapool: 0xC9d4f937Fa8e0193b46817a41435a262867ff090

  • oUSD Metapool: 0xD18AbE9bcedeb5A9a65439e604b0BE8db0bdB176

View


Interfaces

Write functions

Swap

void swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline);
Sirius on Github