Me and my friend, we are building a token on BSC, that has several utilities. My friend who started the project decided to divide this token ecosystem by several tokens, there is main token that has some built-in utilities, and the next token will be staking one.
So, the process will be like this: People can buy X (main token), then they can stake this X token in Y (stake contract), and in exchange, they will get some Y.
There will be some kind of reward distribution system, but for the sake of simplicity let’s say that on the stake you get a 1% reward.
Now, I found a very well designed contract and I updated it for the 0.8.0 version so I could use openzeppelin goodies in it, it’s just, the structure is kinda complicated so I’m a bit confused about how can I let this Y contract to accept X (that is already deployed).
I have a code, but I don’t really want to share it publicly yet, because it’s a big mess, so it will be good if someone can provide theoretical help about this very simple concept, I can show you my code in private.
P.S contract is standard ERC20, nothing special and so far, on the remix, it doesn’t have any issues, I have test codes ready and will use truffle/ganache to test it more deeply. It could be ready, I just want to make sure that it won’t damage this infrastructure or its users.