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?