Home

Awesome

Bskt

Bskt is a generic smart contract that creates decentralized token portfolios. Bskt facilitates the bundling and unbundling of a collection of ERC20 tokens in exchange for a new ERC20 token. Owners of the new token have a direct claim on the underlying tokens. Unlike traditional funds, custody is held by the smart contract.

These new tokens can be created by anyone who surrenders the underlying tokens and redeemed by anyone who owns issued tokens. Bskt allows investors to diversify their exposure to tokens in the Ethereum ecosystem without adding custody risk.

See the whitepaper for more details.

Usage

The steps for creating and redeeming Bskts are outlined here. A dapp which abstracts most of this away will be available here.

Create

Redeem

Documentation

The main functions provided in this contract are detailed below.

BsktToken(address[] addresses, uint256[] quantities, uint256 _creationUnit, string _name, string _symbol)

Initializes contract with a list of ERC20 token addresses and corresponding minimum number of units required for a creation unit.

create(uint256 baseUnits)

Creates Bskt tokens in exchange for underlying tokens. Before calling, underlying tokens must be approved to be moved by the Bskt Token contract. The number of approved tokens required depends on baseUnits. The baseUnits must be a multiple of the creationUnit.

redeem(uint256 baseUnits, address[] tokensToSkip)

Redeems Bskt tokens in return for underlying tokens. The baseUnits must be a multiple of the creationUnit.

Development

Set up

Test

npm run test:js
npm run test:sol
npm run test:e2e

Deploy (beta)

Contact

For questions, contact us hi@cryptofin.io