Interest Accruing Tokens and Accounting

Interest-accruing tokens are the basis of yield farming and passive income generation.

UTXO model and Rebasing: In the UTXO Model (Unspent Transaction Output) transactions are created by inputs and outputs. For a transaction to take place, a user “gives” one (or more) UTXO(s) as input(s). The user then confirms ownership of the inputs provided with their digital signature, creating new outputs. The UTXOs used up cannot be used anymore, as they are spent. The outputs of that same transaction become new UTXOs – which can be used for the next transaction.

Hinkal uses the UTXO model internally. It is used during proof generation for every transaction, proving that the user has the appropriate amount of funds deposited to execute it. Some interest-accruing tokens are rebasing in nature, meaning that the amount of the tokens in a user's balance is not constant. Because of the UTXO model, rebasing tokens could create an issue, since Hinkal does not support rebasing tokens, as balances cannot be changed automatically inside commitments.

Solution: Hinkal wraps rebasing tokens such as aDai and aUSDC into wrapped tokens which take scaling factors into account. Therefore, a wrapped rebasing token can still accrue rewards, even if the amount in a user's balance stays constant. When the user unwraps the token, the amount they will receive will be greater than the amount they wrapped, to account for all accrued interest/rewards.

*Balances of scaled tokens stay fixed which ensures consistency with the UTXO model.

*Whenever a user wants to withdraw or swap the tokens are unwrapped and the appropriate actions are performed.

Last updated