How to integrate Magicswap v2 and a GEX into your game
Magicswap v2 can be integrated in games through two paths:
Trading in Magicswap can result in remainders which are rounded down, with the remainders staying in the LP pool as LP fees. This behaviour may be unexpected (and possibly harm users) in cases when rounded amounts are large in dollar terms.
When integrating Magicswap, consider the following:
Warn when traders input something that attempts to buy fractional amounts of an NFT (which are rounded down to zero and effectively burnt)
Warn if swap results in significant rounding errors (above say $5)
In summary:
Safe; user specifies exact amount of input NFT and output ERC-20 is divisible
Safe; user specifies exact amount of input NFT and output ERC-20 is divisible
Check for swaps that accidentally burn, and swaps with significant rounding
ℹ️ Provide info in the LPing screen:
How to integrate Magicswap v2 and a GEX into your game
Magicswap v2 can be integrated in games through two paths:
Trading in Magicswap can result in remainders which are rounded down, with the remainders staying in the LP pool as LP fees. This behaviour may be unexpected (and possibly harm users) in cases when rounded amounts are large in dollar terms.
When integrating Magicswap, consider the following:
Warn when traders input something that attempts to buy fractional amounts of an NFT (which are rounded down to zero and effectively burnt)
Warn if swap results in significant rounding errors (above say $5)
In summary:
Safe; user specifies exact amount of input NFT and output ERC-20 is divisible
Safe; user specifies exact amount of input NFT and output ERC-20 is divisible
Check for swaps that accidentally burn, and swaps with significant rounding
ℹ️ Provide info in the LPing screen: