Here I see a big problem in situations:

There is a manager/scrum master who wants to get work done fast in sprint, not be late. I often see them trying to use frightening/angry tone and similar stuff to motivate to achieve results faster. But often this does not work, the next day still sprint is late. Then angry again - why late. Then everybody have stress - programmers because hearing such tone, manager having to be angry and also he needs to tell to stake holders why they do not meet deadlines.

The problem is - the fixed salary kind of forces employee to work on same productivity all the time. So if for some reason he got stuck on a task or whatever, he is still paid as he should not have been stuck on the task and the company is not happy because it has to pay as he was going good. Then they make stress to a programmer and programmer becomes not happy.

Now if for a task the money is paid depending on productivity, it could reduce both parties unhappiness - company has to pay less when it does not go productively and programmer does not need to feel stress because nobody now blame him for being unproductive. 

And also if he wants to get a bonus - he tries to be productive, so the project does not go unproductive. 

If programmer still does not try to be productive, then it means motivator is too weak. Need to adjust. So fine tune the motivator to find a good balance so that programmer would be safe in case things go bad, but also he would get good enough added value if he succeeds.

For example:

the task is estimated for 8 hours. Programmers salary is 80 eur per those 8 hours, 10 eur per hour with those conditions. And without those conditions - programmers salary is lets say 90 eur per day.

Now could added condition: if you finish it in 7 hours, you get still 80 eur. And now you have one hour left in your day to earn 10 eur more by taking another task or go home (whatever motivates the programmer more).

Yea, programmer might still take 3 days to finish this task because maybe it was estimated bad and company migth not be happy. But it will be bit happier still, because now it would pay 240 eur instead of 270 eur. Its not perfect (because its hard to calculate perfect salary in IT), but better than before I assume because of motivator part.

And maybe that programmer had hidden talent to earn 100 eur per day on average when he has a motivator, while with fixed hourly without motivator part he would have earned 90 eur per day, because he started searching ways to improve. Win win.