EOS.IO formulas for converting EOS to RAM and viceversa imply that the quantity

[RAM reserve]x[EOS reserve in connector] remains constant.

It was very complicated to read this from the code!

However, it looks like it would be very simple to implement the conversion EOS/RAM directly from that formula.

Why do we need a relay?

1 Answer 1


True. no need to go through the relay if you don't sell or buy the relay token (RAMEOS) directly. The formula can be changed to:

amount_from / (balance_from + amount_from) * balance_to

see this patch: https://github.com/bancorprotocol/eos/commit/de4cae5ebc2a0ee5b40f81241bf5842519cd0e9c

(it also includes a fix for buyrambytes inaccuracies - see convert_quick_inv)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.