Skip to content

Non rebasing X token alternative with additional possibility to preserve and forward yield to earners

License

Notifications You must be signed in to change notification settings

amr080/xft-wrapped-x-token

 
 

Repository files navigation

Wrapped X Token - Smart Wrapper contract

Overview

Non-rebasing X token alternative with an additional possibility to preserve and forward yield to earners.

Development

Installation

You may have to install the following tools to use this repository:

  • foundry to compile and test contracts
  • lcov to generate the code coverage report
  • yarn to manage node dependencies
  • slither to static analyze contracts

Install dependencies:

npm install
forge install

Env

Copy .env and write down the env variables needed to run this project.

cp .env.example .env

Compile

Run the following command to compile the contracts:

forge compile

Coverage

Forge is used for coverage, run it with:

npm run coverage

You can then consult the report by opening coverage/index.html:

open coverage/index.html

Test

To run all tests:

forge test

Run test that matches a test contract:

forge test --mc <test-contract-name>

Test a specific test case:

forge test --mt <test-case-name>

To run slither:

npm run slither

Code quality

Prettier is used to format Solidity code. Use it by running:

npm run prettier

Solhint is used to lint Solidity files. Run it with:

npm run solhint

Or to autofix some issues:

npm run solhint-fix

CI

The following Github Actions workflow are setup to run on push and pull requests:

It will build the contracts and run the test coverage, as well as a gas report.

The coverage report will be displayed in the PR by github-actions-report-lcov and the gas report by foundry-gas-diff.

For the workflows to work, you will need to setup the MNEMONIC_FOR_TESTS and MAINNET_RPC_URL repository secrets in the settings of your Github repository.

Some additional workflows are available if you wish to add fuzz, integration and invariant tests:

You will need to uncomment them to activate them.

Documentation

Forge is used to generate the documentation. Run it with:

npm run doc

X Financial Technologies

  1. Visit our website
  2. Follow us on X
  3. Invest in USDX
  4. Connect with us on LinkedIn

USDX is a tokenized US treasuries fund. We optimize cash management and yield for institutions.

Why USDX?

Money market funds

  1. Increased AUM
  2. Enhanced liquidity
  3. Reduced funding and cash flow volatility
  4. Greater counterparty diversification
  5. Support for capital preservation
  6. Yield enhancement opportunities

Investors

  1. Yield on idle cash balances
  2. Low minimum investment
  3. Instant mint and redemption 24/7/365
  4. Frictionless collateral mobility

How is yield transferred to the tokenholder and how often?

USDX is available in two versions, an accumulating token (USDX) and a rebasing token (rUSDX). While both versions pay out yield upon redemption and accrue yield daily, the manner in which the accrual is represented differs. For USDX, the accruing yield gets ‘accumulated’ into the token price. As the underlying investments accrue yield daily, we recognize this yield by increasing the Net Asset Value (NAV) of the underlying Fund, thereby increasing the NAV per USDX token. We typically update the price once every Business Day, generally at around 6pm ET. rUSDX, on the other hand, is intended to maintain a price of $1.00 per token, with the accruing yield represented by the division of rUSDX tokens into more tokens via rebasing. See our support documentation to learn more. As an example, let’s say you held 1 USDX token worth $100 and 100 rUSDX tokens worth $1.00 each. The next day the NAV per USDX token increased to $101 per token. After the price update and rebasing, your holdings of both rUSDX and USDX would be worth $101.00 each ($202.00 in total). You would still have a balance of 1 USDX token worth $101.00. However, due to the rebasing nature of rUSDX tokens, you would now hold 101 rUSDX tokens worth $1.00 per token.

Why tokenized money market funds?

Money Market Funds (MMFs) become more stable if investors can use their MMF shares directly as collateral, instead of selling them for cash. This reduces pressure on MMFs during market stress. Traditional: Investor sells MMF shares to get cash for margin call, causing fund outflows. Tokenized: Investor uses MMF shares/tokens directly as collateral, avoiding sale and fund outflows. Tokenized Money Market Fund:

  1. Investor buys tokenized MMF shares
  2. Shares held digitally in investor's wallet
  3. Investor can use tokens as collateral without selling
  4. Yield accrues to tokens (via price increase or rebasing)
  5. Investor sells or redeems tokens when needed Traditional Money Market Fund:
  6. Investor purchases MMF shares
  7. Shares held in brokerage account
  8. To use as collateral, investor must sell shares for cash
  9. Yield typically distributed or reinvested
  10. Investor redeems shares for cash when needed

About

Non rebasing X token alternative with additional possibility to preserve and forward yield to earners

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 98.6%
  • Other 1.4%