The Engineering Story Behind Flex Comp

How we built Flex Comp: Shopify's new approach to compensation that gives employees the ability to choose how they want to allocate their total reward between base salary, Restricted Stock Units (RSUs), and Stock Options today, with new features like Shop Cash in the future.

Eric Poirier
17 min readintermediate
--
View Original

Overview

The article discusses Shopify's innovative compensation system, Flex Comp, which allows employees to customize their total rewards. It highlights the technical challenges faced during development, including privacy controls and event payload encryption, while emphasizing the importance of product thinking and agile methodologies.

What You'll Learn

1

How to implement a user-friendly rewards allocation interface using sliders

2

Why establishing API contracts early in a project is crucial for independent development

3

How to use asymmetric encryption for securing event payloads in data pipelines

4

When to apply the reducer pattern in React for managing complex form states

Prerequisites & Requirements

  • Understanding of compensation structures and employee benefits
  • Familiarity with React and state management patterns

Key Questions Answered

What is Flex Comp and how does it work?
Flex Comp is Shopify's new compensation system that allows employees to allocate their total rewards between base salary, Restricted Stock Units (RSUs), and Stock Options. It features a user-friendly interface for adjusting allocations and removes one-year cliffs on equity, enabling flexibility for employees to change their choices several times a year.
How did Shopify ensure privacy in the Flex Comp project?
Shopify implemented privacy controls by building Flex Comp in a private repository accessible only to the project team. They also focused on event encryption to protect sensitive data as it flowed through their internal systems, ensuring that only authorized personnel could access the decrypted information.
What technical challenges were faced during the development of Flex Comp?
The development team encountered challenges such as establishing API contracts for independent front-end and back-end development, implementing privacy controls, and optimizing event payload encryption. They also had to manage complex state interactions for the user interface while ensuring data integrity and compliance with regional regulations.
What encryption methods were used for event payloads in Flex Comp?
The team decided to use asymmetric encryption for securing event payloads, generating a 4096 bit RSA key pair for standard payloads and a 6144 bit RSA key pair for larger payloads. This approach allowed them to maintain security while optimizing performance based on payload size.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Establishing API contracts early in a project can significantly enhance development speed and team autonomy.
By defining API contracts within the first week, the development team was able to work on the front end independently from back-end changes, which is crucial for maintaining momentum in fast-paced projects.
2
Using asymmetric encryption for sensitive data can provide an additional layer of security while allowing multiple teams to interact with the data safely.
This approach ensures that only authorized teams can decrypt sensitive information, which is especially important in projects dealing with personal compensation data.
3
Implementing a user-friendly interface for complex systems can improve employee engagement and satisfaction.
Flex Comp's slider interface for rewards allocation simplifies the decision-making process for employees, making it easier for them to understand and manage their compensation.

Common Pitfalls

1
Failing to establish a single source of truth for data can lead to inconsistencies and errors in user interfaces.
Without a centralized data management strategy, different parts of the application may display outdated or incorrect information, which can confuse users and undermine trust in the system.

Related Concepts

Compensation Structures
Event-driven Architecture
Data Encryption Techniques