Indexing is how all interest protocols get your balance.
Deposit 100 UST at a 1.0002 index you will receive 99.980003999200159968006398720256
The index then appreciates as index + (index * rate / year * time_delta)
Due to blocks being the only every x period, they need to work with that so the yar * time delta is likely not how they get it but its the same concept.
From what i see in their EthAnchor they use this which updates every 6 hours and compounds.
this comes to about 17.8% as the APR which converts to about 19-20% APY
You then withdraw at a 1.0015 index and you receive 100.12997400519896020795840831834
This is just an example and didn’t use any actual rates to come up with the indexes but calculations can be done to figure that out.
Also, this is all done through integers which add more complexity to the actual formula but the above is the basics.