A closer look at the integration between IbAlluo and StIbAlluo
Here we dive into the IbAlluo - StIbAlluo integration
Whenever tokens are burnt or transferred (any deduction from a user's IbAlluo balance, the IbAlluo.sol contract makes a check if the amount to be moved is greater than their current IbAlluo balance and whether it is possible to unwrap the difference from the StIbAlluo balance.
For example, a user has 50 IbAlluos and 50 StIbAlluos from a CFA. If they called the ERC-20 Transfer to another user for 70 IbAlluos, the IbAlluo contract unwraps 20 StIbAlluos and then carries out the transaction without reverting, even if they had 50 IbAlluos - leaving them with 0 IbAlluos and 30 StIbAlluos.
This is carried out through ERC777 methods implemented in the Super token interface as the IbAlluo is set as a default operator for the StIbAlluo contract. See the functions below.
Similarly, the two view functions above return the combined balance of IbAlluo and StIbAlluo a user has. getBalance() returns it in USD value, while combinedBalanceOf() returns it as a basic sum.
If you only want the balance of IbAlluos a user has, use the standard ERC-20 balanceOf() function.
Last updated