The greatest factor is the total guaranteed money with a much lower emphasis on the annual salary. The later years are considered much less than the earlier years, but the total bonus has more weight than anything. The comparative offers don't tell you what the bonus-to-base ratio is intentionally, and also if you wait to see what other offers are made the player may sign before you get a chance to make your offer.
Be careful offering huge bonuses - young players with a large difference between current and max could bust out, and old players may retire - and having a player with a huge multi-year bonus retire, or get cut or traded, could really hurt your cap.