Smart Contracts Built for
the AI Era.
Cadence is a safe, resource-oriented programming language built for the Flow blockchain. Designed for digital ownership and optimized for AI-driven development.
·
$npx skills add outblock/cadence-lang.org
Architectural Pillars
SAFETY
Resource Oriented
Assets live in account storage as first-class objects. They cannot be lost, duplicated, or forgotten. The type system enforces physical-world scarcity.
ACCESS
Capabilities
Security via object-capabilities. Authority is granted by holding a reference to a resource, removing the need for error-prone permission lists.
// The system enforces ownership
access(all) resource NFT {
access(all) let id: UInt64
init() { self.id = self.uuid }
}
// Moves are explicit and safe
access(all) fun transfer(token: @NFT) {
// '@' denotes a resource that MUST be handled
Receiver.deposit(token: <- token)
}The Paradigm Shift
LEDGER VS. RESOURCES
The Old Way (Ledger)
Centralized Accounting
Assets are just entries in a contract's private dictionary. To move value, you update two numbers. This "ledger" model is prone to reentrancy bugs.
mapping(address => uint) balances;
function transfer(address to, uint val) {
balances[msg.sender] -= val;
balances[to] += val;
}
function transfer(address to, uint val) {
balances[msg.sender] -= val;
balances[to] += val;
}
The Cadence Way
Direct Ownership
Assets are objects stored directly in the user's account. To move value, you physically move the object. Impossible to duplicate.
let vault <- account.withdraw(amount: 10.0)
receiver.deposit(vault: <- vault)
// vault is now empty, reentrancy impossible
receiver.deposit(vault: <- vault)
// vault is now empty, reentrancy impossible
Watch The Intro
BUILT FOR CONSUMER APPS & DEFI
Built For Scale
NBA TOP SHOTNFL ALL DAYTICKETMASTERDISNEY