Using the encoders included in msfvenom is not the only way one could go - besides writing one's very own encoding routine and integrating the decoder stub into the shellcode, the decoding routine can also be integrated into the ROP chain which brings some advantages with it.
In part 5 of the exploit development series where we wrote another DEP bypass using WriteProcessMemory, we encountered a new problem exploiting the buffer overflow: The decoding stub added to our shellcode by msfvenom breaks our exploit since the shellcode does not have write permissions within the code cave. In order to solve this hurdle, an ROP-based decoder can be utilized instead.
Exploit Development Series: