Questions tagged [interest-rate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 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 ...
omega's user avatar
  • 1
2 votes
1 answer
104 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 ...
Sithered's user avatar
  • 123
2 votes
1 answer
87 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 ...
Ehsan Khodarahmi's user avatar
0 votes
1 answer
429 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%...
rosendin's user avatar
  • 107
0 votes
1 answer
183 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 ...
rosendin's user avatar
  • 107
2 votes
1 answer
409 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 ...
EazyC's user avatar
  • 123
0 votes
2 answers
47 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 = ...
UnexpectedCharacter's user avatar
1 vote
1 answer
723 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 ...
GK1's user avatar
  • 129