Esters transesterify in the presence of alkoxides, depending on the reaction:

 

transesterificacion-basica
 
Methyl ethanoate [1] reacts with sodium ethoxide to form ethyl ethanoate [2] and sodium methoxide [3]
 
The basic transesterification mechanism occurs in the following stages:
 
Stage 1. Nucleophilic addition of water to the carbonyl
 
transesterificacion-basica
 
Stage 2. Elimination of methanol
 
transesterificacion-basica