USYC subscriptions and redemptions are handled through an audited smart contract implemented with Solidity. If you have been entitled to the contract, you can interact with the contract using Solidity, TypeScript, or any other programming language that supports Ethereum smart contracts.
The code snippets below use Ethereum Sepolia testnet addresses. For mainnet addresses, see Smart Contracts.
Solidity
import"../IERC20.sol";interface ITeller{functiondeposit(uint256_assets,address_receiver)externalreturns(uint256);functionredeem(uint256_shares,address_receiver,address_account)externalreturns(uint256);}ITeller teller =ITeller(0x96424C885951ceb4B79fecb934eD857999e6f82B);// Subscribe to USYCIERC20 usdc =IERC20(0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238);uint256 usdcAmount =100*1e6;// 100.000000 USDCaddress usycReceiver =address(this);// address that will receive USYCusdc.approve(address(teller), usdcAmount);uint256 usycPurchased = teller.deposit(usdcAmount, usycReceiver);// Redeem USYCIERC20 usyc =IERC20(0x38D3A3f8717F4DB1CcB4Ad7D8C755919440848A3);uint256 usycAmount =100*1e6;// 100.000000 USYCaddress usdcReceiver =address(this);// address that will receive USDCaddress usycAccount =address(this);// address that holds USYCuint256 usdcPayout = teller.redeem(usycAmount, usdcReceiver, usycAccount);