Class rank, mostly. Duke considers the toughness of classes and the grades earned to be two of the six considered categories. Test scores, recommendations, ecs, and essays are the other four. The OP's ACT score sits very comfortably in Duke's middle 50% range of 30-34.
Top 10 of class: 32.4% admitted
Top 5% of class:32.2% admitted
Top 5-10% of class: 12.5% admitted
Top 10-20% of class: 8.59% admitted
Below top 20% of class: 3.05% admitted