Production was handled by Boi-1da and Allen Ritter, who also collaborated on Rihanna (featuring Drake)'s hit tune "Work
." Boi-1da told the story of the song to Billboard
"I was in the studio with G-Eazy, and it's funny because it was the first beat I played for him. He flipped out when he heard it and immediately started writing to it. Randomly, A$AP Rocky was in the same studio, and just happened to walk into the room. He heard the beat as well and was like, 'Yo. I really like this beat. Is it cool if I try something on it?'
And after, he just hopped on the beat. What he did was almost a freestyle. I didn't see him write anything down. He just went in the booth and started going crazy. And then, they just took that. G added the second hook and verses, then the song was done. Then, he got Cardi B to jump on it. It was cool because we got to sit and vibe and come up with cool ideas. We figured it out."