Despicable Me

Gru, a supervillain, has his pride injured when an unknown supervillain steals the Great Pyramid of Giza, an action that is described by his colleague Dr. Nefario as "making all other villains look lame". Gru decides to do better, with the assistance of Dr. Nefario, by shrinking and stealing the Moon, an idea based on his childhood dream of being an astronaut, which was always disparaged by his mother Marlena. The plan is expensive and Gru seeks a loan from the Bank of Evil, where the president Mr. Perkins is impressed by the plan, but will only provide the money if Gru can obtain the necessary shrink ray first.
Gru and his Minions steal the shrink ray from a secret base in East Asia, but the up-and-coming supervillain, Vector, who was also responsible for the Pyramid theft, immediately steals it from Gru, as revenge for freezing his head earlier at the Bank of Evil. Gru attempts to break into Vector's fortress to get the shrink ray back, but is defeated by numerous booby traps. However, he notices three orphan girls, Margo, Edith, and Agnes, who are able to easily walk into the base because they are selling cookies. Gru disguises himself as a dentist and adopts the girls from Miss Hattie's Home for Girls, planning on using them to infiltrate Vector's base so he can get the shrink ray back. However, Gru has difficulty nurturing them properly due to their rambunctiousness, their ballet classes, and his own ineptitude as a parent.
Eventually, Gru and the girls arrive at Vector's fortress and Gru manages to steal the shrink ray. The girls then suggest a day at a theme park; Gru agrees, believing he can abandon the girls there, but he is later told by an attendant that they must be accompanied by an adult. He is then dragged around the theme park for the day, eventually warming up to the girls after they compliment him on blowing up a rigged carnival game to get Agnes a toy unicorn.
Later, Gru contacts Mr. Perkins, stating that he finally has the shrink ray in his possession. Margo, Edith, and Agnes interrupt the meeting, and Perkins announces that he has lost confidence in Gru and will no longer fund his operations. As Gru tells the Minions he can no longer pay them for their services, the girls offer the contents of their piggy bank to fund the plan. The Minions then hand over their own savings, too. Gru, inspired, sacrifices parts of his lair to construct a spacecraft. Gru plans to steal the Moon when it is nearest the Earth, but this ends up being the same day as the girls' ballet recital. Gru becomes conflicted, and Dr. Nefario, seeing the recital as interfering with the plan, arranges for the girls to be returned to the orphanage. At the same time, Mr. Perkins informs Vector (who is revealed to be his son) of Gru's possession of the shrink ray and the adoption of the three girls, encouraging Vector to take action.
Gru successfully shrinks and steals the Moon, but is too late to attend the recital â finding a note from Vector, who has kidnapped the girls, and will exchange the Moon for them. After arriving at Vector's headquarters, Gru readily makes the trade, but Vector reneges on the deal, flying off with the girls and the Moon, much to Gru's anger. Meanwhile, Dr. Nefario discovers that the effects of the shrink ray are temporary; the bigger the object was originally, the faster it will regain its original size. As the Moon starts to expand in Vector's ship, Gru, Dr. Nefario, and the Minions pull off a daring mid-air rescue of the girls just as the Moon explodes out of Vector's ship and launches itself back into orbit, with Vector trapped on it.
Sometime later, Gru has readopted the girls and treats them as his daughters, writing them a bedtime storybook framed around his own experience. The film ends with the girls performing their own ballet recital for Gru, Marlena, Dr. Nefario, and the Minions.

Question: Who discovers the effects of the shrink ray are only temporary?
Answer: Dr. Nefario