vega-frontend-monorepo/specs/1001-DEPO-desposit.md
Maciek 95a51fd152
chore(withdraws): standalone pages for withdraw and transfer (#4728)
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2023-09-19 08:15:36 +02:00

4.7 KiB

Deposit

The Vega network has no native assets. All settlement assets exist on another chain and are "bridged" to Vega in one way or another.

In the case of ERC20 tokens there is a smart contract on the Ethereum network that acts as a vault (aka bridge) for the tokens that are deposited to Vega. The Vega network then reads the information from this vault about what Vega key to credit these tokens to. While in the Vault the Vega key that owns them (and consequently the ethereum key) may change. The vault then manages how much each ethereum key is able to withdraw from the vault given then changes in ownership that may have happened on Vega. The keys to this vault and managed by the different nodes that make up the Vega network. They verify the the appropriate amounts can be withdrawn by each Ethereum key. At time of writing only ERC20 tokens have been implemented but the pattern is likely the same for other assets/networks.

ERC20 deposits

Note: ERC20 assets require an approval transaction to be finalised before funds can be credited to another key. Read more about approvals link 1, link 2.

When making to deposit ERC20 assets to an Vega key, I...

...so that my Vega key can use these assets on Vega

Deposit page

  • Visiting the page with a query param ?assetId=XYZ should load the page with that asset selected if that asset exists (1001-DEPO-011)