Questions tagged [stablecoins]
The stablecoins tag has no usage guidance.
61
questions
0
votes
1
answer
19
views
Connected to a proxy function but getting an error when I call the transfer function of the implementation contract
I'm currently working on a project where I can transfer USDC from my account to another directly, provided I have my provider and private key, programmatic. So I connected to a proxy contract on the ...
0
votes
0
answers
14
views
Type address is not implicitly convertible to expected type struct HelperConfig.NetworkConfig memory
Why even if I am returning a struct from a function then if I initialize another variable with the struct type it is showing me the following error:
Type address is not implicitly convertible to ...
0
votes
1
answer
19
views
Actual Stable STABLECOIN
What is the best way to make a stablecoin which will stay stable irrespective of the market or any other factor?
USDT -> Hard to believe someone is storing actual dollars somewhere.
DAI -> What ...
0
votes
1
answer
27
views
How to use stable coins for transactions on any chain
i am trying to implement such a smart contract where it takes the stable coin of that chain and send and receive it.
For example i am deploying my smart contracts on the mumbai-polygon testnet. And ...
0
votes
2
answers
502
views
StableSwap invariant and price computation
Having issue reproducing the price Curve.fi propose for swaping tokens.
Let's take tricrypto2 pool for example.
As I'm writing this, the actual balance of the pool is the following:
I'm trying to re-...
0
votes
2
answers
652
views
Stablecoin smart contract
Drop in smart contract links for ERC-20 stablecoin.
There is no list defined anywhere.
There should be easy to understand resources in one place for new lerners.
what should be the best boilerplate?
2
votes
3
answers
110
views
Swapping stablecoins on a CFMM
Let's say I want to swap stablecoins, let's say USDC with DAI, in a CFMM where the function is the usual xy=k. Let's say that the liquidity is now fixed to be 1000USDC and 1000DAI, equals as they ...
0
votes
1
answer
51
views
Approval question
Beginner question:
I have trusted wallet with 1000 LINK erc20.
I want to swap it to get USDT erc 20.
It ask to approve the LINK.
How long approval takes?
In some time after I got the USDT, I wish to ...
7
votes
1
answer
1k
views
How does the DAI keep its peg to a USD dollar?
I learned recently that the DAI uses some kind of smart contract magic to peg itself to the dollar as a stable coin. How is this not centralized as it involves fiat pairs? And what are some of the ...
3
votes
2
answers
1k
views
How does the DAI stablecoin stay at $1?
The answer here is not very useful so I'm asking again. It doesn't matter if you describe the mechanism with the current or future version of MKR.
If the price of DAI on the open market deviates ...
2
votes
1
answer
57
views
Getting error ERC20: insufficient allowance even after the user approving the tokens. Need help with debugging
The following code is from a Stablecoin project.
To gain more context, please refer to this Github repo.
I've added a new function to the DSCEngine.sol name collapseDsc() which is responsible for ...
1
vote
0
answers
13
views
Would a circuit breaker feature always execute one block after the trigger is detected?
Lets say I had a Dapp that used a popular stablecoin whereby the stablecoin had a freeze function. Then say I wanted to detect if the stablecoin accounts were frozen and then circuit break the Dapp.
...
1
vote
2
answers
36
views
Do banks store the money when we buy stablecoins? Then how is it decentralized?
I need someone to verify if my understanding is correct.
When we buy ETH, we swap it in a pool with Stablecoin.
To trade, it requires a pair of ETH/USD.
What gives a Stablecoin its value?
In the ...
0
votes
0
answers
14
views
Creating an stable ERC20 coin for Commerce
I am looking to build a euro backed stable coin that is built on ETH.
We have liquidity behind it to keep it pegged. This would be used on a ecommerce site to buy physical items and than users will be ...
-1
votes
2
answers
545
views
Stablecoin Development
Can anyone link me with some information on how to develop stablecoins that are fiat backed, I can't seem to find anything on this topic.
3
votes
1
answer
35
views
What are the countermeasures for losses in decentralized finance platforms like Aave?
I am a newbie in the blockchain/Web3 space and trying to understand the AAVE protocol.
Suppose a borrower deposits 1 ETH whose value is 500 DAI Tokens(500$) as collateral to borrow 100 DAI Tokens(100$)...
1
vote
1
answer
21
views
Oracle recommendations for stablecoin project
Looking for an oracle to add to my stablecoin project. Want the essentials (decentralized, censorship-resistant, secure mechanics, no multi-sig to control everything).
Any ideas?
2
votes
1
answer
105
views
how to peg an ERC20 token to a stipulated price in other to make it a stablecoin [duplicate]
I'm new into blockchain development and currently challenging myself to create a stablecoin. I have created an ERC20 token but I don't know how to peg the price to the desired price. Please can anyone ...
6
votes
5
answers
2k
views
Why not use a stablecoin as the base currency of a blockchain?
Chains like Ethereum use Eth for gas, and then a stablecoin is delivered as a contract.
I'm thinking that it might be nice to actually use a stablecoin as the BASE token for a new blockchain. That way,...
1
vote
1
answer
860
views
How to accept stabel coins such as USDT/USDC in a contract? [duplicate]
I am trying to create a contract in solidity that can accept ERC20 tokens more specifically stable coins like USDT/USDC. I am not sure how to make a minimum token amount to be paid. I have a basic ...
0
votes
1
answer
358
views
Is it possible to work with stable coin currency in Ethereum smart contracts using solidity?
I know in solidity you can use identifiers like ether and wei. For example, I can do something like
if (msg.value == 1 ether) {
//do something
}
Is it possible for me to use stable coins as a type ...
1
vote
1
answer
76
views
Stablecoin as basic ERC-20 Token
I am just trying to make a collateral backed stablecoin (1:1 AUD transparently backed) and am struggling to find any reasons as to why it cant be implemented using a simple ERC-20 contract?
If I offer ...
1
vote
0
answers
115
views
How a stable coin, like USDT and USDC works?
I need help regarding stable coin, particularly like USDT and BUSD, pegged to US Dollar.
I am working on a stable coin project. The smart contract needed to be developed in solidity and deployed on ...
1
vote
0
answers
22
views
Stablecoin Fixed price how to keep
I'm developing a stable coin. I need to update daily the amount of USDC that one mytoken will value
As an example
Today mytoken = 30 USDC
Tomorrow mytoken = 28 USDC
After tomorrow my token = 31 USDC
...
0
votes
0
answers
94
views
**Math/Stableswap Formula** Explaining the subsitution of "Chi" to get Stableswap invariant formular
Hello, I'm having a trouble of understanding this operation:
In Curve.fi Stable Swap's paper, page 5, they substitue
into this formular
With some simplification step, we get the Stableswap invariant:...
0
votes
1
answer
37
views
How to get price data for a redeem without using chainlink
Trying to make a ecosystem where you have two tokens (Token X, Token Y) Token X can be minted for $1 worth of Token Y burned. And Token X can be redeemed for $1 worth of Token Y. How would I do this ...
1
vote
1
answer
143
views
How can i make fully decentralized token pegged to BUSD or USDT?
I am making an ecosystem, where i want to give rewards in my own stablecoin. How is it possible for me to make it fully decentralized, with minting and burning to maintain a fixed price to $1 when ...
1
vote
0
answers
17
views
What does SAFE stand for in the RAI ecosystem?
The SAFEEngine is analogous to Vat.sol in DAI.
What does SAFE stand for?
1
vote
1
answer
40
views
How does USDC ever lose its peg?
If USDC is always backed by $1 worth of fiat or treasuries, how does USDC lose and then rebalance its peg on an ongoing basis?
0
votes
1
answer
25
views
Issues with stable coin code compiling
Including all code here:
pragma solidity ^0.5.0;
contract stablecoin{
address ceo = ;
mapping(address => uint) tokens;
function approval(address _owner, address _approved,uint _tokenId){
...
7
votes
3
answers
1k
views
What is DeFi decentralized finance?
What is DeFi? What are its core components? How to think about or picture "it"?
Some of the parts are tokens, stablecoins (tokens with specific properties to reduce its volatility), and exchanges, ...
0
votes
2
answers
138
views
how to create a dApp to interact with a user using stable coins
I use my holidays to learn solidity. Since I've programming background is solidity not my biggest challenge. Remix online IDE and JavaScript VM are great tools to start with. I've created a smart ...
0
votes
1
answer
50
views
How to make an erc20 token track the dollar to pound value ratio?
How to make an erc20 token that tries to mimick the pound value and track the dollar to pound value ratio?
So if it goes up to 1 pound is 1.40 dollars I want to automatically buy/sell to match this ...
0
votes
0
answers
2k
views
How to choose number of decimal places for token
What should I consider when choosing the number of decimal places for an ERC20 token/stablecoin?
My first thought was to just use 18 which seems to be the standard because Ether uses 18. However ...
6
votes
1
answer
1k
views
How does the Dai peg to dollar?
I am interested in the Dai stable coin and have seen multiple different explanations of how the coin balances and pegs to the $1. One said it was to do with the increase or decrease in interest rates ...
2
votes
1
answer
468
views
Why fiat-backed stablecoins have a decimal of more than 2?
Fiat-backed stablecoins usually have a decimal of 6 while fiat currencies only need a decimal of 2.
Is it necessary to have 6 for fiat-backed stablecoins and why?
0
votes
1
answer
2k
views
Usdc bep20 from trust wallet sent to usdc erc20 on metamask
Please, I sent a bep20 usdc from my trust wallet account to an erc20 usdc or something like that on my metamask account since almost 24hr, but it's yet to reflect. Can someone kindly help with some ...
2
votes
1
answer
108
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 ...
0
votes
0
answers
466
views
How can a contract accept some ether and send a stablecoin in return
My contract has to take ETH as a collateral and send some stablecoins ( like USDC) to user.
How can I use any stablecoin into my contract , assuming contract has an infinite supply of USDC ?
I too ...
0
votes
1
answer
79
views
full stack dapp clone example elastic supply algorithmic stablecoin
I'm new to vyper (but have some python experience), I would like to clone a very simple dapp to have a look at the full stack of an ethereum dapp from back end (write compile and deploy a simple ...
0
votes
1
answer
709
views
Is it normal for a DAI vault to cost between $80 - $160 in gas fees?
I am trying to open a Vault for the first time with ETH-A as collateral.
Do the below fees make sense? They seem quite expensive to me ...
Additionally I see this:
2
votes
4
answers
834
views
Why are lending rates on USD based stable coins so different?
Since DAI is a USD based stable coin along with USDT and USDC, then why are their lending rates so different? In theory, the risks behind owning any of these stable-coins is similar so their lending ...
0
votes
1
answer
158
views
Can ERC-20 based stablecoins be confiscated or be subject to legal process?
Can ERC-20 based stablecoins be confiscated or blacklisted? Can I lose my stablecoins? What are differences between stablecoins out there?
2
votes
1
answer
60
views
How DAI stablecoin is able to be decentralised or how the CDP(Collateralized Debt Position ) process works?
I am reading about stablecoins in order to understand which one would be best suitable for my need( let users of my app be payed or rewarded by a crypto and at the same time lowering the effect of ...
3
votes
2
answers
58
views
Is there any stablecoin except for DAI that is stable against the dollar without actually being backed by physical dollars?
Is there any stablecoin except for DAI that is stable against the dollar without actually being backed by physical dollars?
Perhaps backed by CDP or some other method?
Vesa
2
votes
0
answers
63
views
How does the Dai stablize?
I am interested in the Dai stable coin and have seen multiple different explanations of how the coin balances and pegs to the $1. One said it was to do with the increase or decrease in interest rates ...
0
votes
0
answers
173
views
Transaction error thrown with Vyper smart contract in MetaMask
I am trying to troubleshoot a problem I'm having with a crowdsale contract (written in Vyper). The contract compiles fine, and I can deploy the contract to Rinkeby without any problems, however when I ...
0
votes
0
answers
47
views
Tax coins for Universal Basic Income
I am working on building a coin that will be useful in providing UBI, but need a method to maintain the price of the coin, so that it doesn't fall below threshold.
Here is the idea:
So every month, ...
2
votes
2
answers
652
views
Calling a Solidity function automatically in realtime
I have an oracle with a 'getPrice' function that returns the latest ETH/USD price.
Let's say, I am implementing a stablecoin contract which requires over-collateralization with ETH. How will I ...
1
vote
0
answers
172
views
How to get total tether supply on Ethereum from BigQuery dataset
I've noticed that the numbers for Totaly supply of Tethers seem to diverge on the official Tether transparency page and the Etherscan block explorer, and I want to find a way to get the correct number....