Interesting approach, it was fun and I completed it twice. Although there are 2 major bugs with gold abuse. For one it's the duplication glitch that a couple people mentioned below. Another is this:
Step 1) You buy any spell and drag it to your loop
Step 2) You drag it into the bottom shop bar (sell) and get it's sell value
Step 3) You drag from the bottom into the upper shop bar and get it's sell value again
Repeat steps 2-3 for infinite money