📖
Flipside-Wiki
  • Welcome to Flipside-Wiki
  • Information
    • Public Flipside Links
      • Twitter
      • Discord
      • YouTube
      • SQL-Models
      • Github
    • Flipside Official Documentation
    • Flipside Database Status
    • Flipside Power Tools
    • External Guides
    • Flipside Query Tips and Tricks
      • Export To AWS Bucket
    • Flipside Vouches and Thanks
    • Kida's Bounty Payments
  • Bounties
    • AAVE
    • Abracadabra
    • Apollo
      • QUERY - StrategyID to Name
    • Algorand
      • QUESTIONS - Payouts
      • QUERY - Random
      • NOTES - Yieldly
      • NOTES - Swap + Escrow
      • NOTES - Bootstrap
      • NOTES - Old Txs
      • TUTORIAL - ASA Buy/Sell
    • Anchor
      • AVAX - Anchor
      • QUERY - Liquidations
      • QUESTIONS - Payout
      • DASHBOARDS - Best
      • DASHBOARD - Anchor Interest Rate
      • PROJECTS - that use Anchor
    • Angel Protocol
    • Astroport
    • ConstitutionDAO
      • QUESTIONS - Payout
    • Defi Kingdoms
      • CONTRACTS - Harmony
      • BOUNTY - Link
      • MISC - Transactions To Track
      • MISC - Taxable Events
      • MISC - ONE to 0x Conversion
      • MISC - Dev FAQ
      • WEBSITE - https://dfk-report.vercel.app ( built by me )
      • WEBSITE - DFK Dev Community
    • ENS
    • Friends With Benefits
    • Katana
    • MakerDAO
    • Mars Protocol
    • Mirror
      • QUERY - Starter
    • Olympus DAO
      • OHM - 3,3 PoolTogether
    • Orbs
    • Orion Money
    • Paraswap
    • Polygon
    • Rari Fuse
    • Ribbon
    • Solana
      • HINT - Swaps
      • DATA - Transfers
      • QUERY - CEX
      • Data - Tokens
    • Stader
    • SushiSwap
      • QUESTIONS - Payout
      • Query - Random
      • QUERY - Using Sync Events
      • DOCS - Uniswap
    • Terra
      • QUESTIONS - Payout
      • QUERY - Validators
      • QUERY - Addresses
      • QUERY - NFT Contract Addresses
      • QUESTION - msgs vs msg_events
      • NFT - Marketplaces
    • Terraswap
    • Terra - Galactic Punks
      • MISC - Transactions
    • Terra - Knowhere
      • QUERY - Sales
      • STRUCT - Collection Addresses
    • Terra - Levana Dragons
      • QUERY - Dust
      • QUERY - Eggs
      • QUERY - Meteors
      • GOOGLEDOC - LVN Starters
    • Terra - Loopr
      • QUERY - Liquidity Pools
    • Terra - Random Earth
      • QUERY - Sales
      • STRUCT - Collection Addresses
    • Terra - Talis
    • Terra - Wormhole
      • STRUCT - VAA_Data
      • QUERY - VAA_DECODEING
      • TOOL - Python Decoder
      • QUERY - Tokens
      • Query - Movement Into Terra
      • QUERY - Movement Out of Terra
    • THORChain
      • QUESTIONS - Payout
      • QUERY - RaiseTheCaps
      • QUERY - Daily Active Validator Count
    • Uniswap
      • QUESTIONS - Payout
    • Valkyrie Protocol
    • Visor - Gamma
      • QUERY - Contracts
  • Massnomis Guides
    • Guides
      • 12 Dec 2021
      • 21 Nov 2021
      • 15 Nov 2021
      • 07 Nov 2021
      • MID OCTOBER 2021
      • EARLY OCTOBER 2021
      • SEPTEMBER 17 2021
      • LATE AUGUST 2021
      • MID AUGUST 2021
      • AUGUST 6 2021
      • JULY 30 2021
      • JULY 23 2021
      • JULY 16 2021
      • JULY 9 2021
      • JULY 1 2021
    • Links
  • Testing Area
    • Image Upload Test
    • Luna Breakdown
Powered by GitBook
On this page
Edit on GitHub
  1. Bounties
  2. Algorand

NOTES - Swap + Escrow

So here a bit of orders/orderbook concepts from a traditional exchange come into picture

  • When you create an order, be it sell or buy type, if it's not a market buy/sell...You are creating an escrow address that holds your bid/ask amount

  • If you are market buy/sell, you are trading with someone's escrow address.

  • The order/escrow's first txn has the note: OPEN ORDER

  • Partial execution is something like: partial fill

  • Need to find the case where the escrow/order is fully filled

Posting a base64 decoded tx_message:txn:note  
{"LGRN26YU3XVI4FLZPDCDGDHQUMKM2A3CGNOFPGK3CSW7RIE4M3PWYC2P2E-254121594-[execute_partial]_[asa] ":{"orderEntry":"1-3-0-254121594","price":3,"n":1,"d":3,"min":0,"version":7,"escrowAddr":"7KYIOB2AIDIKPQN5QLJQTKQAWKG6GTIOQ7S6G5HSD7D77OIW6QCFYEPAQ4","algoBalance":498000,"asaBalance":14684501,"escrowOrderType":"sell","isASAEscrow":true,"orderCreatorAddr":"LGRN26YU3XVI4FLZPDCDGDHQUMKM2A3CGNOFPGK3CSW7RIE4M3PWYC2P2E","assetId":254121594,"forceShouldClose":false,"useForceShouldCloseOrNot":true,"txnNum":0}}

  • execute_partial -> case where the order has partially filled, there's still some amount left in the orderbooks

  • escrowAddr -> escrow wallet Now interesting bit is mapping all buys and sells... Since every partial buy/sell is to be counted Here's a escrow as a case study:

  • https://algoexplorer.io/address/ZH7QQCIQAADHYDOUAH77KMJDKDQ6GKNTHG2D64JV3V6VN66XV57EJU2WYQ The very last set of txns are all: execute_full as in the final sell/buy that filled/completed the order

  • Order placement/open: https://algoexplorer.io/tx/group/xI4UCNnnyZCaVlZ8HtaUjC2Jdy6ubfrN9hNE6xcjx%2FI%3D

  • Partial fill: https://algoexplorer.io/tx/group/pqUYHvEIQj6pWbEZWQaCG192kDuBiE6gaCrGwIXvDyg%3D

  • Execute Full/Close/Filled: https://algoexplorer.io/tx/TDQCSGQAAHA3GQED3ZJ5ELFIG53XPZJKW2F2BTRWOMFPPYBZBF2Q

PreviousNOTES - YieldlyNextNOTES - Bootstrap

Last updated 3 years ago