Im creating 2 erc20 tokens, one (A) that replaces the amount it is bought for with USDC.and another (B) that stores this USDC. So the second one is an INDEX of the USDCand the first.B is the one that gets traded while A is hidden and only causes B’s price to go up when in demand. So I need it (B)to automatically buy the USDC upon purchase and store it in a place so that it is always associated with my token (B)and cannot be transfered seperately from my token. Where would i store the USDC for all the tokens (B)in a single secure place where noone even i have no access of except for the code on the contract. When the user decides to cash out the coin what happens is that he is given the USDC back first into his wallet.Then the value of A is spread among users.Also is there a way for the contract to know how much a token was bought for?
Thankyou in advance