Questions tagged [defi]
The defi tag has no usage guidance.
17
questions with no upvoted or accepted answers
6
votes
0answers
59 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 ...
6
votes
0answers
672 views
SushiSwap - Inner workings?
I've been trying out in the past few days SushiSwap and lately SashimiSwap Contracts & Frontend and while I'm still getting familiar with the code. It turned out to be quite a challenge to make it ...
3
votes
0answers
84 views
Example of flash minting ether
The WETH10 project offers a flash minting feature.
This contract allows to flashMint an arbitrary amount of Wrapped Ether, unbacked by real Ether, with the condition that it is burned before the end ...
2
votes
0answers
23 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 ...
1
vote
0answers
54 views
Flash minting ether security considerations and attacks
Flash loans enable a class of attacks that have not been possible or observed as much in prior systems.
Flash minting ether is a concept that is starting to be implemented.
See Example of flash ...
1
vote
0answers
35 views
Are oracles too slow for DEFI arbitrage?
It seems that a lot of platforms that make you money via 'arbitrage' rely on Oracles to find a profitable spread opportunity. I assume users are competing against other users (on the same platform) ...
1
vote
1answer
92 views
Flash loan compile error with function() external payable
I am attempting to compile a flash loan contract. I am having issues with the external payable function. I've tried adding fallback or receive as the error message suggests but I still receive the ...
1
vote
0answers
14 views
historical quotes on decentralised exchange
Dears, I'm new in Eth programming, just started to learn Solidity, so need advice.
I want to see historical prices for certain currency pair (say, USDT/DAI) traded on decentralised exchanges like ...
0
votes
0answers
22 views
When forking MainNet with ganache-cli and trying to interact with contract -> error thrown
Forked MainNet with Ganache-ClI
wrote script to interact with on-chain DAI contract to send some Dai to account
Unlocked the DAI contract
const Web3 = require('web3');
const daiAbi = require('/Users/...
0
votes
1answer
477 views
How to swap ETH to WETH on Uniswap
I'm trying to swap ETH to WETH tokens within contract, but cannot find any information how to do it. Can anybody help? Thanks!
0
votes
0answers
22 views
UniSwapV2Router.sol contract failing - “Gas required exceed allowance / Always failing transaction”
I am trying to recreate the Sushiswap protocol for educational reasons, but I am stumbling into an issue. When I try to run the addLiquidity function inside the UniswapV2Router.sol contract with the ...
0
votes
1answer
96 views
Must I add WETH conversion descritpion in a contract and how?
I'm confused about how I write a contract about WETH conversion.
When we write a smartcontract depositing user funds into a contract, should we necessarily write some codes of converting eth into weth ...
0
votes
0answers
113 views
What factory (UniswapV2Factory) shoud I use when deploy Sushiswap clone?
Hi I'm forking Sushiswap and about to deploy contract to mainnet.
While I'm writing deploy_contract.js in Truffle.
Which Factory shoud I use in my migration code? I saw several code example but ...
0
votes
0answers
47 views
Can we compare bonding curve tokens to a ponzi scheme?
Bonding curve tokens are, unlike ICO, not driven by the market, but priced by a smart contract.
They are based on the following two main properties :
Limitless supply : Tokens are minted as the ...
0
votes
0answers
38 views
Uniswap Fee or how 180 AMPL tokens suddenly “disappeared” from blockchain
If you look at https://etherscan.io/token/0xd46ba6d942050d489dbd938a2c909a5d5039a161?a=0xfe6c9c5a0d36eba3a767aaf6df2f335e666a74e7, you can notice that there were 3 transactions associated with the ...
0
votes
0answers
24 views
Could there be multiple asset pools In a DAMM liquidity pool?
In a DAMM (dynamic automated market making) DEX (decentralized exchange) the ration between two assets, e.g. DAI/ETH does not have to be 50/50 anymore, like it used to be in a AMM, (automated market ...
0
votes
0answers
26 views
Uniswap V1: Why does EthToTokenInput not refund overpaid ether?
ethToTokenInput on the Uniswap V1 contract converts all the sent ether to tokens and transfers the tokens to the recipient.
Lets assume 1 ether buys you 3.9 tokens according to getInputPrice(). If ...