Hot answers tagged

6

The custodians hold funds on BTC and mint / burn WBTC on Ethereum. They are centralized entities, and when you deposit BTC with one of them, you are trusting their servers and software to issue you the corresponding amount of ERC20 tokens at the market rate. The major difference with traditional custodians is that you can verify the BTC held in trust (i.e. ...


5

If you are interested in actually wrapping your BTC for reasonable fees, there are currently 2 good options available: coinlist, 0.25% fee (https://coinlist.co/asset/wrapped-bitcoin) wBTC cafè, 0.17% fee (https://wbtc.cafe) Note that wbtc café uses RenVM and slippage might occur, while coinlist offers a fixed conversion rate. Disclaimer: I am in no way ...


3

That is not going to make a difference, bots are looking for pending transactions that execute the addLiquidity method. In order for that to work, the addLiquidity method on the router contract needs to be executed. Whether it is executed directly or via a proxy contract, it does not matter because the method on the router contract is always executed and ...


2

You can write a query to filter all the liquidity pairs on Uniswap and get the pair address { pairs (where :{token0 : "0x0f7f961648ae6db43c75663ac7e5414eb79b5704", token1 :"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}) { // token1 is the ethereum address id createdAtTimestamp volumeUSD //any other field you want } }


2

There are three fees that apply when you make a trade on Uniswap. I don't know which fee you are referring to so I will break them all down. Gas fee. This is the fee that you pay so that miners will include your transaction in a block. The gas fees have been very high lately simply because a lot of people are using Ethereum blockchain and there is only a ...


2

The AMM is only checking that it is sending you the amountOutMin, not that you are receiving it. In other words, it calls a transfer for that token for an amount greater than or equal amountOutMin. However, after the transfer is called by the AMM (from the pair to your address), the token contract burns the 9% tax you are mentioning. This is not captured by ...


2

Different tokens can cost different amounts when transferred, i.e during a swap. 0xAPI doesn't know the gas cost of every token in existence. 0xAPI will perform a more accurate gas estimate for you under the following circumstances: takerAddress is provided and skipValidation=false (default) Taker must have the funds and the allowance Without the above we ...


1

It fails because the compiler is looking for the concat function as a member of bytes type. You can use concat as a regular function return string(concat(bytes(api0xUrl), concat(bytes(sellStr), ...))); Another alternative is move concat to a library and use the using for mechanism. library L { function ...


1

The product k would actually be constant, if the swap fee was 0%. Since AMMs usually have a fee, the product of the reserves is not really a constant in practice. The name ‘constant product market’ comes from the fact that, when the fee is zero (i.e., γ = 1), any trade ∆β to ∆α must change the reserves in such a way that the product RαRβ remains equal to ...


1

Looks like it was a problem with the BSC node (QuickNode). I have just started using this service but so far it looks very unreliable. Perhaps I am doing something else wrong, I would love to know what. After changing the WSS to wss://bsc-ws-node.nariox.org:443 it works.


1

You need to call swapExactETHForTokens for swapping WBNB to a token, NOT swapExactTokensForTokens. swapExactTokensForTokens is for swapping a non-BNB token to another non-BNB token. (At least, that is what I can think of.)


1

Dev Address - Some percentage of cake minted is sent to the dev address. For every 100 cake, 10 is sent to dev address. The dev address will then burn it. Update pool fn - Straight forward, it is used to update the number of cake to be emitted/allocated for each pool. Updating the staking pool - Changing LP token details. Reward debt - Whatever the user ...


1

I didnt understand what is approved then? You must first run the approve() transaction to allow the Uniswap contracts to withdraw from your token balance on your behalf. (See the approve() part of the ERC-20 standard.) Once the approval has happened successfully, then the swap can occur in a different transaction. The approve and swap are two different ...


1

The transaction reverted so funds should have been returned immediately. If they didn't then it is a bug in the wallet. Either contact the wallet developers or if you have the seed or private key switch to another wallet.


1

A minimal example showing how to integrate 1inch in your smart contract using Brownie https://github.com/smye/1inch-swap this may help you


1

There is no "swap" function in Uniswap. All swaps are executed through one of the functions in the Router - such as swapExactETHForTokens. Furthermore, processing speed is an irrelevant measurement in Ethereum blockchain. The processing time is a miniscule amount of time compared to waiting for your transaction to be mined. You can just forget ...


1

The transaction you posted is an Approval transaction, it is not a Swap transaction. You just gave permission to ExchangeProxy contract to run your trades. That's all you did. Nothing to fix. Now you can send a swap transaction.


1

What is "swap" presicely between ERC20 tokens? Is it exchanging one ERC20 token for the other without fees, A "swap" is a trade, which may or may not include an explicit fee. By "trade" I mean you are buying one currency or token for another. As we're talking about ERC20 tokens, and not derivatives*, the term "swap" ...


1

After some discussion in comments I'm guessing your problem is that the account has the correct DAI balance but your contract doesn't. Let's name a few things: A: your account B: your custom contract C: token contract (DAI) D: Uniswap router contract So the chain goes something like this: A sends some amount of C to B with transfer, calling C's transfer ...


1

This contract is what is called "ICO contracts" or Crowdsale contracts in Ethereum language. To deploy tokens on a contract Create a token by deploying a contract Initial token supply is minted on some Ethereum account You do a normal transfer() of these tokens to the token swap contract Token swap contract itself can then transfer() right amount of tokens ...


1

It's impossible to know if the minters have any options without knowing what the specific token is to inspect the contract. There's nothing IDEX users can do since the tokens were just transferred to the contract, so there aren't IDEX balances for the rightful holders of Token A. There's also nothing IDEX can do since they don't have an admin withdraw that ...


1

There's no such function. The address format is most probably different, so you can't even airdrop the ERC20 tokens to your coin holders automatically. What you can do, is to: launch the ERC20 token take the news to the holders create a process for them to redeem the equivalent ERC20's of their bag holdings (by sending a message signed with the public key ...


1

Ion Protocol developed by Clearmatics has implemented Cross-chain atomic swaps. See below link: https://github.com/clearmatics/ion As part of Stage 1, they have successfully implemented an atomic swap of ERC-223 tokens across two Ethereum chains. They plan to extend this to other Turing complete Blockchain platforms as part of Stage 2. See their blog post ...


1

There is ongoing work regarding it here: https://github.com/paritytech/parity-bridge It will eventually evolve to Polkadot network.


Only top voted, non community-wiki answers of a minimum length are eligible