Questions tagged [interest-rate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
12 views

can someone explain liquidations to me -for the case when price of borrowed asset suddenly goes up and in turn exceeds the supplied collateral value?

I understand concept of liquidations, which is when the value of collateral drops below the borrowed asset value - this can happen either when : collateral asset value drops borrowed asset value ...
2
votes
1answer
64 views

Why USDC interest rates are so high compared to USD interest rates?

USDC is a stable coin, pegged to USD, so there should be no risk (or very little) from owning some. However, the lending rate for USDC is between 3% and 13%: https://defirate.com/usdc/ Since higher ...
2
votes
1answer
26 views

Calculating AAVE intereset rate belonging to different users that transferred into a smart contract

I have a smart contract that accepts user funds and adds them to an AAVE lending pool (DAI for example). Something like this: lendingPool.deposit(stableCoinAddress, amount, address(this), 0); As you ...
0
votes
0answers
17 views

Multiply ray with wad to get wad

What's the correct way to multiply a number in ray (1e27) with a number in wad (1e18) to get the result in wad? E.g., I have an interest rate [ray] and a balance [wad] that I am multiplying to get a ...
0
votes
1answer
31 views

Rounding fixed point integers

If I'm using fixed-point arithmetic to represent rates, for example, 2% in ray (27 decimal precision) would be 102000000000000000000000000000. If I had a rate like 101333333333333333333333333333 (1.33%...
0
votes
1answer
45 views

Converting to/from per-second and annualized interest rates with BigNumber.js

In the MakerDao contracts, there are conversions between annualized percentage rates and per-second percentage rates. For example, their Stability Fees documentation gives this example: If the ...
2
votes
1answer
154 views

How to Calculate How Long an Address Has Held A Token? (for paying interest/rewards)

I'm writing a smart contract function that rewards users some rate of interest/reward for holding my stablecoin over owning competitors (Dai, Tether, etc). What is the most efficient manner to ...
0
votes
2answers
41 views

Error generating new tokens in a private chain

pragma solidity ^0.4.25; // ERC20 Token Smart Contract contract MyToken { string public constant name = "MyToken"; string public constant symbol = "MYT"; uint8 public constant decimals = ...
1
vote
1answer
347 views

How do you apply an interest rate on an ERC20 token without making new transactions?

I'm trying to develop an ERC20 token that mints new tokens to holders over time, however I would like to do this in a way that does not require me to make new transactions each time a users balance ...