XTrading.exchange
  • ⭐Getting Started
    • 👋Overview
    • 📖Perpetual Basics
  • 🔥XTrading Alpha
    • 🤖AI Terminal
    • 🦾AI-Enabled Support
    • 🛠️MCP(Model Context Protocol) ready
    • ⌨️Keyboard Shortcuts
    • 📊Change layout
    • 🌟Lite Mode
    • 👆Fat Finger Protection
    • 😎Pro Mode
    • 🔔Notification in TG
  • 💡Product Fundamentals
    • 💸Margin Specs
    • 💰Funding Payments
    • 🔻Liquidation
    • 🖼️NFT Selection Criteria
  • 📑Core Contracts
    • 📖OrderBook
    • 📊Margin
    • 💻Protocol Vault
    • 📃Smart Contract Details
  • 📓Developer Docs
    • 📉Liquidation Doc
    • 📜Whitepaper
  • 🎓Legal Docs
    • 🔏Privacy Policy
    • 🔍Terms and Conditions
  • 📚Additional Resources
    • 🔖Glossary
    • ❓FAQs
    • 🛣️Roadmap
  • 🤝Community
    • 🔎Feature Request Form
    • 🤚Product Feedback Form
  • 💰EARN $XTRA
    • 🤝1,000,000 $XTRA Community Activity Pool
    • ⭐XTrading Ambassador Program - Batch 1
    • 📈Trade on XTrading and Earn Points
  • 🗣️Socials
    • 🔗Website
    • 👽Discord
    • 🐦Twitter
    • 🔊Telegram
    • 📺YouTube
Powered by GitBook
On this page
  • Write Methods
  • receiveDepositWETH
  • receiveDepsoitInOtherToken
  • withdraw
  1. Core Contracts

Protocol Vault

Protocol Vault deals with all token transfers and monetary transactions as well as receive all the allowances and keeps all the tokens.

PreviousMarginNextSmart Contract Details

Last updated 1 year ago

Protocol Vault is responsible for all token transfers and related functions.

Ensure Allowance and Balance before interacting with any of the functions in Protocol Vault!

Write Methods

receiveDepositWETH

function receiveDepositWETH(uint256 amount)

Function to process deposit in the WETH token.

receiveDepsoitInOtherToken

function receiveDepositInOtherToken(address tokenAddress, uint256 amount)

Function to receive a deposit in any other token than WETH.

withdraw

function withdraw(uint256 amount)

Function to withdraw any amount from your margin.

Ensure that you have no open limit orders to be able to withdraw!

Check your withdrawable balance from the function on the Margin contract.

📑
💻
checkWithdrawableBalance