==== XFT TECHNICAL DOCUMENTATION ==== ABOUT XFT is an onchain capital markets firm. USDX is a permissionless yield-bearing stablecoin for the United States. Website: https://xft.finance/ Token Contract: 0x421C76cd7C1550c4fcc974F4d74c870150c45995 Etherscan: https://sepolia.etherscan.io/address/0x421c76cd7c1550c4fcc974f4d74c870150c45995 ==== CORE API ==== USDX - Yield-bearing digital dollar. On/Off Ramps - Convert between fiat and stablecoin. Payments Relay - Send funds to institutions or individuals globally. Wallets - Hold digital assets in custodial wallets. Stablecoin Issuance - Create your own fiat backed stablecoin. ==== USDX ==== FEATURES - Access control - Rebasing token mechanism - Minting and burning functionality - Block/Unblock accounts - Pausing emergency stop mechanism - Reward multiplier system - EIP-2612 permit support - OpenZeppelin UUPS upgrade pattern PUBLIC AND EXTERNAL FUNCTIONS initialize(string memory name_, string memory symbol_, address owner): Initializes the contract. name(): Returns the name of the token. symbol(): Returns the symbol of the token. decimals(): Returns the number of decimals the token uses. convertToShares(uint256 amount): Converts an amount of tokens to shares. convertToTokens(uint256 shares): Converts an amount of shares to tokens. totalShares(): Returns the total amount of shares. totalSupply(): Returns the total supply. balanceOf(address account): Returns the account balance. sharesOf(address account): Returns the account shares. mint(address to, uint256 amount): Creates new tokens to the specified address. burn(address from, uint256 amount): Destroys tokens from the specified address. transfer(address to, uint256 amount): Transfers tokens between addresses. blockAccounts(address[] addresses): Blocks multiple accounts at once. unblockAccounts(address[] addresses): Unblocks multiple accounts at once. isBlocked(address account): Checks if an account is blocked. pause(): Pauses the contract, halting token transfers. unpause(): Unpauses the contract, allowing token transfers. setRewardMultiplier(uint256 _rewardMultiplier): Sets the reward multiplier. addRewardMultiplier(uint256 _rewardMultiplierIncrement): Adds the given amount to the current reward multiplier. approve(address spender, uint256 amount): Approves an allowance for a spender. allowance(address owner, address spender): Returns the allowance for a spender. transferFrom(address from, address to, uint256 amount): Moves tokens from an address to another one using the allowance mechanism. increaseAllowance(address spender, uint256 addedValue): Increases the allowance granted to spender by the caller. decreaseAllowance(address spender, uint256 subtractedValue): Decreases the allowance granted to spender by the caller. DOMAIN_SEPARATOR(): Returns the EIP-712 domain separator. nonces(address owner): Returns the nonce for the specified address. permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s): Implements EIP-2612 permit functionality. PRIVATE AND INTERNAL FUNCTIONS _authorizeUpgrade(address newImplementation): Internal function to authorize an upgrade. _mint(address to, uint256 amount): Internal function to mint tokens to the specified address. _burn(address account, uint256 amount): Internal function to burn tokens from the specified address. _beforeTokenTransfer(address from, address to, uint256 amount): Hook that is called before any transfer of tokens. _afterTokenTransfer(address from, address to, uint256 amount): Hook that is called after any transfer of tokens. _transfer(address from, address to, uint256 amount): Internal function to transfer tokens between addresses. _blockAccount(address account): Internal function to block account. _unblockAccount(address account): Internal function to unblock an account. _setRewardMultiplier(uint256 _rewardMultiplier): Internal function to set the reward multiplier. _spendAllowance(address owner, address spender, uint256 amount): Internal function to spend an allowance. _useNonce(address owner): Increments and returns the current nonce for a given address. _approve(address owner, address spender, uint256 amount): Internal function to approve an allowance for a spender. EVENTS Transfer(from indexed addr, to uint256, amount uint256): Emitted when transferring tokens. RewardMultiplier(uint256 indexed value): Emitted when the reward multiplier has changed. Approval(address indexed owner, address indexed spender, uint256 value): Emitted when the allowance of a spender for an owner is set. AccountBlocked(address indexed addr): Emitted when an address is blocked. AccountUnblocked(address indexed addr): Emitted when an address is removed from the blocklist. Paused(address account): Emitted when the pause is triggered by account. Unpaused(address account): Emitted when the unpause is triggered by account. Upgraded(address indexed implementation): Emitted when the implementation is upgraded. ROLES DEFAULT_ADMIN_ROLE: Grants the ability to grant roles. MINTER_ROLE: Grants the ability to mint tokens. BURNER_ROLE: Grants the ability to burn tokens. BLOCKLIST_ROLE: Grants the ability to manage the blocklist. ORACLE_ROLE: Grants the ability to update the reward multiplier. UPGRADE_ROLE: Grants the ability to upgrade the contract. PAUSE_ROLE: Grants the ability to pause/unpause the contract. ==== USER FLOWS ==== Burn = Withdraw = Offramp = Redeem Mint = Deposit = Onramp = Create MINT 1. Authenticate 2. Deposit USD 3. Convert USD to Stablecoin 4. Transfer Stablecoin to Customer REDEEM 1. Authenticate 2. Create Deposit Address 3. Send Stablecoin to XFT 4. XFT Transfers USD to Bank Account ==== XFT Basket Creation Units (USDXW.sol) ==== USDX: 0x421C76cd7C1550c4fcc974F4d74c870150c45995 USDXW.sol PUBLIC AND EXTERNAL FUNCTIONS initialize(IUSDX _USDX, address owner): Initializes the contract. pause(): Pauses the contract, halting token transfers. unpause(): Unpauses the contract, allowing token transfers. paused(): Returns true if USDX or USDXW is paused, and false otherwise. DOMAIN_SEPARATOR(): Returns the EIP-712 domain separator. nonces(address owner): Returns the nonce for the specified address. permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s): Implements EIP-2612 permit functionality. PRIVATE AND INTERNAL FUNCTIONS _beforeTokenTransfer(address from, address to, uint256 amount): Hook that is called before any transfer of tokens. _authorizeUpgrade(address newImplementation): Internal function to authorize an upgrade. _useNonce(address owner): Increments and returns the current nonce for a given address. EVENTS Transfer(from indexed addr, to uint256, amount uint256): Emitted when transferring tokens. Approval(address indexed owner, address indexed spender, uint256 value): Emitted when the allowance of a spender for an owner is set. Paused(address account): Emitted when the pause is triggered by account. Unpaused(address account): Emitted when the unpause is triggered by account. Upgraded(address indexed implementation): Emitted when the implementation is upgraded. ROLES DEFAULT_ADMIN_ROLE: Grants the ability to grant roles. UPGRADE_ROLE: Grants the ability to upgrade the contract. PAUSE_ROLE: Grants the ability to pause/unpause the contract.