Good question - our system if very complex:
As it stands now - the penalty for just quitting/disconnecting is:
-Some of your army`s resources (as much as it would have cost to sue for peace and not fight in the first place) will get transferred to the enemy player.
-if your army doesn`t have enougth resources to pay: 25% of your remaining non-military units will be killed, and 10% of your remaining military units will be killed.
If you want to quit battle properly without fighting to the last men, you have to Surrender. When you surrender - game pauses, and the enemy player has the option to reduce surrender fee by 25%, 50% or 100%. Or to spare your units if your army doesn`t have enougth resources.
The player who shows mercy will receive additional reward to Influence resource (that is used for research and unlocking real currency paid units and content)
Also, opponent you are currently fighting, if he/she`s winning, can offer you to surrender as well. But in that case the options are 50% or 100% discount, and automatically your units will be spared. But keep in mind - the wining player doesn`t know how many resources your army has, when he`s making his offer. So he might pick - 25% discount, spare enemy units if not enougth resources - and get nothing
In team games - team-mates can surrender separately - so make sure you have team meats who won`t bail on you.
Last thing to keep in mind - fighting to the last man, will give a large influence reward to the player who lost - for his bravery.