Refraction is an implementation of the Xim protocol explained in [0] which depends on the FairExchange protocol [1].
[0] http://forensics.umass.edu/pubs/bissias.wpes.2014.pdf (xim)
[1] http://elaineshi.com/docs/bitcoin.pdf (section 7 -- FairExchange)