Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
1 answer
2k views

Error: Transaction reverted: function returned an unexpected amount of data, Pancakeswap

I really need your guy's help as I'm stuck in this for a week. Actually, I'm implementing a swap function on pancakeswap, I'm following this documentation. I'm doing swapEthForExactTokens but getting ...
Adil Nehal's user avatar
3 votes
1 answer
42 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$)...
Hrithik Raj's user avatar
2 votes
1 answer
2k views

Why we sort tokens in uniswap functions?

function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES'); (token0, token1)...
shiva sai's user avatar
2 votes
2 answers
531 views

Configuring amountOutMinimum while swapping through Uniswap V3

I am trying to build a smart contract which performs a multihop swap using Uniswap V3 but wherever I have seen the tutorial, amountOutMinimum is set to 0. In Uniswap V2 there are several ways to ...
Mehul Tuteja's user avatar
1 vote
3 answers
117 views

DAO Governance Off Chain

What are good methods for DAO decisions to be implemented off chain? If a company is looking to start a DAO to manage a specific centralized service (say a website, manufacturing plant, etc) through ...
YigalZamora's user avatar
1 vote
1 answer
115 views

Where can i found advanced courses about blockchain security?

Where can i found advanced courses and walkthrough box like TryHackMe and HackTheBox, about blockchain security and Defi, ethical hacking with challenges todo to learn about it. Best regards
Bakhouche Akram's user avatar
1 vote
1 answer
2k views

How to access or calculate slippage from Uniswap-V3 trades on-chain?

I know we can extract swapping information on a Uniswap V3 LP pool (for example - https://info.uniswap.org/#/polygon/pools/0xefa98fdf168f372e5e9e9b910fcdfd65856f3986). Is there a way to find out the ...
KubiK888's user avatar
  • 123
1 vote
0 answers
550 views

Argument of type '(address: any) => void' is not assignable to parameter of type '(this: Suite) => void'

I'm trying to implement the pancakeswap router functions. I've forked the mainnet with hardhat and then tried to receive the addresses with typescript. I'm using the typescript for the first time and ...
Adil Nehal's user avatar
1 vote
0 answers
49 views

How do farming/staking platforms really profit? [closed]

Sorry if this question isn't directly related to Ethereum, but to DeFi in general. I understand how we, users of platforms like PancakeSwap, Aave, Curve and such, can profit from these platforms when ...
LyxeResearcher's user avatar
0 votes
3 answers
404 views

what does ternary operator Uniswap createPair function does?

function createPair(address tokenA, address tokenB) external returns (address pair) { require(tokenA != tokenB, 'UniswapV2: IDENTICAL_ADDRESSES'); (address token0, address token1) = ...
Samresh Kumar Jha's user avatar
0 votes
2 answers
486 views

how to build Defi app from A to Z

I'm a java developer and a newbie with blockchain. I want to build a simple Defi app with a simple smart contract. please tell me know steps by steps to do that? how to setup environment? which the ...
Jay Tran's user avatar
0 votes
1 answer
25 views

How collateral is distributed to token side (L or S) in perpetual pool?

I am trying to implement a distribution of collateral deposited in the pool but I am not getting how it should be distributed in the perpetual pool.
Samresh Kumar Jha's user avatar
0 votes
1 answer
2k views

Error on pancakeswap, web3 python

I try send transaction but i get error. https://bscscan.com/tx/0x3e716bc5d0500e8284de39c809a0251d07b0b3648591bf09fbafbb4dea633a34 I use web3.py tx_params = { 'from': wallet, '...
Vlad's user avatar
  • 39
0 votes
0 answers
8 views

Missing transaction [duplicate]

MISSING TRANSACTION I have no idea what went wrong here but I had tried to send two tokens to my coinbase wallet from my crypto. Com defi wallet . And it never arrived . I also messed up and sent a ...
FrozenFury's user avatar
0 votes
0 answers
74 views

Why do number of tokens I put in liquidity pool reduce? - Impermanent loss

Why is it that when the price changes, my number of tokens is reduced and not the price of each token? Shouldn't the number of tokens I hold stay constant so here I would still have 10 A and 10 B ...
IBeFrogs's user avatar
0 votes
1 answer
30 views

Can someone tell me best De-Fi learning resources

I want to learn building some complex smart contracts for borrowing, lending, flash loans etc. Links to some resources or github repos would help, Thanks!!
Priyanshu Jain's user avatar