This is the active voice. the passive voice for this is :-
A perfect dam has been built by them across the river.
now i need to make u understand for this question
Dam is an object so has been used and the they in the active voice has became them in the passive voice.
hope this helped u !!!!!!!!!