Once you have verified the discount code in the database, set a session variable to identify a successful verification... lets call it "CouponSuccess".
Then go to the discounts tab in eCart and add a discount using the condition "session variable exists" and the session variable you just created.
Set the amount to "based on the subtotal" and choose multiplied by 0.1
eCart should do the rest for you.