Non-rebasing X token alternative with an additional possibility to preserve and forward yield to earners.
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
Copy .env
and write down the env variables needed to run this project.
cp .env.example .env
Run the following command to compile the contracts:
forge compile
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
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
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
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:
- .github/workflows/test-fuzz.yml
- .github/workflows/test-integration.yml
- .github/workflows/test-invariant.yml
You will need to uncomment them to activate them.
Forge is used to generate the documentation. Run it with:
npm run doc
USDX is a tokenized US treasuries fund. We optimize cash management and yield for institutions.
Money market funds
- Increased AUM
- Enhanced liquidity
- Reduced funding and cash flow volatility
- Greater counterparty diversification
- Support for capital preservation
- Yield enhancement opportunities
Investors
- Yield on idle cash balances
- Low minimum investment
- Instant mint and redemption 24/7/365
- 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:
- Investor buys tokenized MMF shares
- Shares held digitally in investor's wallet
- Investor can use tokens as collateral without selling
- Yield accrues to tokens (via price increase or rebasing)
- Investor sells or redeems tokens when needed Traditional Money Market Fund:
- Investor purchases MMF shares
- Shares held in brokerage account
- To use as collateral, investor must sell shares for cash
- Yield typically distributed or reinvested
- Investor redeems shares for cash when needed