13
votes
Accepted
Is it secure to read USD / ETH rate from exchanges directly without using price oracles?
TL;DR: It is not secure to read pricing information from an exchange or other protocol. Always use a decentralized oracle.
You're setting yourself up to be hacked when building smart contracts. ...
11
votes
Accepted
How can I get USDT/USDC for Polygon Mumbai Testnet?
I've gotten some assets for polygon mumbai here: https://faucet.paradigm.xyz/
Including DAI/wETH/MATIC.
Should be able to trade those for USDC/USDT. From a quick search, can trade for USDT on Mumbai ...
6
votes
Accepted
"Dropped & Replaced" tx - what should I do?
"Dropped & Replaced" means the transaction has been replaced by a new one and the new one has been validated by the network (more info here : https://info.etherscan.com/transaction-...
5
votes
Accepted
I'm getting "invalid opcode: opcode 0xfe not defined", when trying to estimate the gas fees
An invalid opcode is typically the result of either one of the following runtime operations:
assert of an expression which evaluates to false
array[i] where i >= array.length
Dividing by zero
...
4
votes
swap token for usdt, create function send 1 usdt and receive 1 token
For ERC20 the usual approach is to require the user to approve your contract.
You have to do something like this from the front end.
// USDT parameters
const erc20Token = new web3.eth.Contract(...
4
votes
Accepted
How can I create a local USDT testnet?
I will try to answer as best as I can, although the question is not 100% clear to me.
Eth transfer
Transfer of Ether between accounts is handled natively by the blockchain. You do not need to deploy ...
4
votes
Accepted
Approve USDT on Ethereum
The USDT contract on ethereum doesn't implement the IERC20 interface correctly. Namely, functions that are supposed to return a bool (like approve does) don't. Since you're using the standard IERC20 ...
3
votes
Accepted
Is there any contract to get USD value of Ether
What you are asking for is an Oracle. Check out Tellor. It's the simplest one out there to integrate directly in your contracts.
3
votes
Accepted
How to do transaction USDT using web3.js
I'm happy to be able to help you as I fixed this a few days ago.
const sendERC20Transaction = async (receiver, amount) => {
var Tx = require('ethereumjs-tx')
const Web3 = require('web3')
const ...
3
votes
Whether usdt or usdc freeze people accounts often?
Looking at the analytics...
There are 256 banned USDT addresses.
There is 1 banned USDC address. (Which is probably why USDC hasn't been in the news as much.)
Regardless of how often this happens, the ...
3
votes
How can I get USDT/USDC for Polygon Mumbai Testnet?
The only way I found so far is (that still works):
Create a developers account on Circle (here) and get an API key
Use their demo app to add balance to your account available here or use their ...
3
votes
How Can i make (my token / eth ) paring as / usdt
You have to create a new liquidity pair on the exchange you are using. You will send your token and usdt to provide liquidity to the new pair. This is also how you will set the initial price.
here is ...
3
votes
Do banks store the money when we buy stablecoins? Then how is it decentralized?
There is no difference between a stable coin and any other ERC20 token. The Value of the stablecoin is given by the funds that the company that issues the stablecoin token claim to have in bank ...
3
votes
Why does my USDT transaction fail?
Short Answer:
Because the address you are approving to spend your USDT is already approved for a nonzero amount, which is a USDT no no.
Long Answer:
The Etherscan link you shared shows two failed ...
2
votes
How to send PAXOS token which has not transfer method?
It does have a transfer function, you just don't see in the contract because the author has used the Upgradable Contract design-pattern, which (as implied by its name) allows him/her to upgrade the ...
2
votes
Is it secure to read USD / ETH rate from exchanges directly without using price oracles?
You can use the USDC/ETH rate e.g. on Uniswap v2 pools. You can calculate the token price from reserve ratio of tokens on this pools, because reserves follow simple XY liquidity model. Range based ...
2
votes
I am having trouble transferring my Tether USD from coin-base wallet to everywhere
You will need the cryptocurrency of the blockchain to pay the gasfee if you are on binance blockchain you will need BNB to pay the gas fee
2
votes
Accepted
Gas limit issue when transfer USDT
eventually i manage to find out this answer for myself.
This phenomenon happen because contract execution trigger refund gas mechanism.
Back to time when i transfer my whole USDT, upon contract ...
2
votes
Accepted
Make my smart contract receive usdt
Your smart contract can receive USDT without you doing anything at all. By default, any smart contract created can receive virtually any ERC20, since the ERC20 contract can send tokens to any address. ...
2
votes
Information about Apply mining pool rewards ERC-20 Smart Contract
You were not contacted by a girl from Singapore. You were contacted by a computer program pretending to be a girl from Singapore. The scammer operating the program then took over the conversation.
You ...
2
votes
Accepted
chainlink price feeds
Yes, it is possible to use Chainlink Price Feeds on the BNB Chain.
To find the contract addresses of USDT pairs on the Chainlink Docs page, you can visit the following link: https://docs.chain.link/...
2
votes
Accepted
Monitor USDT Deposits in Multiple Wallets on BSC
You could monitor the real-time USDT deposit transactions using the Moralis streams API. All you need is to setup a streams with a webhook to receive the real-time data.
This is an example of how the ...
2
votes
Accepted
USDT on Sepolia
Here are the two USDT token contracts I found on the sepolia testnet, USDT1 USDT2. You can check either of these.
On the other hand, you can also deploy by your side for testing.
To get the tokens, ...
2
votes
Contract accept USDT transfer
You need to call approve function of the USDT token contract that you’re using in the buyCoin() function for creating an instance of ERC20, with these arguments:
spender: ...
2
votes
Why can't I buy ETH on Rice Wallet?
Whenever you make transactions on the blockchain, you have to pay for the processing of the transactions. These fees are called "gas fees". The fees are typically paid in the blockchain's ...
1
vote
Tokem ERC20 eth accept payament usdt
Work in the following order.
Use the USDT contract's approve function to allow the user USDT to be sent to your contract address.
Write a payment function in your contract. The user calls this ...
1
vote
Accepted
How can I find the incoming balance of a erc20 (usdt/shiba etc) using its transcation hash?
Within the context of smart contracts, token amounts are always denoted in integers. So, in your case, 196880000 tokens were transferred.
What makes this concept a bit tricky is the UIs which make the ...
1
vote
cannot withdraw usdt out from metamask to bybit
Since each Ethereum transaction requires computational resources to
execute, each transaction requires a fee. Gas refers to the fee
required to conduct a transaction on Ethereum successfully.
you ...
1
vote
Is it secure to read USD / ETH rate from exchanges directly without using price oracles?
Patrick gave a great answer on why an exchange based oracle is bad, but unfortunately LINK is pretty far from trustless. Depending on the size of your contract or what you're using it for, an AMM ...
1
vote
Accepted
Accidentally sent USDT to USDT contract address instead of wallet
Sorry whether on Tron or Ethereum it's the same you send your crypto to USDT contract and as no private key is attached to a smart contract it will not be possible for you to recover your funds (...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
usdt × 97erc-20 × 25
solidity × 13
tether × 13
web3js × 10
usdc × 9
go-ethereum × 8
transactions × 8
ether × 8
metamask × 8
polygon × 7
tokens × 5
gas × 5
stablecoins × 5
wallets × 4
addresses × 4
testnets × 4
uniswap × 4
contract-development × 3
blockchain × 3
cpp-ethereum × 3
ethers.js × 3
bsc × 3
transfer × 3
dai × 3