xTokens
xTokens are the primary means of interacting with the Swarm Markets Protocol
Each asset supported by the Swarm Markets Protocol is integrated through a xToken contract, which is an ERC-20 compliant representation of balances supplied to the protocol.
By minting xTokens, an existing crypto asset or token is "wrapped" or "transformed" into a new wrapped token with additional functionality.
xTokens are the primary means of interacting with the Swarm Markets Protocol; when a user mints, redeems, swaps, provides liquidity, transfers xTokens, or more, she will do so using the xToken contract.
Currently, mostly the wrapping and unwrapping of xTokens is done within the same transaction. But there are instances deposit their assets into the (1) earn interest through the xToken's exchange rate, which increases in value relative to the underlying asset, and (2) gain the ability to use xTokens as collateral.
The translation between token and wrapped token is reversible; users can switch between the two versions at any time. Users can exchange their wrapped tokens for the smart contract to get their original tokens back.
There are currently two types of xTokens:
    xToken is a 1:1 representation a wrapped underlying ERC-20 token. A user locks her tokens into the xToken smart contract and receives the corresponding xTokens in return
    off-chain xToken is a 1:1 representation a wrapped off-chain asset. These can either be digital assets from other blockchains or real assets. A user deposits an off-chain asset into an off-chain custody and receives the xToken in return
Though both types expose the ERC-20 interface, the core functions which involve transferring an asset into the protocol have slightly different interfaces depending on the type, each of which is shown below.
Each token provided into the Swarm Markets Protocol will have a corresponding xToken. For example, ETH has a corresponding xETH and WBTC has a corresponding xWBTC.
Users must hold a qualified Swarm Markets Passport to be able to interact with the xToken smart contracts. Each user has the same xToken; there’s nothing unique to your wallet that you have to worry about.

Compatible xTokens

The Swarm Markets Protocol currently provides xToken wrapping for the following assets:
Token
Native Asset
xToken
wETH
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
0x43c28c4a103d939097dc4d9b20c327148f13c4c6
wBTC
0x2260fac5e5542a773aa44fbcfedf7c193bc2c599
0xfc6274505d08210117c56b541794a72338ed3fb6
DAI
0x6b175474e89094c44da98b954eedeac495271d0f
0x6ceb875d9e8d75e0e68040d9bb63b21de134e843

Further Reading

Last modified 3mo ago