CurveCryptoViews
Methods
get_dx_ex_fees
Get the amount of coin i one would have to pay for receiving dy of coin j (before any trading fees are charged)
Does not get the identical estimate (i.e. get_dy(get_dx(100))) ~= 100) Question: Why is that the case? Answer: Newton_y stops when the converge limit is reached: https://github.com/curvefi/curve-crypto-contract/blob/d7d04cd9ae038970e40be850df99de8c1ff7241b/contracts/two/CurveCryptoSwap2.vy#L355Should be used for external contracts to get a fairly precise "estimate" of the amount of tokens one has to pay to receive dy tokenssimplified version where we use that PRECISIONS = [1, 1]
Parameters
Returns
get_dy
Get the amount of coin j one would receive for swapping dx of coin i
solidity wrapper around CryptoSwap's get_dy
Parameters
Returns
get_dy_fees
Get the amount of coin j one would have to pay as trading fees for swapping dx of coin i
Parameters
Returns
get_dy_fees_perc
Get the share of coin j one would have to pay as trading fees for swapping dx of coin i
Parameters
Returns
get_dy_no_fee_deduct
Get the amount of coin j one would receive for swapping dx of coin i (excl. fees)
solidity implementation of the get_dy excluding the last last line where fees are deductedsimplified version where we use that PRECISIONS = [1, 1] https://github.com/curvefi/curve-crypto-contract/blob/d7d04cd9ae038970e40be850df99de8c1ff7241b/contracts/tricrypto/CurveCryptoViews3.vy#L40-L78
Parameters
Returns
math
Curve Math Contract
Returns
Errors
PRBMath__MulDivOverflow
Emitted when the result overflows uint256.
Parameters
Last updated