That would be either 'Red Rising' by Pierce Brown, or 'All Systems Red' by Martha Wells. Though I have to add a cautionary remark: I found the books in Wells' "Murderbot Diaries" to be short enough and gripping enough that it is very hard not to trade a night of sleep for finishing them in one setting.