The Slice smart contract architecture is designed to provide users with exposure to a basket of underlying assets through a single token, the Slice token. This ERC20 token represents a diversified portfolio of cryptocurrencies, with the underlying assets residing on various blockchains. Users purchase Slice tokens on a single chain using USDC. Our architecture utilizes bridging and cross-chain swaps.
Key components of the Slice architecture include two smart contracts: SliceCore.sol
and SliceToken.sol
. SliceCore.sol
serves as the upgradeable core logic deployed across multiple blockchains. It facilitates cross-chain messaging and contains essential functionalities utilized by SliceToken.sol
. SliceToken.sol
is the ERC20 token representing the underlying assets and enabling users to access them.
The four most important smart contract interactions are the following:
In the create step an address that is allowed to create new Slice tokens calls the createSlice()
function on the SliceCore.sol
smart contract. What addresses are allowed to create Slice tokens will depend on the strategic/business decisions of the team (can specify anything from a single address to all addresses).
In the createSlice()
function, the creator has to input a list of positions.
A position contains:
The result of the create step is a new SliceToken.sol contract deployed on the main blockchain.
In the mint step the end user calls the mint()
function on the SliceToken.sol
smart contract via the front end.
The mint steps are as follows:
onPayloadReceive()
callback on the Slice core contract on Chain BThe result of the mint step is a new Slice token in the user's wallet on the main blockchain.
In the rebalance step, the address that controls the Slice token can update the units of the underlying positions. This function is to account for changes in the prices of the underlying positions. Only one address is allowed to call this function: the address that controls the Slice token. This will be the address that created the Slice token (meaning: if only the Slice team is allowed to create Slice tokens, only the Slice team will be allowed to rebalance those tokens).
The rebalance steps are as follows:
This will change the position composition for all Slice tokens, both present and future. A simple example: a Slice token contains 50% ETH and 50% SOL. Some time after the creation of the Slice token the price of ETH increases relative to the price of SOL, so a rebalance is necessary.
After the rebalance, the new distribution will be 48% ETH and 52% SOL. This rebalance will be applied to all tokens that are already minted, and all tokens that will be minted in the future.
When and whether such a rebalance is necessary will be entirely up to the discretion of the team. (Just to give an example, in Index Coop on-chain ETFs "rebalances occur monthly based on Scalara criteria" and is applied to all tokens automatically).
In the redeem step, the owner of a Slice token is able to exchange a Slice token for the underlying assets the Slice token represents.
The redeem steps are as follows:
redeem()
function on the SliceToken.sol
contract using the front end